Example #1
0
    protected void Save_Btn(object sender, EventArgs e)
    {
        Bas_ComInfo bas_ComInfo = HttpContext.Current.Application["cominfo"] as Bas_ComInfo;

        if (bas_ComInfo.et2 == 1)
        {
            string       value        = this.Subject.Value;
            string       arg_48_0     = this.PhoneList.Value;
            Sms_DataInfo sms_DataInfo = new Sms_DataInfo();
            sms_DataInfo.UserID        = Convert.ToInt32(this.Uid);
            sms_DataInfo.DepName       = this.DepName;
            sms_DataInfo.RealName      = this.RealName;
            sms_DataInfo.AddTime       = DateTime.Now.ToString("yyyy-MM-dd");
            sms_DataInfo.IsLongMessage = Convert.ToInt32(this.IsLongMessage.Checked);
            sms_DataInfo.Subject       = value;
            List <string> phoneList = this.GetPhoneList(this.PhoneList.Value, this.userlist.Value);
            sms_DataInfo.PhoneList = string.Join(",", phoneList.ToArray());
            Help.CommonMobleSend(phoneList, value, this.IsLongMessage.Checked);
            Sms_Data.Init().Add(sms_DataInfo);
            string str = HttpContext.Current.Server.HtmlEncode("您好!短信已发送!");
            base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=" + base.Request.Url.AbsoluteUri + "&tip=" + str);
        }
        else
        {
            base.Response.Write("<script>alert('短信网关没有启用!请在[短信设置]开启相关功能!');window.location.href='SMS_Send.aspx';</script>");
        }
    }
Example #2
0
 protected void Del_All(object sender, EventArgs e)
 {
     foreach (RepeaterItem repeaterItem in this.rpt.Items)
     {
         HtmlInputCheckBox htmlInputCheckBox = repeaterItem.FindControl("chk") as HtmlInputCheckBox;
         if (htmlInputCheckBox.Checked)
         {
             int id = Convert.ToInt32(htmlInputCheckBox.Value);
             Sms_Data.Init().Delete(id);
         }
     }
     this.Show();
 }