public ActionResult store() { var role = RouteData.Values["role"].ToString(); ViewBag.role = role; ViewBag.layout = "~/Views/Shared/_" + role + "Layout.cshtml"; tblBranch branchObj = new tblBranch(); branchObj.branch_id = Request["branch_id"]; branchObj.branch_name = Request["branch_name"]; branchObj.branch_manager_id = Request["branch_manager_id"]; branchObj.mobile_number = Request["phone"]; branchObj.alter_mobile_number = Request["alternate_phone"]; branchObj.street = Request["street"]; branchObj.city = Request["city"]; branchObj.state = Request["state"]; branchObj.pincode = Request["pin"]; branchObj.createdat = null; branchObj.modifiedat = null; branchObj.deletedat = null; branchObject.tblBranches.InsertOnSubmit(branchObj); branchObject.SubmitChanges(); var redirectUrl = "/profile/" + role + "/branch/index"; Response.Redirect(redirectUrl); return(View()); }
public ActionResult store() { tblBranch branchObj = new tblBranch(); branchObj.branch_id = Request["branch_id"]; branchObj.branch_name = Request["branch_name"]; branchObj.branch_manager_id = Request["branch_manager_id"]; branchObj.mobile_number = Request["phone"]; branchObj.alter_mobile_number = Request["alternate_phone"]; branchObj.street = Request["street"]; branchObj.city = Request["city"]; branchObj.state = Request["state"]; branchObj.pincode = Request["pin"]; branchObj.createdat = null; branchObj.modifiedat = null; branchObj.deletedat = null; branchObject.tblBranches.InsertOnSubmit(branchObj); branchObject.SubmitChanges(); Response.Redirect("/branch/index"); return(View()); }