コード例 #1
0
 public ActionResult EditEmployee(int ID)
 {
     using (DBAgent.DBAgent agent = new DBAgent.DBAgent())
     {
         ViewBag.employee   = agent.getEmployee(ID);
         ViewBag.workgroups = agent.GetWorkgroups();
     }
     return(View());
 }
コード例 #2
0
 public ActionResult Employees(int?workgroup)
 {
     using (DBAgent.DBAgent agent = new DBAgent.DBAgent())
     {
         ViewBag.employees  = agent.GetEmployees(null, workgroup, null, null);
         ViewBag.workgroups = agent.GetWorkgroups();
     }
     return(View());
 }
コード例 #3
0
 public ActionResult Orders(int?productID, int?purchaser, DateTime?startDate, DateTime?endDate)
 {
     getAdmin();
     using (DBAgent.DBAgent agent = new DBAgent.DBAgent())
     {
         List <Order>     orders     = agent.GetOrders(productID, purchaser, startDate, endDate, null);
         List <Product>   products   = agent.GetProducts(null, null, null, null);
         List <Purchaser> purchasers = agent.getPurchasers();
         ViewBag.Orders     = orders;
         ViewBag.products   = products;
         ViewBag.purchasers = purchasers;
         ViewBag.workgroups = agent.GetWorkgroups();
     }
     return(View());
 }
コード例 #4
0
 public ActionResult Orders()
 {
     getAdmin();
     using (DBAgent.DBAgent agent = new DBAgent.DBAgent())
     {
         List <Order>     orders     = agent.GetOrders(null, null, null, null, null);
         List <Product>   products   = agent.GetProducts(null, null, null, null);
         List <Purchaser> purchasers = agent.getPurchasers();
         ViewBag.Orders     = orders;
         ViewBag.products   = products;
         ViewBag.purchasers = purchasers;
         ViewBag.workgroups = agent.GetWorkgroups();
     }
     return(View());
 }