Ejemplo n.º 1
0
        public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.TASK.TASK_DETAIL_MODEL model, params string[] updateProperties)
        {
            Apps.Models.TASK_DETAIL entity = m_Rep.GetById(model.INTERNAL_TASK_LINE_NUM);
            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.INTERNAL_TASK_LINE_NUM = model.INTERNAL_TASK_LINE_NUM;
                entity.INTERNAL_TASK_NUM      = model.INTERNAL_TASK_NUM;
                entity.TASK_ID            = model.TASK_ID;
                entity.TASK_TYPE          = model.TASK_TYPE;
                entity.WAREHOUSE          = model.WAREHOUSE;
                entity.COMPANY            = model.COMPANY;
                entity.ITEM               = model.ITEM;
                entity.ITEM_DESC          = model.ITEM_DESC;
                entity.TOTAL_QTY          = model.TOTAL_QTY;
                entity.FROM_QTY           = model.FROM_QTY;
                entity.TO_QTY             = model.TO_QTY;
                entity.QUANTITY_UM        = model.QUANTITY_UM;
                entity.FROM_LOC           = model.FROM_LOC;
                entity.TO_LOC             = model.TO_LOC;
                entity.FROM_LPN           = model.FROM_LPN;
                entity.TO_LPN             = model.TO_LPN;
                entity.ATTRIBUTE_NUM      = model.ATTRIBUTE_NUM;
                entity.CONDITION          = model.CONDITION;
                entity.REFERENCE_ID       = model.REFERENCE_ID;
                entity.REFERENCE_NUM      = model.REFERENCE_NUM;
                entity.REFERENCE_NUM_TYPE = model.REFERENCE_NUM_TYPE;
                entity.REFERENCE_LINE_NUM = model.REFERENCE_LINE_NUM;
                entity.REFERENCE_CONT_ID  = model.REFERENCE_CONT_ID;
                entity.REFERENCE_CONT_NUM = model.REFERENCE_CONT_NUM;
                entity.ASSIGNED_USER      = model.ASSIGNED_USER;
                entity.INTERNAL_TASK_TYPE = model.INTERNAL_TASK_TYPE;
                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.USER_STAMP         = model.USER_STAMP;
                entity.DATE_TIME_STAMP    = model.DATE_TIME_STAMP;
                entity.CURRENT_LOC        = model.CURRENT_LOC;
                entity.CURRENT_LPN        = model.CURRENT_LPN;
                entity.INVENTORY_STS      = model.INVENTORY_STS;
                entity.INTERNAL_WAVE_NUM  = model.INTERNAL_WAVE_NUM;
                entity.REFERENCE_REQ_NUM  = model.REFERENCE_REQ_NUM;
                entity.CONFIRM_USER       = model.CONFIRM_USER;
                entity.PICKING_CART_ID    = model.PICKING_CART_ID;
                entity.TRANS_CONT_ID      = model.TRANS_CONT_ID;
                entity.FROM_ZONE          = model.FROM_ZONE;
                entity.TO_ZONE            = model.TO_ZONE;
                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.PICKING_CART_POS   = model.PICKING_CART_POS;
                entity.PICK_DROP_LOC      = model.PICK_DROP_LOC;
                entity.REBIN_SHORT_QTY    = model.REBIN_SHORT_QTY;
                entity.GROUP_NUM          = model.GROUP_NUM;
                entity.GROUP_POSITION     = model.GROUP_POSITION;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.TASK.TASK_DETAIL_MODEL);
                Type typeE = typeof(Apps.Models.TASK_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);
        }
