public JsonResult GetSelectDepartmentViewModel() { var model = new SelectDepartmentViewModel(); model.Department = "SALE"; return(Json(model, JsonRequestBehavior.AllowGet)); }
public ActionResult SelectDepartment(SelectDepartmentViewModel modal) { if (ModelState.IsValid) { Session["SelectedDepartment"] = modal.Department; return(RedirectToAction("CollectTicketDetail")); } return(View()); }
public ActionResult SelectDepartment(SelectDepartmentViewModel model) { if (ModelState.IsValid) { Session["SelectedDepartment"] = model.Department; if (isSPAResquest) { return(Json(true, JsonRequestBehavior.AllowGet)); } else { return(RedirectToAction("CollectTicketDetail")); } } if (isSPAResquest) { return(Json(false, JsonRequestBehavior.AllowGet)); } else { return(View()); } }