You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB
C#

10 months ago
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<OpCtnDetailEditViewModel>(model);
}
public static List<OpCtnDetailEditViewModel> AsEditViewModelList(this IEnumerable<OP_CTN_DETAIL> model)
{
return Mapper.Map<List<OpCtnDetailEditViewModel>>(model);
}
public static OP_CTN_DETAIL AsModel(this OpCtnDetailEditViewModel model)
{
return Mapper.Map<OP_CTN_DETAIL>(model);
}
public static OP_CTN_DETAIL AsModel(this OpCtnDetailEditViewModel model, OP_CTN_DETAIL dest)
{
return Mapper.Map(model, dest);
}
}
}