Example #1
0
        public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.AR.AR_DOWNLOAD_RECEIPT_DETAIL_MODEL model, params string[] updateProperties)
        {
            Apps.Models.AR_DOWNLOAD_RECEIPT_DETAIL 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.RECEIPT_ID            = model.RECEIPT_ID;
                entity.WAREHOUSE             = model.WAREHOUSE;
                entity.COMPANY                   = model.COMPANY;
                entity.ITEM                      = model.ITEM;
                entity.ITEM_DESC                 = model.ITEM_DESC;
                entity.ITEM_CLASS                = model.ITEM_CLASS;
                entity.ATTRIBUTE_TRACK           = model.ATTRIBUTE_TRACK;
                entity.ATTRIBUTE_NUM             = model.ATTRIBUTE_NUM;
                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;
                entity.TOTAL_QTY                 = model.TOTAL_QTY;
                entity.OPEN_QTY                  = model.OPEN_QTY;
                entity.QUANTITY_UM               = model.QUANTITY_UM;
                entity.ERP_ORDER_ID              = model.ERP_ORDER_ID;
                entity.ERP_ORDER_LINE_NUM        = model.ERP_ORDER_LINE_NUM;
                entity.LOCATING_RULE             = model.LOCATING_RULE;
                entity.USER_STAMP                = model.USER_STAMP;
                entity.DATE_TIME_STAMP           = model.DATE_TIME_STAMP;
                entity.INVENTORY_STS             = model.INVENTORY_STS;
                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.ITEM_LIST_PRICE           = model.ITEM_LIST_PRICE;
                entity.ITEM_NET_PRICE            = model.ITEM_NET_PRICE;
                entity.ITEM_CATEGORY01           = model.ITEM_CATEGORY01;
                entity.ITEM_CATEGORY02           = model.ITEM_CATEGORY02;
                entity.ITEM_CATEGORY03           = model.ITEM_CATEGORY03;
                entity.ITEM_CATEGORY04           = model.ITEM_CATEGORY04;
                entity.ITEM_CATEGORY05           = model.ITEM_CATEGORY05;
                entity.ITEM_CATEGORY06           = model.ITEM_CATEGORY06;
                entity.ITEM_CATEGORY07           = model.ITEM_CATEGORY07;
                entity.ITEM_CATEGORY08           = model.ITEM_CATEGORY08;
                entity.CREATE_DATE_TIME          = model.CREATE_DATE_TIME;
                entity.CREATE_USER               = model.CREATE_USER;
                entity.USER_DEF9                 = model.USER_DEF9;
                entity.USER_DEF10                = model.USER_DEF10;
                entity.HOST_ITEM                 = model.HOST_ITEM;
                entity.UPLOAD_INTERFACE_REQUIRED = model.UPLOAD_INTERFACE_REQUIRED;
                entity.HOST_COMPANY              = model.HOST_COMPANY;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.AR.AR_DOWNLOAD_RECEIPT_DETAIL_MODEL);
                Type typeE = typeof(Apps.Models.AR_DOWNLOAD_RECEIPT_DETAIL);
                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);
        }
