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.

202 lines
6.0 KiB
C#

10 months ago

using AutoMapper;
using BookingWeb.DB.Model;
using Resources;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace BookingWeb.Models
{
public class OrderEditViewModel
{
public OrderEditViewModel()
{
this.CtrnList = new List<OpCtnOrderEditViewModel>();
this.BSSTATUS = OrderStatus.Create.ToString();
}
public string ORDNO { get; set; }
//public string BSNO { get; set; }
public string BSSTATUS { get; set; }
//public DateTime? BSDATE { get; set; }
public string MBLNO { get; set; }
//public string HBLNO { get; set; }
public string ORDERNO { get; set; }
public string CONTRACTNO { get; set; }
//public string SERVICECONTRACTNO { get; set; }
//public string SHIPPERID { get; set; }
//public string CONSIGNEEID { get; set; }
//public string NOTIFYPARTYID { get; set; }
public string SHIPPER { get; set; }
public string CONSIGNEE { get; set; }
public string NOTIFYPARTY { get; set; }
//public string NOTIFYPARTY2 { get; set; }
public string YARD { get; set; }
public string VESSELID { get; set; }
public string VESSEL { get; set; }
public string VOYNO { get; set; }
public string ETD { get; set; }
//public DateTime? CLOSINGDATE { get; set; }
//public DateTime? CLOSEDOCDATE { get; set; }
//public DateTime? ETA { get; set; }
public string PLACERECEIPTID { get; set; }
public string PLACERECEIPT { get; set; }
public string PORTLOADID { get; set; }
public string PORTLOAD { get; set; }
public string PORTDISCHARGEID { get; set; }
public string PORTDISCHARGE { get; set; }
public string PLACEDELIVERYID { get; set; }
public string PLACEDELIVERY { get; set; }
public string DESTINATIONID { get; set; }
public string DESTINATION { get; set; }
public string NOBILL { get; set; }
public string COPYNOBILLL { get; set; }
public string ISSUETYPE { get; set; }
//public DateTime? ISSUEDATE { get; set; }
public string ISSUEPLACEID { get; set; }
public string ISSUEPLACE { get; set; }
public string BLFRT { get; set; }
public string PREPARDAT { get; set; }
public string PAYABLEAT { get; set; }
public string SERVICE { get; set; }
public string MARKS { get; set; }
public string HSCODE { get; set; }
public string DESCRIPTION { get; set; }
public int? PKGS { get; set; }
public string KINDPKGS { get; set; }
public decimal? KGS { get; set; }
public decimal? CBM { get; set; }
public string CNTRTOTAL { get; set; }
//public string INPUTBY { get; set; }
public string CARRIER { get; set; }
public string CARGOID { get; set; }
public string DCLASS { get; set; }
public string DUNNO { get; set; }
public string DPAGE { get; set; }
public string DLABEL { get; set; }
public string LINKMAN { get; set; }
public string TEMPID { get; set; }
public string TEMPSET { get; set; }
public string REEFERF { get; set; }
public string HUMIDITY { get; set; }
public bool ISCONTAINERSOC { get; set; }
public string REMARK { get; set; }
public string EDIREMARK { get; set; }
//public DateTime? CREATETIME { get; set; }
public long MODIFYTIME { get; set; }
//public string MODIFYUSER { get; set; }
//public string CORPID { get; set; }
//public string SHIPPERNAME { get; set; }
//public string SHIPPERADDR1 { get; set; }
//public string SHIPPERADDR2 { get; set; }
//public string SHIPPERADDR3 { get; set; }
//public string SHIPPERCITY { get; set; }
//public string SHIPPERPROVINCE { get; set; }
//public string SHIPPERPOSTCODE { get; set; }
//public string SHIPPERCOUNTRY { get; set; }
//public string SHIPPERATTN { get; set; }
//public string SHIPPERTEL { get; set; }
//public string CONSIGNEENAME { get; set; }
//public string CONSIGNEEADDR1 { get; set; }
//public string CONSIGNEEADDR2 { get; set; }
//public string CONSIGNEEADDR3 { get; set; }
//public string CONSIGNEECITY { get; set; }
//public string CONSIGNEEPROVINCE { get; set; }
//public string CONSIGNEEPOSTCODE { get; set; }
//public string CONSIGNEERCOUNTRY { get; set; }
//public string CONSIGNEEATTN { get; set; }
//public string CONSIGNEETEL { get; set; }
//public string NOTIFYPARTYNAME { get; set; }
//public string NOTIFYPARTYADDR1 { get; set; }
//public string NOTIFYPARTYADDR2 { get; set; }
//public string NOTIFYPARTYADDR3 { get; set; }
//public string NOTIFYPARTYCITY { get; set; }
//public string NOTIFYPARTYPROVINCE { get; set; }
//public string NOTIFYPARTYPOSTCODE { get; set; }
//public string NOTIFYPARTYCOUNTRY { get; set; }
//public string NOTIFYPARTYATTN { get; set; }
//public string NOTIFYPARTYTEL { get; set; }
public string SALE_NAME { get; set; }
public string TRANSTYPE { get; set; }
public List<OpCtnOrderEditViewModel> CtrnList { get; set; }
}
public static class OrderEditViewModelExt
{
public static OrderEditViewModel AsEditViewModel(this OP_SEAE_ORDER model)
{
return Mapper.Map<OrderEditViewModel>(model);
}
public static OP_SEAE_ORDER AsModel(this OrderEditViewModel model)
{
return Mapper.Map<OP_SEAE_ORDER>(model);
}
public static OP_SEAE_ORDER AsModel(this OrderEditViewModel model, OP_SEAE_ORDER dest)
{
return Mapper.Map(model, dest);
}
}
}