Exemple #1
0
 public static IPGArea GetFactory()
 {
     if (factory == null)
     {
         Type type = Type.GetType("Common." + SystemDefaultConfig.DatabaseProvider + "Repository.PGAreaDAL,Common." + SystemDefaultConfig.DatabaseProvider + "Repository", true);
         factory = (IPGArea)Activator.CreateInstance(type);
     }
     return(factory);
 }
Exemple #2
0
        public static bool Update(PGArea model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            IPGArea factory = PGAreaFactory.GetFactory();
            bool    result  = factory.Update(model);

            if (result)
            {
                OperateLogServices.AddOperateLog <PGArea>(model, OperateType.Update);
            }
            return(result);
        }
Exemple #3
0
        public static bool Add(PGArea model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            model.AreaID = GuidGenerator.GetGuid().ToString();
            IPGArea factory = PGAreaFactory.GetFactory();
            bool    result  = factory.Add(model);

            if (result)
            {
                OperateLogServices.AddOperateLog <PGArea>(model, OperateType.Add);
            }
            return(result);
        }