bklLiudl
2024-07-23 675b8bcc4a3630d95e3d0b97d933e63442075ecb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System.Web;
using System.Web.UI;
 
namespace Common
{
    public class ShowMsgHelper
    {
        public static void Alert(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showTipsMsg('{0}','2500','4');", message));
        }
 
        public static void AlertMsg(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showTipsMsg('{0}','2500','4');top.main.windowload();OpenClose();", message));
        }
 
        public static void ParmAlertMsg(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showTipsMsg('{0}','2500','4');top.main.target_right.windowload();OpenClose();", message));
        }
 
        public static void Alert_Error(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showTipsMsg('{0}','5000','5');", message));
        }
 
        public static void Alert_Wern(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showTipsMsg('{0}','3000','3');", message));
        }
 
        public static void showFaceMsg(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showFaceMsg('{0}');", message));
        }
 
        public static void showWarningMsg(string message)
        {
            ShowMsgHelper.ExecuteScript(string.Format("showWarningMsg('{0}');", message));
        }
 
        public static void ShowScript(string strobj)
        {
            Page p = HttpContext.Current.Handler as Page;
            p.ClientScript.RegisterStartupScript(p.ClientScript.GetType(), "myscript", "<script>" + strobj + "</script>");
        }
 
        public static void ExecuteScript(string scriptBody)
        {
            string scriptKey = "Somekey";
            Page p = HttpContext.Current.Handler as Page;
            p.ClientScript.RegisterStartupScript(typeof(string), scriptKey, scriptBody, true);
        }
    }
}