public virtual void Modify(ref ValidationErrors errors, Apps.Models.Spl.Spl_ProductCategoryModel model, params string[] updateProperties)
        {
            Spl_ProductCategory entity = m_Rep.GetById(model.Id);

            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.Id         = model.Id;
                entity.Name       = model.Name;
                entity.CreateTime = model.CreateTime;
                entity.CreateBy   = model.CreateBy;
            }
            else
            {
                Type type  = typeof(Apps.Models.Spl.Spl_ProductCategoryModel);
                Type typeE = typeof(Apps.Models.Spl_ProductCategory);
                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.Spl.Spl_ProductCategoryModel model)
        {
            Spl_ProductCategory entity = m_Rep.GetById(model.Id);

            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity            = new Spl_ProductCategory();
            entity.Id         = model.Id;
            entity.Name       = model.Name;
            entity.CreateTime = model.CreateTime;
            entity.CreateBy   = model.CreateBy;

            m_Rep.Create(entity);
        }
        public virtual Apps.Models.Spl.Spl_ProductCategoryModel GetById(string id)
        {
            Spl_ProductCategory entity = m_Rep.GetById(id);

            if (entity != null)
            {
                //Spl_ProductCategory entity = m_Rep.GetById(id);
                Apps.Models.Spl.Spl_ProductCategoryModel model = new Apps.Models.Spl.Spl_ProductCategoryModel();
                model.Id         = entity.Id;
                model.Name       = entity.Name;
                model.CreateTime = entity.CreateTime;
                model.CreateBy   = entity.CreateBy;

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