public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.UPLOAD.UPLOAD_SHIPPING_CONTAINER_MODEL model, params string[] updateProperties)
        {
            Apps.Models.UPLOAD_SHIPPING_CONTAINER 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_LINK_ID     = model.INTERFACE_LINK_ID;
                entity.INTERFACE_ACTION_CODE = model.INTERFACE_ACTION_CODE;
                entity.INTERFACE_CONDITION   = model.INTERFACE_CONDITION;
                entity.PROCESS_STAMP         = model.PROCESS_STAMP;
                entity.CONTAINER_ID          = model.CONTAINER_ID;
                entity.SHIPMENT_ID           = model.SHIPMENT_ID;
                entity.WAREHOUSE             = model.WAREHOUSE;
                entity.CONTAINER_TYPE        = model.CONTAINER_TYPE;
                entity.CONTAINER_CLASS       = model.CONTAINER_CLASS;
                entity.STATUS                     = model.STATUS;
                entity.PARENT                     = model.PARENT;
                entity.WEIGHT                     = model.WEIGHT;
                entity.WEIGHT_UM                  = model.WEIGHT_UM;
                entity.VOLUME                     = model.VOLUME;
                entity.LENGTH                     = model.LENGTH;
                entity.WIDTH                      = model.WIDTH;
                entity.HEIGHT                     = model.HEIGHT;
                entity.DIMENSION_UM               = model.DIMENSION_UM;
                entity.VOLUME_UM                  = model.VOLUME_UM;
                entity.VALUE                      = model.VALUE;
                entity.INTERNAL_SHIPMENT_NUM      = model.INTERNAL_SHIPMENT_NUM;
                entity.INTERNAL_SHIPMENT_LINE_NUM = model.INTERNAL_SHIPMENT_LINE_NUM;
                entity.COMPANY                    = model.COMPANY;
                entity.ITEM                    = model.ITEM;
                entity.QUANTITY                = model.QUANTITY;
                entity.QUANTITY_UM             = model.QUANTITY_UM;
                entity.TRACKING_NUMBER         = model.TRACKING_NUMBER;
                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_STAMP              = model.USER_STAMP;
                entity.DATE_TIME_STAMP         = model.DATE_TIME_STAMP;
                entity.GROUP_POSITION          = model.GROUP_POSITION;
                entity.INTERNAL_WAVE_NUM       = model.INTERNAL_WAVE_NUM;
                entity.CONTAINER_COUNT_NUMBER  = model.CONTAINER_COUNT_NUMBER;
                entity.CONTAINER_COUNT_TOTAL   = model.CONTAINER_COUNT_TOTAL;
                entity.GROUP_NUM               = model.GROUP_NUM;
                entity.PARENT_CONTAINER_ID     = model.PARENT_CONTAINER_ID;
                entity.INTERNAL_SHIP_ALLOC_NUM = model.INTERNAL_SHIP_ALLOC_NUM;
                entity.TASK_CREATED            = model.TASK_CREATED;
                entity.ATTRIBUTE_NUM           = model.ATTRIBUTE_NUM;
                entity.ORIGINAL_PICK_LOC       = model.ORIGINAL_PICK_LOC;
                entity.ATTRIBUTE1              = model.ATTRIBUTE1;
                entity.ATTRIBUTE2              = model.ATTRIBUTE2;
                entity.ATTRIBUTE3              = model.ATTRIBUTE3;
                entity.ATTRIBUTE4              = model.ATTRIBUTE4;
                entity.ATTRIBUTE5              = model.ATTRIBUTE5;
                entity.ATTRIBUTE6              = model.ATTRIBUTE6;
                entity.ATTRIBUTE7              = model.ATTRIBUTE7;
                entity.ATTRIBUTE8              = model.ATTRIBUTE8;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.UPLOAD.UPLOAD_SHIPPING_CONTAINER_MODEL);
                Type typeE = typeof(Apps.Models.UPLOAD_SHIPPING_CONTAINER);
                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.UPLOAD.UPLOAD_SHIPPING_CONTAINER_MODEL GetById(string id)
        {
            Apps.Models.UPLOAD_SHIPPING_CONTAINER entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //UPLOAD_SHIPPING_CONTAINER entity = m_Rep.GetById(id);
                Apps.Models.SCV.UPLOAD.UPLOAD_SHIPPING_CONTAINER_MODEL model = new Apps.Models.SCV.UPLOAD.UPLOAD_SHIPPING_CONTAINER_MODEL();
                model.INTERFACE_RECORD_ID   = entity.INTERFACE_RECORD_ID;
                model.INTERFACE_LINK_ID     = entity.INTERFACE_LINK_ID;
                model.INTERFACE_ACTION_CODE = entity.INTERFACE_ACTION_CODE;
                model.INTERFACE_CONDITION   = entity.INTERFACE_CONDITION;
                model.PROCESS_STAMP         = entity.PROCESS_STAMP;
                model.CONTAINER_ID          = entity.CONTAINER_ID;
                model.SHIPMENT_ID           = entity.SHIPMENT_ID;
                model.WAREHOUSE             = entity.WAREHOUSE;
                model.CONTAINER_TYPE        = entity.CONTAINER_TYPE;
                model.CONTAINER_CLASS       = entity.CONTAINER_CLASS;
                model.STATUS                     = entity.STATUS;
                model.PARENT                     = entity.PARENT;
                model.WEIGHT                     = entity.WEIGHT;
                model.WEIGHT_UM                  = entity.WEIGHT_UM;
                model.VOLUME                     = entity.VOLUME;
                model.LENGTH                     = entity.LENGTH;
                model.WIDTH                      = entity.WIDTH;
                model.HEIGHT                     = entity.HEIGHT;
                model.DIMENSION_UM               = entity.DIMENSION_UM;
                model.VOLUME_UM                  = entity.VOLUME_UM;
                model.VALUE                      = entity.VALUE;
                model.INTERNAL_SHIPMENT_NUM      = entity.INTERNAL_SHIPMENT_NUM;
                model.INTERNAL_SHIPMENT_LINE_NUM = entity.INTERNAL_SHIPMENT_LINE_NUM;
                model.COMPANY                    = entity.COMPANY;
                model.ITEM                    = entity.ITEM;
                model.QUANTITY                = entity.QUANTITY;
                model.QUANTITY_UM             = entity.QUANTITY_UM;
                model.TRACKING_NUMBER         = entity.TRACKING_NUMBER;
                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_STAMP              = entity.USER_STAMP;
                model.DATE_TIME_STAMP         = entity.DATE_TIME_STAMP;
                model.GROUP_POSITION          = entity.GROUP_POSITION;
                model.INTERNAL_WAVE_NUM       = entity.INTERNAL_WAVE_NUM;
                model.CONTAINER_COUNT_NUMBER  = entity.CONTAINER_COUNT_NUMBER;
                model.CONTAINER_COUNT_TOTAL   = entity.CONTAINER_COUNT_TOTAL;
                model.GROUP_NUM               = entity.GROUP_NUM;
                model.PARENT_CONTAINER_ID     = entity.PARENT_CONTAINER_ID;
                model.INTERNAL_SHIP_ALLOC_NUM = entity.INTERNAL_SHIP_ALLOC_NUM;
                model.TASK_CREATED            = entity.TASK_CREATED;
                model.ATTRIBUTE_NUM           = entity.ATTRIBUTE_NUM;
                model.ORIGINAL_PICK_LOC       = entity.ORIGINAL_PICK_LOC;
                model.ATTRIBUTE1              = entity.ATTRIBUTE1;
                model.ATTRIBUTE2              = entity.ATTRIBUTE2;
                model.ATTRIBUTE3              = entity.ATTRIBUTE3;
                model.ATTRIBUTE4              = entity.ATTRIBUTE4;
                model.ATTRIBUTE5              = entity.ATTRIBUTE5;
                model.ATTRIBUTE6              = entity.ATTRIBUTE6;
                model.ATTRIBUTE7              = entity.ATTRIBUTE7;
                model.ATTRIBUTE8              = entity.ATTRIBUTE8;

                return(model);
            }
            else
            {
                return(null);
            }
        }
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.UPLOAD.UPLOAD_SHIPPING_CONTAINER_MODEL model)
        {
            Apps.Models.UPLOAD_SHIPPING_CONTAINER entity = m_Rep.GetById(model.INTERFACE_RECORD_ID);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.UPLOAD_SHIPPING_CONTAINER();
            entity.INTERFACE_RECORD_ID   = model.INTERFACE_RECORD_ID;
            entity.INTERFACE_LINK_ID     = model.INTERFACE_LINK_ID;
            entity.INTERFACE_ACTION_CODE = model.INTERFACE_ACTION_CODE;
            entity.INTERFACE_CONDITION   = model.INTERFACE_CONDITION;
            entity.PROCESS_STAMP         = model.PROCESS_STAMP;
            entity.CONTAINER_ID          = model.CONTAINER_ID;
            entity.SHIPMENT_ID           = model.SHIPMENT_ID;
            entity.WAREHOUSE             = model.WAREHOUSE;
            entity.CONTAINER_TYPE        = model.CONTAINER_TYPE;
            entity.CONTAINER_CLASS       = model.CONTAINER_CLASS;
            entity.STATUS                     = model.STATUS;
            entity.PARENT                     = model.PARENT;
            entity.WEIGHT                     = model.WEIGHT;
            entity.WEIGHT_UM                  = model.WEIGHT_UM;
            entity.VOLUME                     = model.VOLUME;
            entity.LENGTH                     = model.LENGTH;
            entity.WIDTH                      = model.WIDTH;
            entity.HEIGHT                     = model.HEIGHT;
            entity.DIMENSION_UM               = model.DIMENSION_UM;
            entity.VOLUME_UM                  = model.VOLUME_UM;
            entity.VALUE                      = model.VALUE;
            entity.INTERNAL_SHIPMENT_NUM      = model.INTERNAL_SHIPMENT_NUM;
            entity.INTERNAL_SHIPMENT_LINE_NUM = model.INTERNAL_SHIPMENT_LINE_NUM;
            entity.COMPANY                    = model.COMPANY;
            entity.ITEM                    = model.ITEM;
            entity.QUANTITY                = model.QUANTITY;
            entity.QUANTITY_UM             = model.QUANTITY_UM;
            entity.TRACKING_NUMBER         = model.TRACKING_NUMBER;
            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_STAMP              = model.USER_STAMP;
            entity.DATE_TIME_STAMP         = model.DATE_TIME_STAMP;
            entity.GROUP_POSITION          = model.GROUP_POSITION;
            entity.INTERNAL_WAVE_NUM       = model.INTERNAL_WAVE_NUM;
            entity.CONTAINER_COUNT_NUMBER  = model.CONTAINER_COUNT_NUMBER;
            entity.CONTAINER_COUNT_TOTAL   = model.CONTAINER_COUNT_TOTAL;
            entity.GROUP_NUM               = model.GROUP_NUM;
            entity.PARENT_CONTAINER_ID     = model.PARENT_CONTAINER_ID;
            entity.INTERNAL_SHIP_ALLOC_NUM = model.INTERNAL_SHIP_ALLOC_NUM;
            entity.TASK_CREATED            = model.TASK_CREATED;
            entity.ATTRIBUTE_NUM           = model.ATTRIBUTE_NUM;
            entity.ORIGINAL_PICK_LOC       = model.ORIGINAL_PICK_LOC;
            entity.ATTRIBUTE1              = model.ATTRIBUTE1;
            entity.ATTRIBUTE2              = model.ATTRIBUTE2;
            entity.ATTRIBUTE3              = model.ATTRIBUTE3;
            entity.ATTRIBUTE4              = model.ATTRIBUTE4;
            entity.ATTRIBUTE5              = model.ATTRIBUTE5;
            entity.ATTRIBUTE6              = model.ATTRIBUTE6;
            entity.ATTRIBUTE7              = model.ATTRIBUTE7;
            entity.ATTRIBUTE8              = model.ATTRIBUTE8;

            m_Rep.Create(entity);
        }