public AboutViewModel() { HistoryDAL objHistoryDAL = new HistoryDAL(); EmployeeDAL objEmployeeDAL = new EmployeeDAL(); _Histories = objHistoryDAL.GetAllHistories(); _Employees = objEmployeeDAL.GetEmployees(); }
/// <summary> /// 判断用户存在未完成的订单 /// </summary> /// <param name="username"></param> /// <returns></returns> public bool IsNoPayOrder(string username) { int i = new HistoryDAL().IsNoPayOrder(username); if (i != 0) { return(true); } return(false); }
/// <summary> /// 更新position /// </summary> /// <param name="Posintion"></param> /// <param name="hid"></param> /// <returns></returns> public bool UpdateParkPosition(string Posintion, int hid) { int i = new HistoryDAL().UpdateParkPosition(Posintion, hid.ToString()); if (i != 1) { return(true); } return(false); }
/// <summary> /// 保存订单 返回true为失败 /// </summary> /// <param name="his"></param> /// <returns></returns> public bool SaveHistory(History his) { int e = new HistoryDAL().SaveHistory(his); if (e != 1) { return(true); } return(false); }
public HistoryBLL FindHistoryByID(int HistoryID) { HistoryBLL ProposedReturnValue = null; HistoryDAL DataLayerObject = _context.FindHistoryByID(HistoryID); if (null != DataLayerObject) { ProposedReturnValue = new HistoryBLL(DataLayerObject); } return(ProposedReturnValue); }
//private readonly string _controllerNamespace; //public CustomControllerFactory(string controllerNamespace) //{ // _controllerNamespace = controllerNamespace; //} //public CustomControllerFactory() //{ //} public override IController CreateController(System.Web.Routing.RequestContext requestContext, string controllerName) { IController controller = null; dynamic service = null; switch (controllerName) { case "Services": { service = new ServicesDAL(); break; } case "Histories": { service = new HistoryDAL(); break; } case "Employees": { service = new EmployeeDAL(); break; } } Type controllerType = GetControllerType(requestContext, controllerName); if (service != null) { controller = Activator.CreateInstance(controllerType, new[] { service }) as Controller; } else { controller = Activator.CreateInstance(controllerType) as Controller; } return(controller); }
public override IController CreateController(System.Web.Routing.RequestContext requestContext, string controllerName) { IController controller = null; dynamic obj = null; switch (controllerName) { case "Services": { obj = new ServicesDAL(); break; } case "Histories": { obj = new HistoryDAL(); break; } case "Employees": { obj = new EmployeeDAL(); break; } case "AboutClinic": { obj = new AboutClinicDAL(); break; } case "Testimonial": { obj = new TestimonialsDAL(); break; } case "GalleryAdmin": { obj = new GalleryDAL(); break; } case "Gallery": { obj = new GalleryDAL(); break; } case "AdminPartial": { obj = new PartialPagesDAL(); break; } } Type controllerType = GetControllerType(requestContext, controllerName); if (obj != null) { controller = Activator.CreateInstance(controllerType, new[] { obj }) as Controller; } else { controller = Activator.CreateInstance(controllerType) as Controller; } return(controller); }
public HistoryBLL() { this.historyDAL = new HistoryDAL(); }
/// <summary> /// Retorna as compras efetuadas por cliente /// </summary> /// <returns></returns> public List <History> ListarPorId(String clientId) { HistoryDAL dal = new HistoryDAL(); return(dal.ListarPorId(clientId)); }
/// <summary> /// Retorna as compras efetuadas /// </summary> /// <returns></returns> public List <History> Listar() { HistoryDAL dal = new HistoryDAL(); return(dal.Listar()); }
/// <summary> /// Insere histórico /// </summary> /// <param name="history"></param> public void Inserir(History history) { HistoryDAL dal = new HistoryDAL(); dal.Inserir(history); }