protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { //程序模块权限验证 Authorization clsRighter = new Authorization("0501"); btnSend.Enabled = clsRighter.Modify | clsRighter.Add; DBManager db = DBManager.Instance(); string strSql = "select Id, TemplateName,TemplateContent from SMS_Template"; //获取记录数据 DataTable dt1 = db.GetDataTable(strSql); DataRow df = dt1.NewRow(); df["TemplateName"] = "---自定义---"; dt1.Rows.InsertAt(df, 0); ddlTemp.DataSource = dt1; ddlTemp.DataTextField = "TemplateName"; ddlTemp.DataValueField = "Id"; ddlTemp.DataBind(); res = sms.GetAccount(); if (res.Result == false) { Common.ShowMsg("短信平台连接短信网关失败!请与短信提供商联系!"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { //程序模块权限验证 Authorization clsRighter = new Authorization("0503"); if (clsRighter.Read) { res = sms.GetAccount(); if (res.Result == false) { Common.ShowMsg("短信平台连接短信网关失败!请与短信提供商联系!"); } else { this.lbLast.Text = res.Message; } } else { Common.ShowMsg("权限不足!"); } } }