Ejemplo n.º 2
0
        public virtual Apps.Models.SCV.TASK.TASK_DETAIL_MODEL GetById(string id)
        {
            Apps.Models.TASK_DETAIL entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //TASK_DETAIL entity = m_Rep.GetById(id);
                Apps.Models.SCV.TASK.TASK_DETAIL_MODEL model = new Apps.Models.SCV.TASK.TASK_DETAIL_MODEL();
                model.INTERNAL_TASK_LINE_NUM = entity.INTERNAL_TASK_LINE_NUM;
                model.INTERNAL_TASK_NUM      = entity.INTERNAL_TASK_NUM;
                model.TASK_ID            = entity.TASK_ID;
                model.TASK_TYPE          = entity.TASK_TYPE;
                model.WAREHOUSE          = entity.WAREHOUSE;
                model.COMPANY            = entity.COMPANY;
                model.ITEM               = entity.ITEM;
                model.ITEM_DESC          = entity.ITEM_DESC;
                model.TOTAL_QTY          = entity.TOTAL_QTY;
                model.FROM_QTY           = entity.FROM_QTY;
                model.TO_QTY             = entity.TO_QTY;
                model.QUANTITY_UM        = entity.QUANTITY_UM;
                model.FROM_LOC           = entity.FROM_LOC;
                model.TO_LOC             = entity.TO_LOC;
                model.FROM_LPN           = entity.FROM_LPN;
                model.TO_LPN             = entity.TO_LPN;
                model.ATTRIBUTE_NUM      = entity.ATTRIBUTE_NUM;
                model.CONDITION          = entity.CONDITION;
                model.REFERENCE_ID       = entity.REFERENCE_ID;
                model.REFERENCE_NUM      = entity.REFERENCE_NUM;
                model.REFERENCE_NUM_TYPE = entity.REFERENCE_NUM_TYPE;
                model.REFERENCE_LINE_NUM = entity.REFERENCE_LINE_NUM;
                model.REFERENCE_CONT_ID  = entity.REFERENCE_CONT_ID;
                model.REFERENCE_CONT_NUM = entity.REFERENCE_CONT_NUM;
                model.ASSIGNED_USER      = entity.ASSIGNED_USER;
                model.INTERNAL_TASK_TYPE = entity.INTERNAL_TASK_TYPE;
                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.USER_STAMP         = entity.USER_STAMP;
                model.DATE_TIME_STAMP    = entity.DATE_TIME_STAMP;
                model.CURRENT_LOC        = entity.CURRENT_LOC;
                model.CURRENT_LPN        = entity.CURRENT_LPN;
                model.INVENTORY_STS      = entity.INVENTORY_STS;
                model.INTERNAL_WAVE_NUM  = entity.INTERNAL_WAVE_NUM;
                model.REFERENCE_REQ_NUM  = entity.REFERENCE_REQ_NUM;
                model.CONFIRM_USER       = entity.CONFIRM_USER;
                model.PICKING_CART_ID    = entity.PICKING_CART_ID;
                model.TRANS_CONT_ID      = entity.TRANS_CONT_ID;
                model.FROM_ZONE          = entity.FROM_ZONE;
                model.TO_ZONE            = entity.TO_ZONE;
                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.PICKING_CART_POS   = entity.PICKING_CART_POS;
                model.PICK_DROP_LOC      = entity.PICK_DROP_LOC;
                model.REBIN_SHORT_QTY    = entity.REBIN_SHORT_QTY;
                model.GROUP_NUM          = entity.GROUP_NUM;
                model.GROUP_POSITION     = entity.GROUP_POSITION;

                return(model);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.TASK.TASK_DETAIL_MODEL model)
        {
            Apps.Models.TASK_DETAIL entity = m_Rep.GetById(model.INTERNAL_TASK_LINE_NUM);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.TASK_DETAIL();
            entity.INTERNAL_TASK_LINE_NUM = model.INTERNAL_TASK_LINE_NUM;
            entity.INTERNAL_TASK_NUM      = model.INTERNAL_TASK_NUM;
            entity.TASK_ID            = model.TASK_ID;
            entity.TASK_TYPE          = model.TASK_TYPE;
            entity.WAREHOUSE          = model.WAREHOUSE;
            entity.COMPANY            = model.COMPANY;
            entity.ITEM               = model.ITEM;
            entity.ITEM_DESC          = model.ITEM_DESC;
            entity.TOTAL_QTY          = model.TOTAL_QTY;
            entity.FROM_QTY           = model.FROM_QTY;
            entity.TO_QTY             = model.TO_QTY;
            entity.QUANTITY_UM        = model.QUANTITY_UM;
            entity.FROM_LOC           = model.FROM_LOC;
            entity.TO_LOC             = model.TO_LOC;
            entity.FROM_LPN           = model.FROM_LPN;
            entity.TO_LPN             = model.TO_LPN;
            entity.ATTRIBUTE_NUM      = model.ATTRIBUTE_NUM;
            entity.CONDITION          = model.CONDITION;
            entity.REFERENCE_ID       = model.REFERENCE_ID;
            entity.REFERENCE_NUM      = model.REFERENCE_NUM;
            entity.REFERENCE_NUM_TYPE = model.REFERENCE_NUM_TYPE;
            entity.REFERENCE_LINE_NUM = model.REFERENCE_LINE_NUM;
            entity.REFERENCE_CONT_ID  = model.REFERENCE_CONT_ID;
            entity.REFERENCE_CONT_NUM = model.REFERENCE_CONT_NUM;
            entity.ASSIGNED_USER      = model.ASSIGNED_USER;
            entity.INTERNAL_TASK_TYPE = model.INTERNAL_TASK_TYPE;
            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.USER_STAMP         = model.USER_STAMP;
            entity.DATE_TIME_STAMP    = model.DATE_TIME_STAMP;
            entity.CURRENT_LOC        = model.CURRENT_LOC;
            entity.CURRENT_LPN        = model.CURRENT_LPN;
            entity.INVENTORY_STS      = model.INVENTORY_STS;
            entity.INTERNAL_WAVE_NUM  = model.INTERNAL_WAVE_NUM;
            entity.REFERENCE_REQ_NUM  = model.REFERENCE_REQ_NUM;
            entity.CONFIRM_USER       = model.CONFIRM_USER;
            entity.PICKING_CART_ID    = model.PICKING_CART_ID;
            entity.TRANS_CONT_ID      = model.TRANS_CONT_ID;
            entity.FROM_ZONE          = model.FROM_ZONE;
            entity.TO_ZONE            = model.TO_ZONE;
            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.PICKING_CART_POS   = model.PICKING_CART_POS;
            entity.PICK_DROP_LOC      = model.PICK_DROP_LOC;
            entity.REBIN_SHORT_QTY    = model.REBIN_SHORT_QTY;
            entity.GROUP_NUM          = model.GROUP_NUM;
            entity.GROUP_POSITION     = model.GROUP_POSITION;

            m_Rep.Create(entity);
        }