public ActionResult Create(Orders obj) { OrdersDAO odao = new OrdersDAO(); odao.insert(obj); return(RedirectToAction("Index")); }
public ActionResult Edit(Orders obj) { OrdersDAO odao = new OrdersDAO(); odao.update(obj); return(RedirectToAction("Index")); }
public OrderController() { connectionString = ConfigurationManager.ConnectionStrings["connString"].ConnectionString; string filePath = ConfigurationManager.AppSettings["logPath"]; dataAccess = new OrdersDAO(connectionString, filePath); }
public ActionResult Delete(Orders obj) { OrdersDAO odao = new OrdersDAO(); odao.delete(obj); return(RedirectToAction("Index")); }
public ActionResult Complite(int id) { OrdersDAO odao = new OrdersDAO(); Orders ord = odao.Single(x => x.Id_ord == id); ord.Status = new StatusDAO().Single(x => x._name == "Выполнен").Id; StorageDAO stoDao = new StorageDAO(); Storage add = stoDao.Single(x => x.FK_mat == ord.FK_Mat1); if (add == null) { add = new Storage() { FK_mat = ord.FK_Mat1, Number = ord.Number }; stoDao.insert(add); } else { add.Number += ord.Number; stoDao.update(add); } odao.update(ord); return(RedirectToAction("Index")); }
public DatabaseFacade() { PatientsDAO = new PatientsDAO(); DictionaryDAO = new DictionaryDAO(); EmployeesDAO = new EmployeesDAO(); UserDAO = new UserDAO(); OrderDAO = new OrdersDAO(); ProfilesDAO = new ProfilesDAO(); StudiesDAO = new StudiesDAO(); SamplesDAO = new SamplesDAO(); TestsDAO = new TestsDAO(); VerificationsDAO = new VerificationsDAO(); ResultsDAO = new ResultsDAO(); ResultUnitsDAO = new ResultUnitsDAO(); SessionsDAO = new SessionsDAO(); }
public ActionResult _orders(Busqueda busqueda) { string selectedDB = "sucursal" + Session["defaultDB"]; ResponseList <Order> response = new OrdersDAO().getOrders(selectedDB, busqueda); ViewBag.orders = response.model; return(PartialView()); }
public ActionResult Delete(int id) { OrdersDAO odao = new OrdersDAO(); Orders ord = odao.Select(id); odao.delete(ord); return(RedirectToAction("Index")); }
//constructor public OrdersController() { errorLogPath = ConfigurationManager.AppSettings["errorLogPath"]; connectionString = ConfigurationManager.ConnectionStrings["dataSource"].ConnectionString; _OrdersDAO = new OrdersDAO(connectionString, errorLogPath); _ItemsDAO = new ItemsDAO(connectionString, errorLogPath); Logger.errorLogPath = errorLogPath; }
//Create our connection string public OrderController() { string connectionString = ConfigurationManager.ConnectionStrings["DataSource"].ConnectionString; ordersDAO = new OrdersDAO(connectionString); userDao = new UserDAO(connectionString); pcDAO = new PcDAO(connectionString); }
public ActionResult _detalleOrders(String idOrden) { string selectedDB = "sucursal" + Session["defaultDB"]; ResponseList <DetalleOrder> response = new OrdersDAO().getDetalleOrder(selectedDB, idOrden); ViewBag.detalleOrders = response.model; return(PartialView()); }
// GET: Orders public ActionResult Index() { ViewBag.username = Session["username"]; string selectedDB = "sucursal" + Session["defaultDB"]; ResponseList <CatStatusOrden> responseCat = new OrdersDAO().getCatStatusOrden(selectedDB); ViewBag.catStatusOrden = responseCat.model; return(View()); }
private void addOrderButton_Click(object sender, RoutedEventArgs e) { var addOrderScreen = new AddOrderScreen(); if (addOrderScreen.ShowDialog() == true) { var newOrder = addOrderScreen.NewOrder; OrdersDAO.InsertOrder(newOrder); DisplayOrders(); } }
public Order(int idorder, int idcustomer, int iduser, DateTime datetime, int paymentmethod, float total, float prepaid, int deleted) { this.dao = OrdersDAO.getInstance(); this.orderproducts = new List <OrderProduct>(); this.Idorder = idorder; this.Idcustomer = idcustomer; this.Iduser = iduser; this.Datetime = datetime; this.Paymentmethod = paymentmethod; this.Total = total; this.Prepaid = prepaid; this.Deleted = deleted; }
public ActionResult EditarGuia(string guia, string orden) { try { ordersDAO = new OrdersDAO(); string selectedDB = "sucursal" + Session["defaultDB"]; return(Json(ordersDAO.EditarGuia(selectedDB, guia, orden), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public ActionResult EditarStatus(int idUsuarioOrdenCompra, int idStatusOrdenCompra, string guia) { try { ordersDAO = new OrdersDAO(); string selectedDB = "sucursal" + Session["defaultDB"]; return(Json(ordersDAO.updateStatusOrders(selectedDB, idUsuarioOrdenCompra, idStatusOrdenCompra, guia), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public void loadData() { OrdersDAO dao = new OrdersDAO(); List <Orders> list = new List <Orders>(); try { list = dao.GetAllOrders(frmLogin.AuthorizedUser.Username); } catch (Exception) { throw; } tblOrderHistory.DataSource = list; }
void DisplayOrders() { fetchedOrders = OrdersDAO.GetOrders(); ordersListView.ItemsSource = fetchedOrders; if (fetchedOrders.Count != 0) { orderToShow = fetchedOrders[0]; } else { orderToShow = new Order() { Name = "mac dinh", }; } DisplayOrderToShow(); }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session == null || HttpContext.Current.Session["admin"] == null) { Response.Redirect("~/LoginP.aspx"); } Page.Header.Title = "Fast food - Orders"; if (IsPostBack == false) { SearchTextBox.Text = ""; this.order_state = OrderStates.order_to_deliver; OrdersStateTextBox.Text = this.order_state; l1 = OrdersDAO.GetORDERsByState(this.order_state); OrdersListView.DataSource = l1; OrdersListView.DataBind(); } }
private void btnCheckOut_Click(object sender, EventArgs e) { Dictionary <Toy, int> OrderCart = frmDisplayToy.OrderCart; OrdersDAO dao = new OrdersDAO(); try { bool result = dao.CreateOrder(frmLogin.AuthorizedUser.Username, OrderCart); if (result) { MessageBox.Show("Order Complete!"); this.Close(); } } catch (Exception) { throw; } }
private void GetAndBindOrders(string order_state) { if (!string.IsNullOrEmpty(SearchTextBox.Text.Trim())) { this.search = SearchTextBox.Text.Trim(); } if (DateCheckBox.Checked && !string.IsNullOrEmpty(DateTextBox.Text.Trim())) { if (string.IsNullOrEmpty(this.search)) { l1 = OrdersDAO.GetORDERsByStateAndDate(order_state, DateTextBox.Text.Trim()); OrdersListView.DataSource = l1; OrdersListView.DataBind(); } else { l1 = OrdersDAO.GetORDERsByStateAndSearchAndDate(order_state, this.search.Trim(), DateTextBox.Text.Trim()); OrdersListView.DataSource = l1; OrdersListView.DataBind(); } } else { if (string.IsNullOrEmpty(this.search)) { l1 = OrdersDAO.GetORDERsByState(order_state); OrdersListView.DataSource = l1; OrdersListView.DataBind(); } else { l1 = OrdersDAO.GetORDERsByStateAndSearch(order_state, this.search.Trim()); OrdersListView.DataSource = l1; OrdersListView.DataBind(); } } }
public OrdersController(OrdersDAO ordersDao) { _ordersDao = ordersDao; }
public Order() { this.dao = OrdersDAO.getInstance(); this.orderproducts = new List <OrderProduct>(); }
public OrdersController(OrdersDAO ordersDao, IAmACommandProcessor commandProcessor) { _ordersDao = ordersDao; _commandProcessor = commandProcessor; }
//Create our connection string public HomeController() { string connectionString = ConfigurationManager.ConnectionStrings["DataSource"].ConnectionString; ordersDAO = new OrdersDAO(connectionString); }
public ActionResult Edit(int id) { OrdersDAO odao = new OrdersDAO(); return(View(odao.Select(id))); }
private void Window_Loaded(object sender, RoutedEventArgs e) { orders = OrdersDAO.GetOrders(); DisplayRevenueByCategory(); DisplayRevenueByMonth(); }
public ActionResult Index() { OrdersDAO odao = new OrdersDAO(); return(View(odao.Select())); }
public OrderController() { _ordersDAO = new OrdersDAO(); }
public OrderController() { //_customersDAO = new CustomersDAO(); _ordersDAO = new OrdersDAO(); }