コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="status"></param>
 /// <param name="message"></param>
 /// <param name="details"></param>
 /// <returns></returns>
 public static JsonResult JsonResponse(string message, string details = "", AjaxResponseStatus status = AjaxResponseStatus.Warning, string html = "", string redirectUrl = "")
 {
     return(new JsonResult
     {
         Data = AjaxResponse.GetResponse(message, details, status, html = html, redirectUrl = redirectUrl),
         ContentType = "application/json",
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     });
 }
コード例 #2
0
ファイル: AjaxResponse.cs プロジェクト: farrukh-khan/CBHSExam
 /// <summary>
 ///
 /// </summary>
 /// <param name="status"></param>
 /// <param name="message"></param>
 /// <param name="details"></param>
 /// <returns></returns>
 public static AjaxResponse GetResponse(string message, string details = "", AjaxResponseStatus status = AjaxResponseStatus.Warning, string html = "", string redirectUrl = "")
 {
     return(new AjaxResponse {
         Status = status, Message = message, Details = details, Html = html, RedirectUrl = redirectUrl
     });
 }