Example #1
0
        public static List <ParkLpPlan> Search_ParkLpPlan(InParams paras, int PageSize, int PageIndex, ref int pagecount)
        {
            IParkLpPlan factory = ParkLpPlanFactory.GetFactory();

            pagecount = factory.Search_ParkLpPlansCount(paras);
            List <ParkLpPlan> list = factory.Search_ParkLpPlans(paras, PageSize, PageIndex);

            return(list);
        }
Example #2
0
 public static IParkLpPlan GetFactory()
 {
     if (factory == null)
     {
         Type type = Type.GetType("Common." + SystemDefaultConfig.DatabaseProvider + "Repository.ParkLpPlanDAL,Common." + SystemDefaultConfig.DatabaseProvider + "Repository", true);
         factory = (IParkLpPlan)Activator.CreateInstance(type);
     }
     return(factory);
 }
Example #3
0
        /// <summary>
        /// 根据派车单ID获取派遣单
        /// </summary>
        /// <param name="PlanID"></param>
        /// <returns></returns>
        public static ParkLpPlan Search_ParkLpPlanByID(string PlanID)
        {
            if (string.IsNullOrWhiteSpace(PlanID))
            {
                throw new ArgumentNullException("PlanID");
            }
            IParkLpPlan factory = ParkLpPlanFactory.GetFactory();
            ParkLpPlan  model   = factory.Search_ParkLpPlanByID(PlanID);

            return(model);
        }
Example #4
0
        public static bool Delete(string PlanID)
        {
            if (string.IsNullOrWhiteSpace(PlanID))
            {
                throw new ArgumentNullException("PlanID");
            }

            IParkLpPlan factory = ParkLpPlanFactory.GetFactory();
            bool        result  = factory.Delete(PlanID);

            if (result)
            {
                OperateLogServices.AddOperateLog(OperateType.Delete, string.Format("recordId:{0}", PlanID));
            }
            return(result);
        }
Example #5
0
        public static bool Update(ParkLpPlan model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            IParkLpPlan factory = ParkLpPlanFactory.GetFactory();
            bool        result  = factory.Update(model);

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

            model.PlanID = GuidGenerator.GetGuid().ToString();
            IParkLpPlan factory = ParkLpPlanFactory.GetFactory();
            bool        result  = factory.Add(model);

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