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); }
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); }
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); }