Example #2
0
        public virtual Apps.Models.SCV.AR.AR_DOWNLOAD_RECEIPT_DETAIL_MODEL GetById(string id)
        {
            Apps.Models.AR_DOWNLOAD_RECEIPT_DETAIL entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //AR_DOWNLOAD_RECEIPT_DETAIL entity = m_Rep.GetById(id);
                Apps.Models.SCV.AR.AR_DOWNLOAD_RECEIPT_DETAIL_MODEL model = new Apps.Models.SCV.AR.AR_DOWNLOAD_RECEIPT_DETAIL_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.RECEIPT_ID            = entity.RECEIPT_ID;
                model.WAREHOUSE             = entity.WAREHOUSE;
                model.COMPANY                   = entity.COMPANY;
                model.ITEM                      = entity.ITEM;
                model.ITEM_DESC                 = entity.ITEM_DESC;
                model.ITEM_CLASS                = entity.ITEM_CLASS;
                model.ATTRIBUTE_TRACK           = entity.ATTRIBUTE_TRACK;
                model.ATTRIBUTE_NUM             = entity.ATTRIBUTE_NUM;
                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;
                model.TOTAL_QTY                 = entity.TOTAL_QTY;
                model.OPEN_QTY                  = entity.OPEN_QTY;
                model.QUANTITY_UM               = entity.QUANTITY_UM;
                model.ERP_ORDER_ID              = entity.ERP_ORDER_ID;
                model.ERP_ORDER_LINE_NUM        = entity.ERP_ORDER_LINE_NUM;
                model.LOCATING_RULE             = entity.LOCATING_RULE;
                model.USER_STAMP                = entity.USER_STAMP;
                model.DATE_TIME_STAMP           = entity.DATE_TIME_STAMP;
                model.INVENTORY_STS             = entity.INVENTORY_STS;
                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.ITEM_LIST_PRICE           = entity.ITEM_LIST_PRICE;
                model.ITEM_NET_PRICE            = entity.ITEM_NET_PRICE;
                model.ITEM_CATEGORY01           = entity.ITEM_CATEGORY01;
                model.ITEM_CATEGORY02           = entity.ITEM_CATEGORY02;
                model.ITEM_CATEGORY03           = entity.ITEM_CATEGORY03;
                model.ITEM_CATEGORY04           = entity.ITEM_CATEGORY04;
                model.ITEM_CATEGORY05           = entity.ITEM_CATEGORY05;
                model.ITEM_CATEGORY06           = entity.ITEM_CATEGORY06;
                model.ITEM_CATEGORY07           = entity.ITEM_CATEGORY07;
                model.ITEM_CATEGORY08           = entity.ITEM_CATEGORY08;
                model.CREATE_DATE_TIME          = entity.CREATE_DATE_TIME;
                model.CREATE_USER               = entity.CREATE_USER;
                model.USER_DEF9                 = entity.USER_DEF9;
                model.USER_DEF10                = entity.USER_DEF10;
                model.HOST_ITEM                 = entity.HOST_ITEM;
                model.UPLOAD_INTERFACE_REQUIRED = entity.UPLOAD_INTERFACE_REQUIRED;
                model.HOST_COMPANY              = entity.HOST_COMPANY;

                return(model);
            }
            else
            {
                return(null);
            }
        }
Example #3
0
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.AR.AR_DOWNLOAD_RECEIPT_DETAIL_MODEL model)
        {
            Apps.Models.AR_DOWNLOAD_RECEIPT_DETAIL entity = m_Rep.GetById(model.INTERFACE_RECORD_ID);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.AR_DOWNLOAD_RECEIPT_DETAIL();
            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.RECEIPT_ID            = model.RECEIPT_ID;
            entity.WAREHOUSE             = model.WAREHOUSE;
            entity.COMPANY                   = model.COMPANY;
            entity.ITEM                      = model.ITEM;
            entity.ITEM_DESC                 = model.ITEM_DESC;
            entity.ITEM_CLASS                = model.ITEM_CLASS;
            entity.ATTRIBUTE_TRACK           = model.ATTRIBUTE_TRACK;
            entity.ATTRIBUTE_NUM             = model.ATTRIBUTE_NUM;
            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;
            entity.TOTAL_QTY                 = model.TOTAL_QTY;
            entity.OPEN_QTY                  = model.OPEN_QTY;
            entity.QUANTITY_UM               = model.QUANTITY_UM;
            entity.ERP_ORDER_ID              = model.ERP_ORDER_ID;
            entity.ERP_ORDER_LINE_NUM        = model.ERP_ORDER_LINE_NUM;
            entity.LOCATING_RULE             = model.LOCATING_RULE;
            entity.USER_STAMP                = model.USER_STAMP;
            entity.DATE_TIME_STAMP           = model.DATE_TIME_STAMP;
            entity.INVENTORY_STS             = model.INVENTORY_STS;
            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.ITEM_LIST_PRICE           = model.ITEM_LIST_PRICE;
            entity.ITEM_NET_PRICE            = model.ITEM_NET_PRICE;
            entity.ITEM_CATEGORY01           = model.ITEM_CATEGORY01;
            entity.ITEM_CATEGORY02           = model.ITEM_CATEGORY02;
            entity.ITEM_CATEGORY03           = model.ITEM_CATEGORY03;
            entity.ITEM_CATEGORY04           = model.ITEM_CATEGORY04;
            entity.ITEM_CATEGORY05           = model.ITEM_CATEGORY05;
            entity.ITEM_CATEGORY06           = model.ITEM_CATEGORY06;
            entity.ITEM_CATEGORY07           = model.ITEM_CATEGORY07;
            entity.ITEM_CATEGORY08           = model.ITEM_CATEGORY08;
            entity.CREATE_DATE_TIME          = model.CREATE_DATE_TIME;
            entity.CREATE_USER               = model.CREATE_USER;
            entity.USER_DEF9                 = model.USER_DEF9;
            entity.USER_DEF10                = model.USER_DEF10;
            entity.HOST_ITEM                 = model.HOST_ITEM;
            entity.UPLOAD_INTERFACE_REQUIRED = model.UPLOAD_INTERFACE_REQUIRED;
            entity.HOST_COMPANY              = model.HOST_COMPANY;

            m_Rep.Create(entity);
        }