public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.SHIPMENT.SHIPMENT_HEADER_TEMP_MODEL model, params string[] updateProperties) { Apps.Models.SHIPMENT_HEADER_TEMP entity = m_Rep.GetById(model.INTERNAL_SHIPMENT_NUM); if (entity == null) { errors.Add(Resource.Disable); return; } if (updateProperties.Count() <= 0) { entity.INTERNAL_SHIPMENT_NUM = model.INTERNAL_SHIPMENT_NUM; entity.FLAG = model.FLAG; entity.CODE = model.CODE; entity.MESSAGE = model.MESSAGE; entity.WAREHOUSE = model.WAREHOUSE; entity.COMPANY = model.COMPANY; entity.INTERNAL_LOAD_NUM = model.INTERNAL_LOAD_NUM; entity.SHIPMENT_ID = model.SHIPMENT_ID; entity.ERP_ORDER = model.ERP_ORDER; entity.LEADING_STS = model.LEADING_STS; entity.TRAILING_STS = model.TRAILING_STS; entity.SHIPMENT_TYPE = model.SHIPMENT_TYPE; entity.ROUTE = model.ROUTE; entity.SHIP_TO = model.SHIP_TO; entity.SHIP_TO_NAME = model.SHIP_TO_NAME; entity.SHIP_TO_ADDRESS1 = model.SHIP_TO_ADDRESS1; entity.SHIP_TO_ADDRESS2 = model.SHIP_TO_ADDRESS2; entity.SHIP_TO_DISTRICT = model.SHIP_TO_DISTRICT; entity.SHIP_TO_CITY = model.SHIP_TO_CITY; entity.SHIP_TO_STATE = model.SHIP_TO_STATE; entity.SHIP_TO_COUNTRY = model.SHIP_TO_COUNTRY; entity.SHIP_TO_POSTAL_CODE = model.SHIP_TO_POSTAL_CODE; entity.SHIP_TO_ATTENTION_TO = model.SHIP_TO_ATTENTION_TO; entity.SHIP_TO_PHONE_NUM = model.SHIP_TO_PHONE_NUM; entity.SHIP_TO_MOBILE = model.SHIP_TO_MOBILE; entity.SHIP_TO_FAX_NUM = model.SHIP_TO_FAX_NUM; entity.SHIP_TO_EMAIL_ADDRESS = model.SHIP_TO_EMAIL_ADDRESS; entity.PRIORITY = model.PRIORITY; entity.USER_STAMP = model.USER_STAMP; entity.DATE_TIME_STAMP = model.DATE_TIME_STAMP; entity.REQUESTED_DELIVERY_DATE = model.REQUESTED_DELIVERY_DATE; entity.REQUESTED_DELIVERY_TYPE = model.REQUESTED_DELIVERY_TYPE; entity.SCHEDULED_SHIP_DATE = model.SCHEDULED_SHIP_DATE; entity.ACTUAL_SHIP_DATE_TIME = model.ACTUAL_SHIP_DATE_TIME; entity.ACTUAL_DELIVERY_DATE_TIME = model.ACTUAL_DELIVERY_DATE_TIME; entity.DELIVERY_NOTE = model.DELIVERY_NOTE; entity.REJECTION_NOTE = model.REJECTION_NOTE; entity.INTERNAL_WAVE_NUM = model.INTERNAL_WAVE_NUM; entity.SHIP_DOCK = model.SHIP_DOCK; entity.ALLOCATE_COMPLETE = model.ALLOCATE_COMPLETE; entity.TOTAL_WEIGHT = model.TOTAL_WEIGHT; entity.WEIGHT_UM = model.WEIGHT_UM; entity.TOTAL_VOLUME = model.TOTAL_VOLUME; entity.VOLUME_UM = model.VOLUME_UM; entity.TOTAL_LINES = model.TOTAL_LINES; entity.TOTAL_CONTAINERS = model.TOTAL_CONTAINERS; entity.CARRIER = model.CARRIER; entity.CARRIER_SERVICE = model.CARRIER_SERVICE; entity.USER_DEF1 = model.USER_DEF1; entity.USER_DEF2 = model.USER_DEF2; entity.USER_DEF3 = model.USER_DEF3; entity.USER_DEF4 = model.USER_DEF4; entity.USER_DEF5 = model.USER_DEF5; entity.USER_DEF6 = model.USER_DEF6; entity.USER_DEF7 = model.USER_DEF7; entity.USER_DEF8 = model.USER_DEF8; entity.USER_DEF9 = model.USER_DEF9; entity.USER_DEF10 = model.USER_DEF10; entity.BACK_ORDER_NUM = model.BACK_ORDER_NUM; entity.PROCESS_TYPE = model.PROCESS_TYPE; entity.TOTAL_QTY = model.TOTAL_QTY; entity.LAST_WAVE_NUM = model.LAST_WAVE_NUM; entity.GROUP_NUM = model.GROUP_NUM; entity.GROUP_INDEX = model.GROUP_INDEX; entity.SIGN_VALUE = model.SIGN_VALUE; entity.SHIPMENT_SUB_TYPE = model.SHIPMENT_SUB_TYPE; entity.SHIPMENT_CATEGORY1 = model.SHIPMENT_CATEGORY1; entity.SHIPMENT_CATEGORY2 = model.SHIPMENT_CATEGORY2; entity.SHIPMENT_CATEGORY3 = model.SHIPMENT_CATEGORY3; entity.SHIPMENT_CATEGORY4 = model.SHIPMENT_CATEGORY4; entity.SHIPMENT_CATEGORY5 = model.SHIPMENT_CATEGORY5; entity.SHIPMENT_CATEGORY6 = model.SHIPMENT_CATEGORY6; entity.SHIPMENT_CATEGORY7 = model.SHIPMENT_CATEGORY7; entity.SHIPMENT_CATEGORY8 = model.SHIPMENT_CATEGORY8; entity.UPLOAD_INTERFACE_FLAG = model.UPLOAD_INTERFACE_FLAG; entity.TOTAL_VALUE = model.TOTAL_VALUE; entity.SHIPMENT_NOTE = model.SHIPMENT_NOTE; entity.STOP_SEQ = model.STOP_SEQ; entity.CREATE_DATE_TIME = model.CREATE_DATE_TIME; entity.CREATE_USER = model.CREATE_USER; entity.COD_REQUIRED = model.COD_REQUIRED; entity.COD_VALUE = model.COD_VALUE; entity.DEIVERY_WINDOW = model.DEIVERY_WINDOW; entity.ALLOW_CONSOLIDATE = model.ALLOW_CONSOLIDATE; entity.CONSOLIDATED = model.CONSOLIDATED; entity.INVOICE_REQUIRED = model.INVOICE_REQUIRED; entity.INTERNAL_INVOICE_NUM = model.INTERNAL_INVOICE_NUM; entity.HOST_COMPANY = model.HOST_COMPANY; entity.UPLOAD_INTERFACE_DATE_TIME = model.UPLOAD_INTERFACE_DATE_TIME; entity.UPLOAD_INTERFACE_REQUIRED = model.UPLOAD_INTERFACE_REQUIRED; entity.SO_OPERATOR = model.SO_OPERATOR; entity.SO_OPERATOR_PHONE_NUM = model.SO_OPERATOR_PHONE_NUM; entity.SO_EMAIL_ADDRESS = model.SO_EMAIL_ADDRESS; entity.STATUS_FLOW = model.STATUS_FLOW; entity.ITF_USERDEF1 = model.ITF_USERDEF1; entity.ITF_USERDEF2 = model.ITF_USERDEF2; entity.ITF_USERDEF3 = model.ITF_USERDEF3; entity.ITF_USERDEF4 = model.ITF_USERDEF4; entity.ITF_USERDEF5 = model.ITF_USERDEF5; entity.ITF_USERDEF6 = model.ITF_USERDEF6; entity.ITF_USERDEF7 = model.ITF_USERDEF7; entity.ITF_USERDEF8 = model.ITF_USERDEF8; } else { Type type = typeof(Apps.Models.SCV.SHIPMENT.SHIPMENT_HEADER_TEMP_MODEL); Type typeE = typeof(Apps.Models.SHIPMENT_HEADER_TEMP); foreach (var item in updateProperties) { System.Reflection.PropertyInfo pi = type.GetProperty(item); System.Reflection.PropertyInfo piE = typeE.GetProperty(item); piE.SetValue(entity, pi.GetValue(model), null); } } m_Rep.Modify(entity, updateProperties); }
public virtual Apps.Models.SCV.SHIPMENT.SHIPMENT_HEADER_TEMP_MODEL GetById(string id) { Apps.Models.SHIPMENT_HEADER_TEMP entity = m_Rep.GetById(id); if (entity != null) { //SHIPMENT_HEADER_TEMP entity = m_Rep.GetById(id); Apps.Models.SCV.SHIPMENT.SHIPMENT_HEADER_TEMP_MODEL model = new Apps.Models.SCV.SHIPMENT.SHIPMENT_HEADER_TEMP_MODEL(); model.INTERNAL_SHIPMENT_NUM = entity.INTERNAL_SHIPMENT_NUM; model.FLAG = entity.FLAG; model.CODE = entity.CODE; model.MESSAGE = entity.MESSAGE; model.WAREHOUSE = entity.WAREHOUSE; model.COMPANY = entity.COMPANY; model.INTERNAL_LOAD_NUM = entity.INTERNAL_LOAD_NUM; model.SHIPMENT_ID = entity.SHIPMENT_ID; model.ERP_ORDER = entity.ERP_ORDER; model.LEADING_STS = entity.LEADING_STS; model.TRAILING_STS = entity.TRAILING_STS; model.SHIPMENT_TYPE = entity.SHIPMENT_TYPE; model.ROUTE = entity.ROUTE; model.SHIP_TO = entity.SHIP_TO; model.SHIP_TO_NAME = entity.SHIP_TO_NAME; model.SHIP_TO_ADDRESS1 = entity.SHIP_TO_ADDRESS1; model.SHIP_TO_ADDRESS2 = entity.SHIP_TO_ADDRESS2; model.SHIP_TO_DISTRICT = entity.SHIP_TO_DISTRICT; model.SHIP_TO_CITY = entity.SHIP_TO_CITY; model.SHIP_TO_STATE = entity.SHIP_TO_STATE; model.SHIP_TO_COUNTRY = entity.SHIP_TO_COUNTRY; model.SHIP_TO_POSTAL_CODE = entity.SHIP_TO_POSTAL_CODE; model.SHIP_TO_ATTENTION_TO = entity.SHIP_TO_ATTENTION_TO; model.SHIP_TO_PHONE_NUM = entity.SHIP_TO_PHONE_NUM; model.SHIP_TO_MOBILE = entity.SHIP_TO_MOBILE; model.SHIP_TO_FAX_NUM = entity.SHIP_TO_FAX_NUM; model.SHIP_TO_EMAIL_ADDRESS = entity.SHIP_TO_EMAIL_ADDRESS; model.PRIORITY = entity.PRIORITY; model.USER_STAMP = entity.USER_STAMP; model.DATE_TIME_STAMP = entity.DATE_TIME_STAMP; model.REQUESTED_DELIVERY_DATE = entity.REQUESTED_DELIVERY_DATE; model.REQUESTED_DELIVERY_TYPE = entity.REQUESTED_DELIVERY_TYPE; model.SCHEDULED_SHIP_DATE = entity.SCHEDULED_SHIP_DATE; model.ACTUAL_SHIP_DATE_TIME = entity.ACTUAL_SHIP_DATE_TIME; model.ACTUAL_DELIVERY_DATE_TIME = entity.ACTUAL_DELIVERY_DATE_TIME; model.DELIVERY_NOTE = entity.DELIVERY_NOTE; model.REJECTION_NOTE = entity.REJECTION_NOTE; model.INTERNAL_WAVE_NUM = entity.INTERNAL_WAVE_NUM; model.SHIP_DOCK = entity.SHIP_DOCK; model.ALLOCATE_COMPLETE = entity.ALLOCATE_COMPLETE; model.TOTAL_WEIGHT = entity.TOTAL_WEIGHT; model.WEIGHT_UM = entity.WEIGHT_UM; model.TOTAL_VOLUME = entity.TOTAL_VOLUME; model.VOLUME_UM = entity.VOLUME_UM; model.TOTAL_LINES = entity.TOTAL_LINES; model.TOTAL_CONTAINERS = entity.TOTAL_CONTAINERS; model.CARRIER = entity.CARRIER; model.CARRIER_SERVICE = entity.CARRIER_SERVICE; model.USER_DEF1 = entity.USER_DEF1; model.USER_DEF2 = entity.USER_DEF2; model.USER_DEF3 = entity.USER_DEF3; model.USER_DEF4 = entity.USER_DEF4; model.USER_DEF5 = entity.USER_DEF5; model.USER_DEF6 = entity.USER_DEF6; model.USER_DEF7 = entity.USER_DEF7; model.USER_DEF8 = entity.USER_DEF8; model.USER_DEF9 = entity.USER_DEF9; model.USER_DEF10 = entity.USER_DEF10; model.BACK_ORDER_NUM = entity.BACK_ORDER_NUM; model.PROCESS_TYPE = entity.PROCESS_TYPE; model.TOTAL_QTY = entity.TOTAL_QTY; model.LAST_WAVE_NUM = entity.LAST_WAVE_NUM; model.GROUP_NUM = entity.GROUP_NUM; model.GROUP_INDEX = entity.GROUP_INDEX; model.SIGN_VALUE = entity.SIGN_VALUE; model.SHIPMENT_SUB_TYPE = entity.SHIPMENT_SUB_TYPE; model.SHIPMENT_CATEGORY1 = entity.SHIPMENT_CATEGORY1; model.SHIPMENT_CATEGORY2 = entity.SHIPMENT_CATEGORY2; model.SHIPMENT_CATEGORY3 = entity.SHIPMENT_CATEGORY3; model.SHIPMENT_CATEGORY4 = entity.SHIPMENT_CATEGORY4; model.SHIPMENT_CATEGORY5 = entity.SHIPMENT_CATEGORY5; model.SHIPMENT_CATEGORY6 = entity.SHIPMENT_CATEGORY6; model.SHIPMENT_CATEGORY7 = entity.SHIPMENT_CATEGORY7; model.SHIPMENT_CATEGORY8 = entity.SHIPMENT_CATEGORY8; model.UPLOAD_INTERFACE_FLAG = entity.UPLOAD_INTERFACE_FLAG; model.TOTAL_VALUE = entity.TOTAL_VALUE; model.SHIPMENT_NOTE = entity.SHIPMENT_NOTE; model.STOP_SEQ = entity.STOP_SEQ; model.CREATE_DATE_TIME = entity.CREATE_DATE_TIME; model.CREATE_USER = entity.CREATE_USER; model.COD_REQUIRED = entity.COD_REQUIRED; model.COD_VALUE = entity.COD_VALUE; model.DEIVERY_WINDOW = entity.DEIVERY_WINDOW; model.ALLOW_CONSOLIDATE = entity.ALLOW_CONSOLIDATE; model.CONSOLIDATED = entity.CONSOLIDATED; model.INVOICE_REQUIRED = entity.INVOICE_REQUIRED; model.INTERNAL_INVOICE_NUM = entity.INTERNAL_INVOICE_NUM; model.HOST_COMPANY = entity.HOST_COMPANY; model.UPLOAD_INTERFACE_DATE_TIME = entity.UPLOAD_INTERFACE_DATE_TIME; model.UPLOAD_INTERFACE_REQUIRED = entity.UPLOAD_INTERFACE_REQUIRED; model.SO_OPERATOR = entity.SO_OPERATOR; model.SO_OPERATOR_PHONE_NUM = entity.SO_OPERATOR_PHONE_NUM; model.SO_EMAIL_ADDRESS = entity.SO_EMAIL_ADDRESS; model.STATUS_FLOW = entity.STATUS_FLOW; model.ITF_USERDEF1 = entity.ITF_USERDEF1; model.ITF_USERDEF2 = entity.ITF_USERDEF2; model.ITF_USERDEF3 = entity.ITF_USERDEF3; model.ITF_USERDEF4 = entity.ITF_USERDEF4; model.ITF_USERDEF5 = entity.ITF_USERDEF5; model.ITF_USERDEF6 = entity.ITF_USERDEF6; model.ITF_USERDEF7 = entity.ITF_USERDEF7; model.ITF_USERDEF8 = entity.ITF_USERDEF8; return(model); } else { return(null); } }
public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.SHIPMENT.SHIPMENT_HEADER_TEMP_MODEL model) { Apps.Models.SHIPMENT_HEADER_TEMP entity = m_Rep.GetById(model.INTERNAL_SHIPMENT_NUM); if (entity != null) { errors.Add(Resource.PrimaryRepeat); return; } entity = new Apps.Models.SHIPMENT_HEADER_TEMP(); entity.INTERNAL_SHIPMENT_NUM = model.INTERNAL_SHIPMENT_NUM; entity.FLAG = model.FLAG; entity.CODE = model.CODE; entity.MESSAGE = model.MESSAGE; entity.WAREHOUSE = model.WAREHOUSE; entity.COMPANY = model.COMPANY; entity.INTERNAL_LOAD_NUM = model.INTERNAL_LOAD_NUM; entity.SHIPMENT_ID = model.SHIPMENT_ID; entity.ERP_ORDER = model.ERP_ORDER; entity.LEADING_STS = model.LEADING_STS; entity.TRAILING_STS = model.TRAILING_STS; entity.SHIPMENT_TYPE = model.SHIPMENT_TYPE; entity.ROUTE = model.ROUTE; entity.SHIP_TO = model.SHIP_TO; entity.SHIP_TO_NAME = model.SHIP_TO_NAME; entity.SHIP_TO_ADDRESS1 = model.SHIP_TO_ADDRESS1; entity.SHIP_TO_ADDRESS2 = model.SHIP_TO_ADDRESS2; entity.SHIP_TO_DISTRICT = model.SHIP_TO_DISTRICT; entity.SHIP_TO_CITY = model.SHIP_TO_CITY; entity.SHIP_TO_STATE = model.SHIP_TO_STATE; entity.SHIP_TO_COUNTRY = model.SHIP_TO_COUNTRY; entity.SHIP_TO_POSTAL_CODE = model.SHIP_TO_POSTAL_CODE; entity.SHIP_TO_ATTENTION_TO = model.SHIP_TO_ATTENTION_TO; entity.SHIP_TO_PHONE_NUM = model.SHIP_TO_PHONE_NUM; entity.SHIP_TO_MOBILE = model.SHIP_TO_MOBILE; entity.SHIP_TO_FAX_NUM = model.SHIP_TO_FAX_NUM; entity.SHIP_TO_EMAIL_ADDRESS = model.SHIP_TO_EMAIL_ADDRESS; entity.PRIORITY = model.PRIORITY; entity.USER_STAMP = model.USER_STAMP; entity.DATE_TIME_STAMP = model.DATE_TIME_STAMP; entity.REQUESTED_DELIVERY_DATE = model.REQUESTED_DELIVERY_DATE; entity.REQUESTED_DELIVERY_TYPE = model.REQUESTED_DELIVERY_TYPE; entity.SCHEDULED_SHIP_DATE = model.SCHEDULED_SHIP_DATE; entity.ACTUAL_SHIP_DATE_TIME = model.ACTUAL_SHIP_DATE_TIME; entity.ACTUAL_DELIVERY_DATE_TIME = model.ACTUAL_DELIVERY_DATE_TIME; entity.DELIVERY_NOTE = model.DELIVERY_NOTE; entity.REJECTION_NOTE = model.REJECTION_NOTE; entity.INTERNAL_WAVE_NUM = model.INTERNAL_WAVE_NUM; entity.SHIP_DOCK = model.SHIP_DOCK; entity.ALLOCATE_COMPLETE = model.ALLOCATE_COMPLETE; entity.TOTAL_WEIGHT = model.TOTAL_WEIGHT; entity.WEIGHT_UM = model.WEIGHT_UM; entity.TOTAL_VOLUME = model.TOTAL_VOLUME; entity.VOLUME_UM = model.VOLUME_UM; entity.TOTAL_LINES = model.TOTAL_LINES; entity.TOTAL_CONTAINERS = model.TOTAL_CONTAINERS; entity.CARRIER = model.CARRIER; entity.CARRIER_SERVICE = model.CARRIER_SERVICE; entity.USER_DEF1 = model.USER_DEF1; entity.USER_DEF2 = model.USER_DEF2; entity.USER_DEF3 = model.USER_DEF3; entity.USER_DEF4 = model.USER_DEF4; entity.USER_DEF5 = model.USER_DEF5; entity.USER_DEF6 = model.USER_DEF6; entity.USER_DEF7 = model.USER_DEF7; entity.USER_DEF8 = model.USER_DEF8; entity.USER_DEF9 = model.USER_DEF9; entity.USER_DEF10 = model.USER_DEF10; entity.BACK_ORDER_NUM = model.BACK_ORDER_NUM; entity.PROCESS_TYPE = model.PROCESS_TYPE; entity.TOTAL_QTY = model.TOTAL_QTY; entity.LAST_WAVE_NUM = model.LAST_WAVE_NUM; entity.GROUP_NUM = model.GROUP_NUM; entity.GROUP_INDEX = model.GROUP_INDEX; entity.SIGN_VALUE = model.SIGN_VALUE; entity.SHIPMENT_SUB_TYPE = model.SHIPMENT_SUB_TYPE; entity.SHIPMENT_CATEGORY1 = model.SHIPMENT_CATEGORY1; entity.SHIPMENT_CATEGORY2 = model.SHIPMENT_CATEGORY2; entity.SHIPMENT_CATEGORY3 = model.SHIPMENT_CATEGORY3; entity.SHIPMENT_CATEGORY4 = model.SHIPMENT_CATEGORY4; entity.SHIPMENT_CATEGORY5 = model.SHIPMENT_CATEGORY5; entity.SHIPMENT_CATEGORY6 = model.SHIPMENT_CATEGORY6; entity.SHIPMENT_CATEGORY7 = model.SHIPMENT_CATEGORY7; entity.SHIPMENT_CATEGORY8 = model.SHIPMENT_CATEGORY8; entity.UPLOAD_INTERFACE_FLAG = model.UPLOAD_INTERFACE_FLAG; entity.TOTAL_VALUE = model.TOTAL_VALUE; entity.SHIPMENT_NOTE = model.SHIPMENT_NOTE; entity.STOP_SEQ = model.STOP_SEQ; entity.CREATE_DATE_TIME = model.CREATE_DATE_TIME; entity.CREATE_USER = model.CREATE_USER; entity.COD_REQUIRED = model.COD_REQUIRED; entity.COD_VALUE = model.COD_VALUE; entity.DEIVERY_WINDOW = model.DEIVERY_WINDOW; entity.ALLOW_CONSOLIDATE = model.ALLOW_CONSOLIDATE; entity.CONSOLIDATED = model.CONSOLIDATED; entity.INVOICE_REQUIRED = model.INVOICE_REQUIRED; entity.INTERNAL_INVOICE_NUM = model.INTERNAL_INVOICE_NUM; entity.HOST_COMPANY = model.HOST_COMPANY; entity.UPLOAD_INTERFACE_DATE_TIME = model.UPLOAD_INTERFACE_DATE_TIME; entity.UPLOAD_INTERFACE_REQUIRED = model.UPLOAD_INTERFACE_REQUIRED; entity.SO_OPERATOR = model.SO_OPERATOR; entity.SO_OPERATOR_PHONE_NUM = model.SO_OPERATOR_PHONE_NUM; entity.SO_EMAIL_ADDRESS = model.SO_EMAIL_ADDRESS; entity.STATUS_FLOW = model.STATUS_FLOW; entity.ITF_USERDEF1 = model.ITF_USERDEF1; entity.ITF_USERDEF2 = model.ITF_USERDEF2; entity.ITF_USERDEF3 = model.ITF_USERDEF3; entity.ITF_USERDEF4 = model.ITF_USERDEF4; entity.ITF_USERDEF5 = model.ITF_USERDEF5; entity.ITF_USERDEF6 = model.ITF_USERDEF6; entity.ITF_USERDEF7 = model.ITF_USERDEF7; entity.ITF_USERDEF8 = model.ITF_USERDEF8; m_Rep.Create(entity); }