public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.LOCATING.LOCATING_RULE_HEADER_MODEL model, params string[] updateProperties)
        {
            Apps.Models.LOCATING_RULE_HEADER 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.DESCRIPTION   = model.DESCRIPTION;
                entity.ACTIVE        = model.ACTIVE;
                entity.OBJECT_ID     = model.OBJECT_ID;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.LOCATING.LOCATING_RULE_HEADER_MODEL);
                Type typeE = typeof(Apps.Models.LOCATING_RULE_HEADER);
                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_HEADER_MODEL model)
        {
            Apps.Models.LOCATING_RULE_HEADER entity = m_Rep.GetById(model.LOCATING_RULE);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.LOCATING_RULE_HEADER();
            entity.LOCATING_RULE = model.LOCATING_RULE;
            entity.DESCRIPTION   = model.DESCRIPTION;
            entity.ACTIVE        = model.ACTIVE;
            entity.OBJECT_ID     = model.OBJECT_ID;

            m_Rep.Create(entity);
        }
        public virtual Apps.Models.SCV.LOCATING.LOCATING_RULE_HEADER_MODEL GetById(string id)
        {
            Apps.Models.LOCATING_RULE_HEADER entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //LOCATING_RULE_HEADER entity = m_Rep.GetById(id);
                Apps.Models.SCV.LOCATING.LOCATING_RULE_HEADER_MODEL model = new Apps.Models.SCV.LOCATING.LOCATING_RULE_HEADER_MODEL();
                model.LOCATING_RULE = entity.LOCATING_RULE;
                model.DESCRIPTION   = entity.DESCRIPTION;
                model.ACTIVE        = entity.ACTIVE;
                model.OBJECT_ID     = entity.OBJECT_ID;

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