public ActionResult Detail(int id) { var data = EmployeeInfo.Get(UserID, Employee.ID, id, true); if (Request.IsAjaxRequest()) { return(Json(new { html = RenderPartialViewToString(Views.DetailPartial, data) }, JsonRequestBehavior.AllowGet)); } return(View(Views.Detail, data)); }
public ActionResult Update(int id) { var model = EmployeeInfo.Get(UserID, Employee.ID, id); if (Request.IsAjaxRequest()) { return(Json(new { html = RenderPartialViewToString(Views.SavePartial, model) }, JsonRequestBehavior.AllowGet)); } return(View(Views.Save, model)); }