Exemplo n.º 1
0
        public JsonResult ModalRemovePopupUser(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) =>
            {
                var result = String.Empty;
                try
                {
                    ViewBag.Role = role;
                    result = this.RenderPartialViewToString("P_Modal_Remove_Tests_For_User", model);
                }
                catch (Exception)
                {
                    common.success = false;
                    common.message = Constants.DefaultExceptionMessage;

                }
                return result;
            };
            common.ModalRemovePopupUser(testid, role, term);
            return Json(new { common.success, common.message, common.generatedHtml, common.resultlist });
        }