public ActionResult Edit([Bind(Include = "E_ID,E_FullName,E_Department,E_Position,E_Username,E_Active")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(employee));
 }
 public ActionResult Edit([Bind(Include = "ID,Name,SortOrder,Type")] UnitTypeModel unitType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(unitType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(unitType));
 }
 public ActionResult Edit([Bind(Include = "ID,MainCategory,Name,SortOrder")] Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
示例#4
0
 public ActionResult Edit([Bind(Include = "ID,CodeNo,GenNo,Maincategory,Category,TypeID,Purchaser,PurchaseDate,UseDate,EmpID,Status,Amount,Currency,Remark,ReturnSellAmount,ReturnCurrency")] Inventory inventory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(inventory));
 }
 public ActionResult Edit([Bind(Include = "Pos_ID,Pos_Name,Pos_SortOrder")] Position position)
 {
     if (ModelState.IsValid)
     {
         db.Entry(position).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(position));
 }
 public ActionResult Edit([Bind(Include = "H_ID,To_ID,FromDate,ToDate,ActiveID,Remark")] History history)
 {
     if (ModelState.IsValid)
     {
         db.Entry(history).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(history));
 }
 public ActionResult Edit([Bind(Include = "ID,Name,SortOrder")] Department department)
 {
     if (ModelState.IsValid)
     {
         db.Entry(department).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(department));
 }