Beispiel #1
0
        public string GetErrorView()
        {
            DTO.LABURNUM.COM.ClassModel model = new DTO.LABURNUM.COM.ClassModel();
            ControllerContext           cont  = new ControllerContext();
            string html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(cont, "~/Views/Error404.cshtml", model);

            return(html);
        }
Beispiel #2
0
 public ActionResult SeachAdmissionTypeByAdvanceSearch(DTO.LABURNUM.COM.AdmissionTypeModel model)
 {
     try
     {
         List <DTO.LABURNUM.COM.AdmissionTypeModel> dbAdmissionTypeList = new LABURNUM.COM.Component.AdmissionType().GetAdmissionTypeByAdvanceSearch(model);
         string html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/AdmissionType/SearchResult.cshtml", dbAdmissionTypeList);
         return(Json(new { code = 0, message = "success", result = html }));
     }
     catch (Exception)
     {
         return(Json(new { code = -2, message = "failed", result = new LABURNUM.COM.Component.Common().GetErrorView() }));
     }
 }
Beispiel #3
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" }));
     }
 }
Beispiel #4
0
 public ActionResult EditAdmissionTypePopup(long id)
 {
     try
     {
         DTO.LABURNUM.COM.AdmissionTypeModel model = new DTO.LABURNUM.COM.AdmissionTypeModel();
         model = new LABURNUM.COM.Component.AdmissionType().GetAdmissionTypeByAdmissionTypeId(id);
         string html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/AjaxRequest/EditAdmissionTypePopup.cshtml", model);
         return(Json(new { code = 0, message = "success", result = html }));
     }
     catch (Exception)
     {
         return(Json(new { code = -1, message = "failed", result = new LABURNUM.COM.Component.Common().GetErrorView() }));
     }
 }
Beispiel #5
0
 public ActionResult AdmissionTypeStatusUpdateAlert(long id, bool cIsActive)
 {
     try
     {
         DTO.LABURNUM.COM.AdmissionTypeModel model = new DTO.LABURNUM.COM.AdmissionTypeModel()
         {
             AdmissionTypeId = id, IsActive = cIsActive
         };
         string html = new LABURNUM.COM.Component.HtmlHelper().RenderViewToString(this.ControllerContext, "~/Views/AjaxRequest/AdmissionTypeStatusUpdateAlert.cshtml", model);
         return(Json(new { code = 0, message = "success", result = html }));
     }
     catch (Exception)
     {
         return(Json(new { code = -1, message = "failed", result = new LABURNUM.COM.Component.Common().GetErrorView() }));
     }
 }
Beispiel #6
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 }));
            }
        }