using AutoMapper; using BookingJieFeng.DB.Model; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace BookingJieFeng.Models { public class OpCtnDetailEditViewModel { public string GID { get; set; } public string CTN_ID { get; set; } public int? PKGS { get; set; } public string KINDPKGS { get; set; } public decimal? KGS { get; set; } public decimal? CBM { get; set; } public string HSCODE { get; set; } public string MARKS { get; set; } public string DESCRIPTION { get; set; } public string REMARK { get; set; } } public static class OpCtnDetailEditViewModelExt { public static OpCtnDetailEditViewModel AsEditViewModel(this OP_CTN_DETAIL model) { return Mapper.Map(model); } public static List AsEditViewModelList(this IEnumerable model) { return Mapper.Map>(model); } public static OP_CTN_DETAIL AsModel(this OpCtnDetailEditViewModel model) { return Mapper.Map(model); } public static OP_CTN_DETAIL AsModel(this OpCtnDetailEditViewModel model, OP_CTN_DETAIL dest) { return Mapper.Map(model, dest); } } }