public static IAdvanceParking GetFactory() { if (factory == null) { Type type = Type.GetType("Common." + SystemDefaultConfig.DatabaseProvider + "Repository.WeiXin.AdvanceParkingDAL,Common." + SystemDefaultConfig.DatabaseProvider + "Repository", true); factory = (IAdvanceParking)Activator.CreateInstance(type); } return(factory); }
public static bool Add(AdvanceParking model) { if (model == null) { throw new ArgumentNullException("model"); } IAdvanceParking factory = AdvanceParkingFactory.GetFactory(); return(factory.Add(model)); }
public static bool PaySuccess(decimal orderId, string serialNumber, DateTime payTime) { IAdvanceParking factory = AdvanceParkingFactory.GetFactory(); AdvanceParking model = factory.QueryByOrderId(orderId); if (model.OrderState != 0) { throw new MyException("支付状态不正确"); } return(factory.PaySuccess(orderId, serialNumber, payTime)); }
public static List <AdvanceParking> QueryPage(string companyId, string plateNo, DateTime?start, DateTime?end, int pageIndex, int pageSize, out int recordTotalCount) { IAdvanceParking factory = AdvanceParkingFactory.GetFactory(); return(factory.QueryPage(companyId, plateNo, start, end, pageIndex, pageSize, out recordTotalCount)); }
public static bool UpdatePrepayIdById(string prepayId, decimal orderId) { IAdvanceParking factory = AdvanceParkingFactory.GetFactory(); return(factory.UpdatePrepayIdById(prepayId, orderId)); }
public static AdvanceParking QueryByOrderId(decimal orderId) { IAdvanceParking factory = AdvanceParkingFactory.GetFactory(); return(factory.QueryByOrderId(orderId)); }