Example #1
0
 public ActionResult Edit([Bind(Include = "StockTurn_ID,Turn_Over_Ratio")] Stock_Turns stock_Turns)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stock_Turns).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(stock_Turns));
 }
Example #2
0
 public ActionResult Edit([Bind(Include = "Customer_ID,Customer_Name,Customer_Surname,Customer_Email,Customer_Contact")] Customer customer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customer));
 }
 public ActionResult Edit([Bind(Include = "InventoryType_ID,InventoryType_Name,InventoryType_Description")] Inventory_Type inventory_Type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory_Type).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(inventory_Type));
 }
 public ActionResult Edit([Bind(Include = "UserRole_ID,UserRole_Description")] User_Role user_Role)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user_Role).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user_Role));
 }
 public ActionResult Edit([Bind(Include = "PaymentType_ID,PaymentType_Name,PaymentType_Description")] Payment_Type payment_Type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(payment_Type).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(payment_Type));
 }
 public ActionResult Edit([Bind(Include = "InvSupplier_ID,InvSupp_Name,InvSupp_Address,InvSupp_Email,InvSupp_Phone")] Inventory_Supplier inventory_Supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory_Supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(inventory_Supplier));
 }
Example #7
0
 public ActionResult Edit([Bind(Include = "BookSupplier_ID,BookSupplier_Name,BookSupplier_Phone,BookTitle,Condition,Edition,Date")] Book_Supplier book_Supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book_Supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(book_Supplier));
 }
Example #8
0
 public ActionResult Edit([Bind(Include = "BookSupplier_ID,BookSupplier_Name,BookSupplier_Surname,BookSupplier_Email,BookSupplier_Address,BookSupplier_Type")] Book_Supplier book_Supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book_Supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(book_Supplier));
 }
 public ActionResult Edit([Bind(Include = "Book_ID,Book_Title,Book_Author,ISBN,Book_Edition,BookStatus_ID")] Book book)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BookStatus_ID = new SelectList(db.Book_Status, "BookStatus_ID", "BookStatus_Description", book.BookStatus_ID);
     return(View(book));
 }
Example #10
0
 public ActionResult Edit([Bind(Include = "Book_Request_ID,Customer_ID,Book_Title,Book_Author,Book_Edition,Book_Request_Description,Customer_Name,Customer_Surname,Customer_Phone")] Book_Request book_Request)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book_Request).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Customer_ID = new SelectList(db.Customers, "Customer_ID", "Customer_Name", book_Request.Customer_ID);
     return(View(book_Request));
 }
Example #11
0
 public ActionResult Edit([Bind(Include = "ProsBook_ID,BookSupplier_ID,ProsBook_Date")] Prospective_Book prospective_Book)
 {
     if (ModelState.IsValid)
     {
         db.Entry(prospective_Book).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BookSupplier_ID = new SelectList(db.Book_Supplier, "BookSupplier_ID", "BookSupplier_Name", prospective_Book.BookSupplier_ID);
     return(View(prospective_Book));
 }
Example #12
0
 public ActionResult Edit([Bind(Include = "Purchase_ID,Purchase_Amount,Purchase_Date,BookSupplier_ID")] Purchase purchase)
 {
     if (ModelState.IsValid)
     {
         db.Entry(purchase).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BookSupplier_ID = new SelectList(db.Book_Supplier, "BookSupplier_ID", "BookSupplier_Name", purchase.BookSupplier_ID);
     return(View(purchase));
 }
Example #13
0
 public ActionResult Edit([Bind(Include = "Write_Off_ID,Inventory_ID")] Write_Off_Stock write_Off_Stock)
 {
     if (ModelState.IsValid)
     {
         db.Entry(write_Off_Stock).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Inventory_ID = new SelectList(db.Inventories, "Inventory_ID", "Inventory_Name", write_Off_Stock.Inventory_ID);
     return(View(write_Off_Stock));
 }
Example #14
0
 public ActionResult Edit([Bind(Include = "InvSuppOrder_ID,InvSupplier_ID,SuppOrder_Status_ID,Order_Date")] Inventory_Supplier_Order inventory_Supplier_Order)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory_Supplier_Order).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.InvSupplier_ID      = new SelectList(db.Inventory_Supplier, "InvSupplier_ID", "InvSupp_Name", inventory_Supplier_Order.InvSupplier_ID);
     ViewBag.SuppOrder_Status_ID = new SelectList(db.Order_Status, "SuppOrder_Status_ID", "Order_Status_Description", inventory_Supplier_Order.SuppOrder_Status_ID);
     return(View(inventory_Supplier_Order));
 }
 public ActionResult Edit([Bind(Include = "Inventory_ID,InventoryType_ID,Inventory_Name,Inventory_Description,Inventory_Quantity,Minimum_Quantity,StockTurn_ID")] Inventory inventory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.InventoryType_ID = new SelectList(db.Inventory_Type, "InventoryType_ID", "InventoryType_Name", inventory.InventoryType_ID);
     ViewBag.StockTurn_ID     = new SelectList(db.Stock_Turns, "StockTurn_ID", "Turn_Over_Ratio", inventory.StockTurn_ID);
     return(View(inventory));
 }
Example #16
0
 public ActionResult Edit([Bind(Include = "Employee_ID,User_ID,Employee_Name,Employee_Surname,Employee_Address,Emp_Phone,Emp_Email,ID_Number,EmpTitle_ID,EmpGender_ID,ImageData")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmpGender_ID = new SelectList(db.Employee_Gender, "EmpGender_ID", "Gender_Description", employee.EmpGender_ID);
     ViewBag.EmpTitle_ID  = new SelectList(db.Employee_Title, "EmpTitle_ID", "Title_Description", employee.EmpTitle_ID);
     ViewBag.User_ID      = new SelectList(db.Users, "User_ID", "UserName", employee.User_ID);
     return(View(employee));
 }
Example #17
0
 public ActionResult Edit([Bind(Include = "InvSuppOrder_ID,Inventory_ID,SuppOrder_Status_ID,Quanity,Line_Total,Date")] Order_Line order_Line)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order_Line).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Inventory_ID        = new SelectList(db.Inventories, "Inventory_ID", "Inventory_Name", order_Line.Inventory_ID);
     ViewBag.InvSuppOrder_ID     = new SelectList(db.Inventory_Supplier_Order, "InvSuppOrder_ID", "InvSuppOrder_ID", order_Line.InvSuppOrder_ID);
     ViewBag.SuppOrder_Status_ID = new SelectList(db.Order_Status, "SuppOrder_Status_ID", "Order_Status_Description", order_Line.SuppOrder_Status_ID);
     return(View(order_Line));
 }
 public ActionResult Edit([Bind(Include = "Sale_ID,Customer_ID,PaymentType_ID,Employee_ID,TaxRate_ID")] Sale sale)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sale).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Customer_ID    = new SelectList(db.Customers, "Customer_ID", "Customer_Name", sale.Customer_ID);
     ViewBag.Employee_ID    = new SelectList(db.Employees, "Employee_ID", "Employee_Name", sale.Employee_ID);
     ViewBag.PaymentType_ID = new SelectList(db.Payment_Type, "PaymentType_ID", "PaymentType_Name", sale.PaymentType_ID);
     ViewBag.TaxRate_ID     = new SelectList(db.TaxRates, "TaxRate_ID", "Tax_Description", sale.TaxRate_ID);
     return(View(sale));
 }