예제 #1
0
 public ActionResult SeachClassByAdvanceSearch(DTO.LABURNUM.COM.ClassModel model)
 {
     try
     {
         List <DTO.LABURNUM.COM.ClassModel> dbClassList = new LABURNUM.COM.Component.Class().GetClassesByAdvanceSearch(model);
         string html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/SeachClassByAdvanceSearch/Search.cshtml", dbClassList);
         return(Json(new { code = 0, message = "success", result = html }));
     }
     catch (Exception)
     {
         //string html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/SeachClassByAdvanceSearch/Search.cshtml", dbClassList);
         return(Json(new { code = -2, message = "failed" }));
     }
 }
예제 #2
0
        public ActionResult EditClassPopup(long id)
        {
            DTO.LABURNUM.COM.ClassModel model = new DTO.LABURNUM.COM.ClassModel();
            string html;

            try
            {
                model = new LABURNUM.COM.Component.Class().GetClassByClassId(id);
                html  = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/AjaxRequest/EditClassPopup.cshtml", model);
                return(Json(new { code = 0, message = "success", result = html }));
            }
            catch (Exception)
            {
                html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/Error404.cshtml", model);
                return(Json(new { code = -1, message = "failed", result = html }));
            }
        }