public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.WORK.WORK_OPTION_MODEL model, params string[] updateProperties)
        {
            Apps.Models.WORK_OPTION entity = m_Rep.GetById(model.INTERNAL_NUM);
            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.INTERNAL_NUM          = model.INTERNAL_NUM;
                entity.ITEM                  = model.ITEM;
                entity.USER_NAME             = model.USER_NAME;
                entity.WORK_TYPE             = model.WORK_TYPE;
                entity.ZONE                  = model.ZONE;
                entity.COMPANY               = model.COMPANY;
                entity.VERIFY_ITEM           = model.VERIFY_ITEM;
                entity.VERIFY_LOCATION       = model.VERIFY_LOCATION;
                entity.VERIFY_QUANTITY       = model.VERIFY_QUANTITY;
                entity.VERIFY_SHIP_CONT      = model.VERIFY_SHIP_CONT;
                entity.VERIFY_LPN            = model.VERIFY_LPN;
                entity.MAXIMUM_PICKUP_QTY    = model.MAXIMUM_PICKUP_QTY;
                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.ALLOW_OVERPICK        = model.ALLOW_OVERPICK;
                entity.CLOSE_AFTER_PARTIAL   = model.CLOSE_AFTER_PARTIAL;
                entity.ALLOW_PICK_INTRANSIT  = model.ALLOW_PICK_INTRANSIT;
                entity.ALLOW_SHIP_CONT_SPLIT = model.ALLOW_SHIP_CONT_SPLIT;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.WORK.WORK_OPTION_MODEL);
                Type typeE = typeof(Apps.Models.WORK_OPTION);
                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.WORK.WORK_OPTION_MODEL GetById(string id)
        {
            Apps.Models.WORK_OPTION entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //WORK_OPTION entity = m_Rep.GetById(id);
                Apps.Models.SCV.WORK.WORK_OPTION_MODEL model = new Apps.Models.SCV.WORK.WORK_OPTION_MODEL();
                model.INTERNAL_NUM          = entity.INTERNAL_NUM;
                model.ITEM                  = entity.ITEM;
                model.USER_NAME             = entity.USER_NAME;
                model.WORK_TYPE             = entity.WORK_TYPE;
                model.ZONE                  = entity.ZONE;
                model.COMPANY               = entity.COMPANY;
                model.VERIFY_ITEM           = entity.VERIFY_ITEM;
                model.VERIFY_LOCATION       = entity.VERIFY_LOCATION;
                model.VERIFY_QUANTITY       = entity.VERIFY_QUANTITY;
                model.VERIFY_SHIP_CONT      = entity.VERIFY_SHIP_CONT;
                model.VERIFY_LPN            = entity.VERIFY_LPN;
                model.MAXIMUM_PICKUP_QTY    = entity.MAXIMUM_PICKUP_QTY;
                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.ALLOW_OVERPICK        = entity.ALLOW_OVERPICK;
                model.CLOSE_AFTER_PARTIAL   = entity.CLOSE_AFTER_PARTIAL;
                model.ALLOW_PICK_INTRANSIT  = entity.ALLOW_PICK_INTRANSIT;
                model.ALLOW_SHIP_CONT_SPLIT = entity.ALLOW_SHIP_CONT_SPLIT;

                return(model);
            }
            else
            {
                return(null);
            }
        }
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.WORK.WORK_OPTION_MODEL model)
        {
            Apps.Models.WORK_OPTION entity = m_Rep.GetById(model.INTERNAL_NUM);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.WORK_OPTION();
            entity.INTERNAL_NUM          = model.INTERNAL_NUM;
            entity.ITEM                  = model.ITEM;
            entity.USER_NAME             = model.USER_NAME;
            entity.WORK_TYPE             = model.WORK_TYPE;
            entity.ZONE                  = model.ZONE;
            entity.COMPANY               = model.COMPANY;
            entity.VERIFY_ITEM           = model.VERIFY_ITEM;
            entity.VERIFY_LOCATION       = model.VERIFY_LOCATION;
            entity.VERIFY_QUANTITY       = model.VERIFY_QUANTITY;
            entity.VERIFY_SHIP_CONT      = model.VERIFY_SHIP_CONT;
            entity.VERIFY_LPN            = model.VERIFY_LPN;
            entity.MAXIMUM_PICKUP_QTY    = model.MAXIMUM_PICKUP_QTY;
            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.ALLOW_OVERPICK        = model.ALLOW_OVERPICK;
            entity.CLOSE_AFTER_PARTIAL   = model.CLOSE_AFTER_PARTIAL;
            entity.ALLOW_PICK_INTRANSIT  = model.ALLOW_PICK_INTRANSIT;
            entity.ALLOW_SHIP_CONT_SPLIT = model.ALLOW_SHIP_CONT_SPLIT;

            m_Rep.Create(entity);
        }