Пример #1
0
 /// <summary>
 /// 更新 返回页面结果提示对话框
 /// </summary>
 private void RetrunPageAlert(enumPageAlert enumPage)
 {
     if (enumPage == enumPageAlert.Success)
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "functionEdit", "<script>bootbox.dialog(\"保存成功!\", [{\"label\": \"OK\",\"class\": \"btn-small btn-primary\",callback: function () { window.location.href = 'FunctionManager.aspx?fun=" + Master.fun + "';}}]);</script>");
     }
     else if (enumPage == enumPageAlert.Fail)
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "functionEdit", "<script>bootbox.alert(\"保存失败!\");</script>");
     }
     else
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "functionEdit", "<script>bootbox.alert(\"传输数据异常!\");</script>");
     }
 }
Пример #2
0
        /// <summary>
        /// 更新 返回页面结果提示对话框
        /// </summary>
        private void RetrunPageAlert(enumPageAlert enumPage)
        {
            string aa = (CategoriesID > 0) ? "修改" : "保存";
            string bb = (pid > 0) ? "CategoriesSecondManager" : "CategoriesManager";

            if (enumPage == enumPageAlert.Success)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CategoriesEdit", "<script>bootbox.dialog('" + aa + "成功!', [{\"label\": \"OK\",\"class\": \"btn-small btn-primary\",callback: function () { window.location.href = '" + bb + ".aspx?fun=" + Master.fun + "';}}]);</script>");
            }
            else if (enumPage == enumPageAlert.Fail)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CategoriesEdit", "<script>bootbox.alert(’" + aa + "失败!');</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CategoriesEdit", "<script>bootbox.alert(\"传输数据异常!\");</script>");
            }
        }