您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->Acom进出仓管理系统源码>>Components/Jscript.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:Acom进出仓管理系统源码


当前文件路径:AcomStore/Components/Jscript.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6//该源码下载自www.51aspx.com(51aspx.com) 7 8namespace AcomLb.Components 9{ 10 /// <summary> 11 /// 一些常用的Js调用 12 /// <summary> 13 public class Jscript 14 { 15 16 /// 弹出JavaScript小窗口 17 /// </summary> 18 /// <param name="js">窗口信息</param> 19 public static void Alert(string message) 20 { 21 ... 27 } 28 29 /// <summary> 30 /// 弹出JavaScript小窗口,并返回上一步 31 /// </summary> 32 /// <param name="message">窗口信息</param> 33 public static void AlertAndGoBack(string message) 34 { 35 string js = @"<Script language='JavaScript'> 36 alert('" + message + "');history.go(-1);</Script>"; 37 HttpContext.Current.Response.Write(js); 38 } 39 40 /// <summary> 41 /// 运行JS代码 42 /// </summary> 43 /// <param name="ScriptCode">脚本代码</param> 44 public static void RunJs(string ScriptCode) 45 { 46 ... 51 } 52 53 /// <summary> 54 /// 弹出消息框并且转向到新的URL 55 /// </summary> 56 /// <param name="message">消息内容</param> 57 /// <param name="toURL">连接地址</param> 58 public static void AlertAndRedirect(string message, string toURL) 59 { 60 ... 64 } 65 66 public static void AlertForSave(string message) 67 { 68 string RamCode = StrHelper.GetRamCode(); 69 string Url = HttpContext.Current.Request.Url.ToString(); 70 if (Url.IndexOf('?') > 0) 71 Url = string.Format("{0}&RamCode={1}", Url, RamCode); 72 else 73 Url = string.Format("{0}?RamCode={1}", Url, RamCode); 74 75 string js = "<script language=javascript>alert('{0}');window.location.replace('{1}')</script>"; 76 HttpContext.Current.Response.Write(string.Format(js, message, Url)); 77 } 78 79 /// <summary> 80 /// 回到历史页面 81 /// </summary> 82 /// <param name="value">-1/1</param> 83 public static void GoHistory(int value) 84 { 85 ... 91 } 92 93 /// <summary> 94 /// 关闭当前窗口 95 /// </summary> 96 public static void CloseWindow() 97 { 98 ... 105 } 106 107 /// <summary> 108 /// 刷新父窗口 109 /// </summary> 110 public static void RefreshParent(string url) 111 { 112 ... 117 } 118 119 120 /// <summary> 121 /// 刷新打开窗口 122 /// </summary> 123 public static void RefreshOpener() 124 { 125 ... 131 } 132 133 134 /// <summary> 135 /// 打开指定大小的新窗体 136 /// </summary> 137 /// <param name="url">地址</param> 138 /// <param name="width"></param> 139 /// <param name="heigth"></param> 140 /// <param name="top">头位置</param> 141 /// <param name="left">左位置</param> 142 public static void OpenWebFormSize(string url, int width, int heigth, int top, int left) 143 { 144 ... 149 } 150 151 152 /// <summary> 153 /// 转向Url制定的页面 154 /// </summary> 155 /// <param name="url">连接地址</param> 156 public static void JavaScriptLocationHref(string url) 157 { 158 ... 165 } 166 167 /// <summary> 168 /// 打开指定大小位置的模式对话框 169 /// </summary> 170 /// <param name="webFormUrl">连接地址</param> 171 /// <param name="width"></param> 172 /// <param name="height"></param> 173 /// <param name="top">距离上位置</param> 174 /// <param name="left">距离左位置</param> 175 public static void ShowModalDialogWindow(string webFormUrl, int width, int height, int top, int left) 176 { 177 ... 185 } 186 187 public static void ShowModalDialogWindow(string webFormUrl, string features) 188 { 189 string js = ShowModalDialogJavascript(webFormUrl, features); 190 HttpContext.Current.Response.Write(js); 191 } 192 193 public static string ShowModalDialogJavascript(string webFormUrl, string features) 194 { 195 ... 200 } 201 202 以下函数在页面上引用AJAX组件后,调用的启动脚本