예제 #1
0
        public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.DOWNLOAD.DOWNLOAD_SHIPMENT_HEADER_FAILED_MODEL model, params string[] updateProperties)
        {
            Apps.Models.DOWNLOAD_SHIPMENT_HEADER_FAILED entity = m_Rep.GetById(model.INTERFACE_RECORD_ID);
            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.INTERFACE_RECORD_ID   = model.INTERFACE_RECORD_ID;
                entity.INTERFACE_ACTION_CODE = model.INTERFACE_ACTION_CODE;
                entity.INTERFACE_CONDITION   = model.INTERFACE_CONDITION;
                entity.PROCESS_STAMP         = model.PROCESS_STAMP;
                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.PROCESS_TYPE              = model.PROCESS_TYPE;
                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_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_QTY                 = model.TOTAL_QTY;
                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.BACK_ORDER_NUM            = model.BACK_ORDER_NUM;
                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.SHIP_TO_MOBILE            = model.SHIP_TO_MOBILE;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.DOWNLOAD.DOWNLOAD_SHIPMENT_HEADER_FAILED_MODEL);
                Type typeE = typeof(Apps.Models.DOWNLOAD_SHIPMENT_HEADER_FAILED);
                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);
        }
예제 #2
0
        public virtual Apps.Models.SCV.DOWNLOAD.DOWNLOAD_SHIPMENT_HEADER_FAILED_MODEL GetById(string id)
        {
            Apps.Models.DOWNLOAD_SHIPMENT_HEADER_FAILED entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //DOWNLOAD_SHIPMENT_HEADER_FAILED entity = m_Rep.GetById(id);
                Apps.Models.SCV.DOWNLOAD.DOWNLOAD_SHIPMENT_HEADER_FAILED_MODEL model = new Apps.Models.SCV.DOWNLOAD.DOWNLOAD_SHIPMENT_HEADER_FAILED_MODEL();
                model.INTERFACE_RECORD_ID   = entity.INTERFACE_RECORD_ID;
                model.INTERFACE_ACTION_CODE = entity.INTERFACE_ACTION_CODE;
                model.INTERFACE_CONDITION   = entity.INTERFACE_CONDITION;
                model.PROCESS_STAMP         = entity.PROCESS_STAMP;
                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.PROCESS_TYPE              = entity.PROCESS_TYPE;
                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_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_QTY                 = entity.TOTAL_QTY;
                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.BACK_ORDER_NUM            = entity.BACK_ORDER_NUM;
                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.SHIP_TO_MOBILE            = entity.SHIP_TO_MOBILE;

                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.DOWNLOAD.DOWNLOAD_SHIPMENT_HEADER_FAILED_MODEL model)
        {
            Apps.Models.DOWNLOAD_SHIPMENT_HEADER_FAILED entity = m_Rep.GetById(model.INTERFACE_RECORD_ID);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.DOWNLOAD_SHIPMENT_HEADER_FAILED();
            entity.INTERFACE_RECORD_ID   = model.INTERFACE_RECORD_ID;
            entity.INTERFACE_ACTION_CODE = model.INTERFACE_ACTION_CODE;
            entity.INTERFACE_CONDITION   = model.INTERFACE_CONDITION;
            entity.PROCESS_STAMP         = model.PROCESS_STAMP;
            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.PROCESS_TYPE              = model.PROCESS_TYPE;
            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_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_QTY                 = model.TOTAL_QTY;
            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.BACK_ORDER_NUM            = model.BACK_ORDER_NUM;
            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.SHIP_TO_MOBILE            = model.SHIP_TO_MOBILE;

            m_Rep.Create(entity);
        }