public ActionResult updatedid(USER_LOGIN model) { Dp_List ul = new Dp_List(); Data_UserDataContext db = new Data_UserDataContext(); ul.STCODE = model.STCODE; ul.JT_LIST = new SelectList(db.MAS_DEPs, "DP_ID", "DEPARTMENT"); return(View(ul)); }
public ActionResult updatedid(Dp_List model) { using (Data_UserDataContext db = new Data_UserDataContext()) { var q = (from pp in db.MAS_USERs where pp.STCODE == model.STCODE select pp).FirstOrDefault(); q.D_ID = (int)model.JT_ID; db.SubmitChanges(); } return(RedirectToAction("Index", "TicketOP", new { Pos = "0" })); }
public ActionResult updatedid(Dp_List model) { //if (!chkSesionUser()) { return RedirectToAction("Login", "Login", new { returnUrl = "~/TicketApprove/Index" }); } using (Data_UserDataContext db = new Data_UserDataContext()) { var q = (from pp in db.MAS_USERs where pp.STCODE == model.STCODE select pp).FirstOrDefault(); q.D_ID = (int)model.JT_ID; db.SubmitChanges(); } return(RedirectToAction("Index", "Ticket")); }