Esempio n. 1
0
 public JsonResult ModalPopupUser(int testid, string role = "", string term = "")
 {
     var common = new CommonService();
     common.OnRenderSubPartialViewToString += (model) =>
     {
         var result = String.Empty;
         try
         {
             result = this.RenderPartialViewToString("P_Modal_Invitation_User_Item", model);
         }
         catch (Exception)
         {
             common.success = false;
             common.message = Constants.DefaultExceptionMessage;
         }
         return result;
     };
     common.OnRenderPartialViewToString += (model) =>
     {
         ViewBag.Role = role;
         var result = String.Empty;
         try
         {
             result = this.RenderPartialViewToString("P_Modal_Assign_Tests_For_Users", model);
         }
         catch (Exception)
         {
             common.success = false;
             common.message = Constants.DefaultExceptionMessage;
         }
         return result;
     };
     common.ModalPopupUser(testid, term);
     return Json(new { common.message, common.success, common.generatedHtml, common.resultlist });
 }