public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.LOCATING.LOCATING_RULE_DETAIL_MODEL model, params string[] updateProperties)
        {
            Apps.Models.LOCATING_RULE_DETAIL entity = m_Rep.GetById(model.LOCATING_RULE);
            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.LOCATING_RULE = model.LOCATING_RULE;
                entity.QUANTITY_UM   = model.QUANTITY_UM;
                entity.SEQUENCE      = model.SEQUENCE;
                entity.STRATEGY      = model.STRATEGY;
                entity.LOC_SEL_ID    = model.LOC_SEL_ID;
                entity.LOC_SEL_NAME  = model.LOC_SEL_NAME;
                entity.SPLIT_QTY     = model.SPLIT_QTY;
                entity.OBJECT_ID     = model.OBJECT_ID;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.LOCATING.LOCATING_RULE_DETAIL_MODEL);
                Type typeE = typeof(Apps.Models.LOCATING_RULE_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);
        }
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.LOCATING.LOCATING_RULE_DETAIL_MODEL model)
        {
            Apps.Models.LOCATING_RULE_DETAIL entity = m_Rep.GetById(model.LOCATING_RULE);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.LOCATING_RULE_DETAIL();
            entity.LOCATING_RULE = model.LOCATING_RULE;
            entity.QUANTITY_UM   = model.QUANTITY_UM;
            entity.SEQUENCE      = model.SEQUENCE;
            entity.STRATEGY      = model.STRATEGY;
            entity.LOC_SEL_ID    = model.LOC_SEL_ID;
            entity.LOC_SEL_NAME  = model.LOC_SEL_NAME;
            entity.SPLIT_QTY     = model.SPLIT_QTY;
            entity.OBJECT_ID     = model.OBJECT_ID;

            m_Rep.Create(entity);
        }
        public virtual Apps.Models.SCV.LOCATING.LOCATING_RULE_DETAIL_MODEL GetById(string id)
        {
            Apps.Models.LOCATING_RULE_DETAIL entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //LOCATING_RULE_DETAIL entity = m_Rep.GetById(id);
                Apps.Models.SCV.LOCATING.LOCATING_RULE_DETAIL_MODEL model = new Apps.Models.SCV.LOCATING.LOCATING_RULE_DETAIL_MODEL();
                model.LOCATING_RULE = entity.LOCATING_RULE;
                model.QUANTITY_UM   = entity.QUANTITY_UM;
                model.SEQUENCE      = entity.SEQUENCE;
                model.STRATEGY      = entity.STRATEGY;
                model.LOC_SEL_ID    = entity.LOC_SEL_ID;
                model.LOC_SEL_NAME  = entity.LOC_SEL_NAME;
                model.SPLIT_QTY     = entity.SPLIT_QTY;
                model.OBJECT_ID     = entity.OBJECT_ID;

                return(model);
            }
            else
            {
                return(null);
            }
        }