/// <summary> /// 显示消息提示对话框 /// </summary> private static void Show(System.Web.UI.Page page, string messagetype, Pop model) { JsonUtil json = new JsonUtil(); string script = string.Format("ymPrompt.{0}({1});", messagetype, json.OneObjectToJson(model)); page.ClientScript.RegisterStartupScript(page.GetType(), "message", script, true); }
/// <summary> /// /// </summary> /// <param name="page"></param> /// <param name="model"></param> public static void Win(System.Web.UI.Page page, Pop model) { Show(page, "win", model); }
/// <summary> /// 询问信息弹窗提示 /// </summary> /// <param name="page"></param> /// <param name="model"></param> public static void Confirm(System.Web.UI.Page page, Pop model) { Show(page, "confirmInfo", model); }
/// <summary> /// 失败信息弹窗提示 /// </summary> /// <param name="page"></param> /// <param name="model"></param> public static void Error(System.Web.UI.Page page, Pop model) { Show(page, "errorInfo", model); }
/// <summary> /// 成功信息弹窗提示 /// </summary> /// <param name="page"></param> /// <param name="model"></param> public static void Success(System.Web.UI.Page page, Pop model) { Show(page, "succeedInfo", model); }
/// <summary> /// 普通信息弹窗提示 /// </summary> /// <param name="page"></param> /// <param name="model"></param> public static void Alert(System.Web.UI.Page page, Pop model) { Show(page, "alert", model); }