public ActionResult Edit(WareHouse_Lookup warehouse_lookup) { if (ModelState.IsValid) { db.Entry(warehouse_lookup).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(warehouse_lookup)); }
public ActionResult Edit(FFLType ffltype) { if (ModelState.IsValid) { db.Entry(ffltype).State = EntityState.Modified; int userid = int.Parse(Session.Contents["UserID"].ToString()); ffltype.ModifiedBy = userid; ffltype.ModifiedDate = DateTime.Now; return(RedirectToAction("Index")); } return(View(ffltype)); }
public ActionResult Edit(Freight_Lookup freight_lookup) { if (ModelState.IsValid) { db.Entry(freight_lookup).State = EntityState.Modified; int userid = int.Parse(Session.Contents["UserID"].ToString()); freight_lookup.ModifiedBy = userid; freight_lookup.ModifiedDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(freight_lookup)); }
public ActionResult Edit(AttributeType attributetype) { if (ModelState.IsValid) { db.Entry(attributetype).State = EntityState.Modified; int userid = int.Parse(Session.Contents["UserID"].ToString()); attributetype.ModifiedBy = userid; attributetype.ModifiedDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(attributetype)); }
public ActionResult Edit(Attribute_Lookup attribute_lookup) { if (ModelState.IsValid) { int userid = int.Parse(Session.Contents["UserID"].ToString()); db.Attribute_Lookup.Add(attribute_lookup); attribute_lookup.ModifiedBy = userid; attribute_lookup.ModifiedDate = DateTime.Now; db.Entry(attribute_lookup).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", new { id = attribute_lookup.AttributeType_Id })); } ViewBag.AttributeType_Id = new SelectList(db.AttributeTypes, "AttributeType_Id", "AttributeType1", attribute_lookup.AttributeType_Id); return(View(attribute_lookup)); }
public ActionResult Edit(ItemDescriptionOrder itemdescriptionorder) { if (ModelState.IsValid) { db.Entry(itemdescriptionorder).State = EntityState.Modified; int userid = int.Parse(Session.Contents["UserID"].ToString()); itemdescriptionorder.ModifiedBy = userid; itemdescriptionorder.ModifiedDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AttributeType_Id = new SelectList(db.AttributeTypes, "AttributeType_Id", "AttributeType1", itemdescriptionorder.AttributeType_Id); var CategoryClass = db.CategoryClasses.Select(c => new { CategoryClass_Id = c.CategoryClass_Id, Description = c.Category_Id + " - " + c.CategoryName }) .ToList(); ViewBag.CategoryClass = new SelectList(CategoryClass, "CategoryClass_Id", "Description", itemdescriptionorder.CategoryClass_Id); var SubClass = db.SubClasses.Select(s => new { SubClassCode_Id = s.SubClassCode_Id, Description = s.SubClass_Id + " - " + s.SubClassName }) .ToList(); ViewBag.SubClass = new SelectList(SubClass, "SubClassCode_Id", "Description", itemdescriptionorder.SubClassCode_Id); var FineLineClass = db.FineLineClasses.Select(f => new { FineLineCode_Id = f.FineLineCode_Id, Description = f.FineLine_Id + " - " + f.FinelineName }) .ToList(); ViewBag.FineLineClass = new SelectList(FineLineClass, "FineLineCode_Id", "Description", itemdescriptionorder.FineLineCode_Id); ViewBag.SystemType = LoadSystemType(itemdescriptionorder.SystemType); ViewBag.DescriptionField = LoadDescription(itemdescriptionorder.DescriptionField); return(View(itemdescriptionorder)); }