public ActionResult Edit(int id, Companyadd smodel) { try { ManageCompany sdb = new ManageCompany(); sdb.UPDATECOMPANYS(smodel); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Companyadd regi, string ReturnUrl = "") { if (ModelState.IsValid) { ManageCompany jm = new ManageCompany(); if (jm.Add_Company1(regi)) { ViewBag.Message = "You Have Done Registration"; ModelState.Clear(); if (Url.IsLocalUrl(ReturnUrl)) { return(Redirect(ReturnUrl)); } else { return(RedirectToAction("Index", "Company")); } } } return(View()); }