using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
/// <summary>
/// Msg 的摘要说明
/// </summary>
public class Msg
{
    public Msg()
    {
     


    }
    public static string GetMsg(string str,string url)
    {
        StringBuilder sb = new StringBuilder();
        sb.Append("<script>var sDialog = new parent.dialog();");
        sb.Append("sDialog.init();");
        sb.Append("sDialog.set('src',2);");
        sb.AppendFormat("sDialog.event('{0}','');",str.Replace("'",""));
        sb.AppendFormat(@"sDialog.button('dialogOk','document.location.href=\'{0}\';');</script>", url);
        return sb.ToString();
    }
    public static string GetMsg(string msg)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append(@"<script type='text/javascript' language='javascript'>
var d = new dialog();d.init();
d.set('src','2');
d.set('title','系统提示信息');");

sb.AppendFormat("d.event('{0}', ' ','',' ');</script>",msg);
return sb.ToString();
    
    }
    public static string GetErrMsg(string msg)
    {
        return string.Format("<script>_error_msg_show('{0}');</script>",msg);
    
    }
}
