예제 #1
0
        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));
        }
예제 #2
0
        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));
        }