protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; string c = this.GridView1.DataKeys[e.RowIndex].Value.ToString(); DataTable dt = BLL.PhoneAndGroup.GetGroupByTelPhoneGroupNameAndAccountCode("0", user.AccountCode); string GID = string.Empty; if (dt.Rows.Count > 0) { GID = dt.Rows[0][0].ToString(); } bool r = BLL.PhoneAndGroup.PhoneConnectGroup(GID, user.AccountCode, c); if (r) { load(); Message.Success(this, "撤销分组成功", "null"); } else { load(); Message.Error(this, "撤销分组失败", "null"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (txt_account.Text.Trim() == "-1") { Message.Alert(this, "已存在该企业帐号", "null"); return; } if (dd_city.SelectedIndex == 0 || dd_province.SelectedIndex == 0) { Message.Alert(this, "请选择企业所在的地区", "null"); return; } if (txt_spNumber.Text.Trim() == "") { Message.Alert(this, "请填写企业接入号码", "null"); return; } if (txt_Wei.Text.Trim() == "") { Message.Alert(this, "请填写企业接入号码尾号", "null"); return; } Model.EnterpriseUser user = new Model.EnterpriseUser(); user.AccountCode = txt_account.Text.Trim(); user.Audit = SMSModel.AccountAuditType.Manual; if (!IsPassword(txt_pass.Text.Trim())) { Message.Alert(this, "密码必须是以字母开头,长度在6~18之间,只能包含字母、数字和下划线", "null"); return; } user.Password = txt_pass.Text.ToString(); user.Priority = SMSModel.AccountPriorityType.Level0; user.RegisterDate = DateTime.Now; user.SPNumber = txt_spNumber.Text.Trim() + txt_Wei.Text.Trim(); user.Name = txt_name.Text.Trim(); if (!IsNumeric(txt_phone.Text.Trim())) { Message.Alert(this, "手机号码输入不正确", "null"); return; } user.Phone = txt_phone.Text.Trim(); user.Address = txt_address.Text; user.Contact = txt_contact.Text; user.City = dd_city.SelectedItem.Value; user.Province = dd_province.SelectedItem.Value; user.Signature = txt_smsSigure.Text.Trim(); user.Channel = rb_SMSChannel.SelectedValue; user.Filter = (ushort)SMSModel.FilterType.Replace; user.Level = (ushort)SMSModel.LevelType.Level2; user.StatusReport = (ushort)(SMSModel.StatusReportType)(int.Parse(rb_SMSReportType.SelectedValue)); SMSModel.RPCResult <Guid> r = ZHSMSProxy.GetZKD().AddLowerAccount(((Model.EnterpriseUser)Session["Login"]).AccountCode, user); if (r.Success) { Message.Success(this, "操作成功", "null"); } else { Message.Alert(this, r.Message, "null"); } }
protected void btn_cancelGroup_Click(object sender, EventArgs e) { //取消分组 Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dt = BLL.PhoneAndGroup.GetGroupByTelPhoneGroupNameAndAccountCode("0", user.AccountCode); string GID = string.Empty; if (dt.Rows.Count > 0) { GID = dt.Rows[0][0].ToString(); } for (int i = 0; i <= GridView1.Rows.Count - 1; i++) { CheckBox CheckBox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox"); if (CheckBox.Checked == true) { string PID = GridView1.DataKeys[i][0].ToString(); BLL.PhoneAndGroup.PhoneConnectGroup(GID, user.AccountCode, PID); } } CheckBoxAll.Checked = false; CheckBox1.Checked = false; GridView1.DataSource = (DataTable)this.ViewState["TXL"]; GridView1.DataBind(); load(); Message.Success(this, " 取消分组", "null"); }
protected void Page_Load(object sender, EventArgs e) { BLL.Login.IsLogin(); Model.SysAccount account = (Model.SysAccount)Session["Login"]; if (account.UserCode != "admin") { string permissionValue = Request.QueryString["type"] + "Enterprise.Manage.ReCharge"; bool ok = BLL.Permission.IsUsePermission(account.UserCode, permissionValue); if (!ok) { Message.Alert(this, "无权限", "null"); return; } } if (!IsPostBack) { lbl_account.Text = Request.QueryString["AccountID"]; string code = Request.QueryString["AccountID"]; SMSModel.RPCResult <Model.EnterpriseUser> rp = ZHSMSProxy.GetZHSMSPlatService().GetEnterprise(code); if (rp.Success) { Model.EnterpriseUser user = rp.Value; // BLL.EnterpriseUser.GetEnerprise(code); SMSModel.RPCResult <Model.UserBalance> r = ZHSMSProxy.GetZHSMSPlatService().GetBalance(code, user.Password); // ZHSMSProxy.GetPretreatmentService().GetAccount(user.AccountID); if (r.Success) { lbl_Old.Text = r.Value.SmsBalance.ToString(); } } } }
private void load() { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dt = new DataTable(); string value = TreeView1.SelectedValue; if (value != "") { if (value != "-1") { dt = BLL.PhoneAndGroup.GetPhoneByAccountCodeAndGroup(user.AccountCode, value); } else { dt = BLL.PhoneAndGroup.GetPhoneByAccountCodes(user.AccountCode); } } else { dt = BLL.PhoneAndGroup.GetPhoneByAccountCodes(user.AccountCode); } if (dt.Rows.Count == 0) { lbl_message.Visible = true; } else { lbl_message.Visible = false; } this.ViewState["TXL"] = dt; GridView1.DataSource = dt; GridView1.DataBind(); }
private void search(int pageIndex) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dt = CreateTable(); SMSModel.RPCResult <List <Model.AuditEnterprise> > r = ZHSMSProxy.GetZKD().GetFailueOrUnAuditEnterprises(user.AccountCode); if (r.Success) { List <Model.AuditEnterprise> list = r.Value; pageBottom(list.Count, pageIndex); int startIndex = pageIndex * GridView1.PageSize; if (startIndex != 0) { list = list.Skip(startIndex).ToList(); } list = list.Take(GridView1.PageSize).ToList(); foreach (var s in list) { DataRow dr = dt.NewRow(); dr["EnterpriseCode"] = s.EnterpriseCode; dr["EnterpriseName"] = s.EnterpriseName; dr["CreateTime"] = s.CreateTime; dr["AuditTime"] = s.AuditTime; dr["AuditResult"] = s.AuditResult == true?"已审":"未审"; dr["Auditor"] = s.Auditor; dr["EnterpriseResult"] = s.EnterpriseResult == true?"通过":"未通过"; dr["AuditRemark"] = s.AuditRemark; dt.Rows.Add(dr); } } GridView1.DataSource = dt; GridView1.DataBind(); }
protected void BindTreeview(TreeView treeview) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable ds = BLL.PhoneAndGroup.GetGroupForTreeByAccountCode(user.AccountCode); treeview.Nodes.Clear(); TreeNode tn = new TreeNode("通讯录组", "-1"); tn.Expanded = true; treeview.Nodes.Add(tn); DataRow[] rowG = ds.Select(); foreach (DataRow dr in rowG) { TreeNode NewNode = new TreeNode(); if (dr["TelPhoneGroupName"].ToString() == "0") { dr["TelPhoneGroupName"] = "未分组"; } NewNode.Text = dr["TelPhoneGroupName"].ToString(); NewNode.Value = dr["GID"].ToString(); NewNode.Expanded = true; NewNode.SelectAction = TreeNodeSelectAction.SelectExpand; tn.ChildNodes.Add(NewNode); } }
protected void btnSubmit_Click(object sender, EventArgs e) { Model.EnterpriseUser account = (Model.EnterpriseUser)Session["Login"]; if (!IsPassword(txt_new.Text)) { Message.Alert(this, "密码必须是以字母开头,长度在6~18之间,只能包含字母、数字和下划线", "null"); return; } if (!txt_new.Text.Equals(txt_Pass2.Text)) { Message.Alert(this, "确认密码与新密码不一致,请重新输入", "null"); return; } RPCResult rr = ZHSMSProxy.GetZKD().ChangeEnterprisePass(account.AccountCode, txt_Pass.Text.ToString(), txt_new.Text.ToString()); if (rr.Success) { System.Web.HttpContext.Current.Response.Redirect("../../login.aspx", true); } else { Message.Alert(this, rr.Message, "null"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (dd_agents.SelectedIndex == 0) { Message.Alert(this, "请选择代理商企业", "null"); return; } SMSModel.RPCResult <Model.EnterpriseUser> r = ZHSMSProxy.GetZHSMSPlatService().GetEnterprise(lbl_account.Text); if (r.Success) { Model.EnterpriseUser user = r.Value; user.ParentAccountCode = dd_agents.SelectedValue; user.IsAgent = false; SMSModel.RPCResult rt = ZHSMSProxy.GetZHSMSPlatService().UpdateAccontInfo(user); if (rt.Success) { Message.Success(this, "操作成功", "null"); return; } else { Message.Alert(this, rt.Message, "null"); } } else { Message.Alert(this, r.Message, "null"); } }
private void LoadData(DateTime beg, DateTime end) { string sthml = string.Empty; //sthml += " <div class=\"gonggao_title\"></div>"; sthml += " <ul class=\"gonggao_con\">"; Model.EnterpriseUser single = (Model.EnterpriseUser)Session["Login"]; if (single.AccountID != null) { SMSModel.RPCResult <List <Model.Annunciate> > no = ZHSMSProxy.GetZKD().GetDirectAnnuciates(single.AccountCode, beg, end); if (no != null) { if (no.Value.Count > 0) { foreach (Model.Annunciate g in no.Value) { sthml += " <li class=\"gg_con_title\">"; sthml += " <a href=\"javascript:void(0);\">"; sthml += " <span class=\"title\">" + g.AnnunciateTitle + "</span>"; sthml += " <span class=\"time\">" + g.CreateTime + "</span>"; sthml += " </a>"; sthml += " </li>"; sthml += " <li class=\"gg_con_box\">"; sthml += " <div class=\"gg_open_title\">" + g.AnnunciateTitle + "<br /><span class=\"open_time\">" + g.CreateTime + "</span></div>"; sthml += " <div class=\"gg_open_con\">" + g.AnnunciateContent + "<br />"; sthml += " </div>"; sthml += " </li>"; } } } sthml += " </ul>"; sthml += "</div>"; this.tdInfo.InnerHtml = sthml; } }
private void load() { DataTable dt = CreateTable(); Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; RPCResult <List <FailureSMS> > r = ZHSMSProxy.GetZKD().GetSMSByAuditFailure(user.AccountCode); if (r.Success) { List <FailureSMS> smss = r.Value; if (smss.Count > 0) { lbl_message.Visible = false; Label1.Text = "审核失败的短信有" + r.Value.Count + "条"; foreach (FailureSMS s in smss) { DataRow dr = dt.NewRow(); dr["Audit"] = GetAudit(s.Audit); dr["SMSContent"] = s.Content; dr["ContentFilter"] = GetContentFilter(s.Filter); dr["Level"] = s.Level; dr["SendTime"] = s.SendTime; dr["SerialNumber"] = s.SerialNumber; dr["StatusReport"] = GetStatusReport(s.StatusReport); dr["Signature"] = s.Signature; dr["FailureCase"] = s.FailureCase; List <string> num = s.Number; if (num.Count > 3) { dr["PhoneCount"] = num[0] + "," + num[1] + "," + num[2] + " 等" + num.Count + "个号码"; } else { foreach (string st in num) { dr["PhoneCount"] += st + ","; } } string s1 = dr["PhoneCount"].ToString(); if (s1[s1.Length - 1] == ',') { s1 = s1.Substring(0, s1.Length - 1); } dr["PhoneCount"] = s1; dt.Rows.Add(dr); } } } else { Message.Alert(this, r.Message, "null"); return; } dt.DefaultView.Sort = "SendTime desc"; GridView1.DataSource = dt; GridView1.DataBind(); Session["dt"] = dt; }
private void load() { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dt = BLL.PhoneAndGroup.GetGroupByAccountCode(user.AccountCode); dt.DefaultView.Sort = "AccountCode"; GridView1.DataSource = dt; GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { BLL.Login.IsLogin(); Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; if (!IsPostBack) { load(); } }
protected void Page_Load(object sender, EventArgs e) { BLL.Login.IsLogin(); Model.EnterpriseUser account = (Model.EnterpriseUser)Session["Login"]; if (!IsPostBack) { lbl_account.Text = account.AccountCode; } }
public bool ToSql(DataTable dt) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; string GroupID = string.Empty; if (dd_l.SelectedValue == "-1") { DataTable dtt = BLL.PhoneAndGroup.GetGroupByTelPhoneGroupNameAndAccountCode("0", user.AccountCode); if (dtt.Rows.Count > 0) { GroupID = dtt.Rows[0][0].ToString(); } } else { GroupID = dd_l.SelectedValue; } if (dt != null && dt.Rows.Count > 0) { for (int i = 1; i < dt.Rows.Count; i++) { if (dt.Rows[i][0].ToString() == "" || dt.Rows[i][0].ToString() == null) { Message.Alert(this, "联系人不为空", "null"); return(false); } //bool r = IsNumeric(dt.Rows[i][4].ToString()); //if (!r) //{ // Message.Alert(this, "请输入正确的手机号码", "null"); // return false; //} bool rr = BLL.PhoneAndGroup.PhoneUpload( user.AccountCode, dt.Rows[i][0].ToString(), dt.Rows[i][1].ToString(), dt.Rows[i][2].ToString(), dt.Rows[i][3].ToString(), dt.Rows[i][4].ToString(), dt.Rows[i][5].ToString(), dt.Rows[i][6].ToString(), dt.Rows[i][7].ToString(), dt.Rows[i][8].ToString(), dt.Rows[i][9].ToString(), GroupID); if (!rr) { Message.Alert(this, "上传号码失败", "null"); return(false); } else { return(true); } } return(false); } else { return(false); } }
private void load() { string GID = Request.QueryString["GID"]; Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dt = BLL.PhoneAndGroup.GetPhoneByAccountCodeAndGroup(user.AccountCode, GID); GridView1.DataSource = dt; GridView1.DataBind(); }
protected void btn_infoSave_Click(object sender, EventArgs e) { //资料 if (dd_city.SelectedIndex == 0 || dd_province.SelectedIndex == 0) { Message.Alert(this, "请选择地区信息", "null"); return; } if (txt_name.Text.Trim() == "") { Message.Alert(this, "请填写企业名字", "null"); return; } if (txt_contact.Text.Trim() == "") { Message.Alert(this, "请填写企业联系人", "null"); return; } if (txt_phone.Text.Trim() == "") { Message.Alert(this, "请填写手机号码", "null"); return; } if (!IsNumeric(txt_phone.Text.Trim())) { Message.Alert(this, "手机号码输入不正确", "null"); return; } string code = Request.QueryString["AccountID"]; SMSModel.RPCResult <Model.EnterpriseUser> r = ZHSMSProxy.GetZHSMSPlatService().GetEnterprise(code); if (r.Success) { Model.EnterpriseUser user = r.Value; user.Name = txt_name.Text.Trim(); user.Phone = txt_phone.Text.Trim(); user.Address = txt_address.Text; user.Contact = txt_contact.Text; user.City = dd_city.SelectedItem.Value; user.Province = dd_province.SelectedItem.Value; SMSModel.RPCResult ok = ZHSMSProxy.GetZHSMSPlatService().UpdateAccontInfo(user);// BLL.EnterpriseUser.UpdateAccontInfo(user); if (ok.Success) { Message.Success(this, "操作成功", "null"); } else { Message.Alert(this, ok.Message, "null"); } } else { Message.Alert(this, r.Message, "null"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; if (!Page.IsValid) { return; } if (txt_Content.Value.ToString().Trim() == "") { Message.Alert(this, "请输入短信内容", "null"); return; } SMSModel.SMS sms = new SMS(); List <string> num = new List <string>(); foreach (ListItem li in CheckBoxList1.Items) { if (li.Selected == true) { num.Add(li.Text); } } if (num.Count == 0) { Message.Alert(this, "请选择电话号码", "null"); return; } bool tt = false; if (txt_SendTime.Value != "") { sms.SMSTimer = Convert.ToDateTime(txt_SendTime.Value); tt = true; } RPCResult <Guid> r = ZHSMSProxy.GetZKD().SendSMS(user.AccountCode, user.Password, txt_Content.Value.ToString().Trim(), txt_wapURL.Value.ToString(), num, tt, sms.SMSTimer); if (r.Success) { sms.SerialNumber = r.Value; sms.Account = user.AccountCode; sms.Content = txt_Content.Value; sms.Number = num; sms.SendTime = DateTime.Now; sms.WapURL = txt_wapURL.Value; BLL.SMSdo.SMSAdd(sms); Message.Success(this, r.Message, "null"); } else { Message.Error(this, r.Message, "null"); } }
protected void btn_infoSave_Click(object sender, EventArgs e) { //资料 if (dd_city.SelectedIndex == 0 || dd_province.SelectedIndex == 0) { Message.Alert(this, "请选择地区信息", "null"); return; } if (txt_name.Text.Trim() == "") { Message.Alert(this, "请填写企业名字", "null"); return; } if (txt_contact.Text.Trim() == "") { Message.Alert(this, "请填写企业联系人", "null"); return; } if (txt_phone.Text.Trim() == "") { Message.Alert(this, "请填写企业联系电话", "null"); return; } string code = Request.QueryString["AccountID"]; RPCResult <Model.EnterpriseUser> r = ZHSMSProxy.GetZKD().GetEnterprise(code); if (r.Success) { Model.EnterpriseUser user = r.Value; if (user != null) { user.Name = txt_name.Text.Trim(); user.Phone = txt_phone.Text.Trim(); user.Address = txt_address.Text; user.Contact = txt_contact.Text; user.City = dd_city.SelectedItem.Value; user.Province = dd_province.SelectedItem.Value; RPCResult rr = ZHSMSProxy.GetZKD().UpdateEnterprise(user); if (rr.Success) { Message.Success(this, "修改企业基本资料成功", "null"); } else { Message.Alert(this, rr.Message, "null"); } } else { Message.Alert(this, "系统不存在此用户", "null"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { user = (Model.EnterpriseUser)Session["Login"]; if (user == null) { System.Web.HttpContext.Current.Response.Redirect("../login.aspx", true); } load(); LoadData(); } }
private void load() { DataTable dt = CreateTable(); DateTime starttime = Convert.ToDateTime(txt_S.Text); DateTime endtime = Convert.ToDateTime(txt_E.Text); Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; RPCResult <List <SMSModel.MOSMS> > mo = ZHSMSProxy.GetZKD().GetDirectMOSmsBySPNumber(user.AccountCode, user.Password); if (mo.Success) { List <SMSModel.MOSMS> mm = mo.Value; if (mm.Count > 0) { foreach (MOSMS s in mm) { BLL.MO.Add(s); } } } else { Message.Alert(this, mo.Message, "null"); return; } List <MOSMS> rr = BLL.MO.Gets(user.SPNumber, starttime, endtime); if (rr.Count > 0) { lbl_message.Visible = false; Label1.Text = "当前已接收的短信有" + rr.Count + "批次"; foreach (MOSMS s in rr) { DataRow dr = dt.NewRow(); dr["Gateway"] = s.Gateway; dr["Message"] = s.Message; dr["ReceiveTime"] = s.ReceiveTime; dr["Serial"] = s.Serial; dr["SPNumber"] = s.SPNumber; dr["UserNumber"] = s.UserNumber; dr["Service"] = s.Service; dt.Rows.Add(dr); } } dt.DefaultView.Sort = "ReceiveTime desc"; GridView1.DataSource = dt; GridView1.DataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dataTabe = (DataTable)Session["dt"]; bool r = false; if (!Page.IsValid) { return; } if (txt_phone.Text != "") { if (!IsNumeric(txt_phone.Text)) { Message.Alert(this, "请输入正确的手机号码", "null"); return; } } if (txt_Email.Text != "") { if (!IsEmail(txt_Email.Text)) { Message.Alert(this, "请输入正确的Email", "null"); return; } } string GroupID = string.Empty; if (dd_l.SelectedValue == "-1") { DataTable dt = BLL.PhoneAndGroup.GetGroupByTelPhoneGroupNameAndAccountCode("0", user.AccountCode); if (dt.Rows.Count > 0) { GroupID = dt.Rows[0][0].ToString(); } } else { GroupID = dd_l.SelectedValue; } r = BLL.PhoneAndGroup.PhoneUpload(user.AccountCode, txt_name.Text, txt_brithday.Text.ToString(), r_sex.SelectedItem.Text, txt_Company.Text, txt_phone.Text, txt_Email.Text, txt_QQ.Text, txt_Postion.Text, txt_webchat.Text, txt_Comweb.Text, GroupID); if (r) { Message.Success(this, "号码添加成功", "null"); } else { Message.Error(this, "号码添加失败", "null"); } }
/// <summary> /// 将Dataset的数据导入数据库 /// </summary> /// <param name="pds">数据集</param> /// <param name="Cols">数据集列数</param> /// <returns></returns> private bool AddDatasetToSQL(DataSet pds, int Cols) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; string GroupID = string.Empty; if (dd_l.SelectedValue == "-1") { DataTable dt = BLL.PhoneAndGroup.GetGroupByTelPhoneGroupNameAndAccountCode("0", user.AccountCode); if (dt.Rows.Count > 0) { GroupID = dt.Rows[0][0].ToString(); } } else { GroupID = dd_l.SelectedValue; } if (pds != null && pds.Tables[0].Rows.Count > 0) { for (int i = 0; i < pds.Tables[0].Rows.Count; i++) { if (pds.Tables[0].Rows[i][0].ToString() == "" || pds.Tables[0].Rows[i][0].ToString() == null) { Message.Alert(this, "联系人不为空 ,行号:" + (i + 2), "null"); return(false); } bool r = IsNumeric(pds.Tables[0].Rows[i][4].ToString()); if (!r) { Message.Alert(this, "请输入正确的手机号码,行号:" + (i + 2), "null"); return(false); } } } else { throw new Exception("导入数据为空!"); } bool rr = BLL.PhoneAndGroup.PhoneUpload( user.AccountCode, GroupID, pds.Tables[0]); if (!rr) { Message.Alert(this, "上传号码失败", "null"); return(false); } return(true); }
private void load() { string SerialNumber = Request.QueryString["SerialNumber"].ToString(); Guid c = Guid.Parse(SerialNumber); DataTable dt = this.CreateTable(); Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; RPCResult <List <FailureSMS> > r = ZHSMSProxy.GetZKD().GetSMSByAuditFailure(user.AccountCode); if (r.Success) { List <FailureSMS> smss = r.Value; if (smss.Count > 0) { foreach (SMS s in smss) { if (s.SerialNumber == c) { txt_Content.InnerText = s.Content; txt_wapURL.Value = s.WapURL; List <string> num = s.Number; foreach (string a in num) { DataRow dr = dt.NewRow(); dr["phone"] = a; dt.Rows.Add(dr); } if (dt.Rows.Count > 0) { CheckBoxList1.DataSource = dt; CheckBoxList1.DataBind(); } for (int x = 0; x < this.CheckBoxList1.Items.Count; x++) { CheckBoxList1.Items[x].Selected = true; } } } } } else { Message.Alert(this, r.Message, "null"); return; } }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { string account = e.CommandArgument.ToString(); if (e.CommandName == "upgrade") { SMSModel.RPCResult <Model.EnterpriseUser> r = ZHSMSProxy.GetZHSMSPlatService().GetEnterprise(account); if (r.Success) { Model.EnterpriseUser user = r.Value;// BLL.EnterpriseUser.GetEnerprise(accountID); user.IsAgent = true; user.ParentAccountCode = "-1"; ZHSMSProxy.GetZHSMSPlatService().UpdateAccountSetting(user);// BLL.EnterpriseUser.UpdateAccountSetting(user); load(); } } }
private void load() { DateTime starttime = Convert.ToDateTime(txt_S.Text); DateTime endtime = Convert.ToDateTime(txt_E.Text); Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; DataTable dt = BLL.SMSdo.GetSMSByAccountAndSendTime(user.AccountCode, starttime, endtime); if (dt.Rows.Count > 0) { lbl_message.Visible = false; } dt.DefaultView.Sort = "SendTime desc"; GridView1.DataSource = dt; GridView1.DataBind(); }
private void LoadSMSTemplet() { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; RPCResult <List <Model.SMSTemplet> > smsTemplet = ZHSMSProxy.GetZKD().GetZKDSMSTempletStauts(user.AccountCode); if (smsTemplet.Success) { DataTable dt = new DataTable(); dt.Columns.Add("TempletID", typeof(String)); dt.Columns.Add("TempletContent", typeof(String)); dt.Columns.Add("SubmitTime", typeof(String)); dt.Columns.Add("AuditTime", typeof(String)); dt.Columns.Add("AuditState", typeof(String)); dt.Columns.Add("Remark", typeof(String)); foreach (Model.SMSTemplet smsT in smsTemplet.Value) { DataRow dr; dr = dt.NewRow(); dr[0] = smsT.TempletID; dr[1] = smsT.TempletContent; dr[2] = smsT.SubmitTime.ToString("yyyy-MM-dd HH:mm:ss"); dr[3] = smsT.AuditTime.ToString(); switch (smsT.AuditState) { case Model.TempletAuditType.NoAudit: dr[4] = "未审核"; break; case Model.TempletAuditType.Failure: dr[4] = "审核失败"; break; case Model.TempletAuditType.Success: dr[4] = "审核成功"; break; } dr[5] = smsT.Remark; dt.Rows.Add(dr); } gvSMSTemplet.DataSource = dt; gvSMSTemplet.DataBind(); } }
private void load() { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; RPCResult <Model.EnterpriseUser> rr = ZHSMSProxy.GetZKD().GetEnterprise(user.AccountCode); if (rr.Success) { Model.EnterpriseUser a = rr.Value; if (a != null) { txt_spNumber.Text = a.SPNumber; } } else { Message.Alert(this, rr.Message, "null"); return; } SMSModel.RPCResult <List <SMSModel.Channel> > r = ZHSMSProxy.GetZKD().GetChannels(); if (r.Success) { int i = 0; foreach (var v in r.Value) { ListItem li = new ListItem(); li.Value = v.ChannelID; li.Text = v.ChannelName; rb_SMSChannel.Items.Add(li); if (i == 0) { li.Selected = true; } i++; } } else { Message.Alert(this, r.Message, "null"); return; } if (rb_SMSChannel.Items.Count == 1) { rb_SMSChannel.Items[0].Selected = true; } }
void load() { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; if (user.AccountID != null) { lbl_account.Text = user.AccountCode; SMSModel.RPCResult <Model.UserBalance> r = ZHSMSProxy.GetZKD().GetBalance(user.AccountCode, user.Password); if (r.Success) { lbl_smsCount.Text = r.Value.SmsBalance.ToString(); } else { Message.Alert(this, r.Message, "null"); return; } } }
protected void Page_Load(object sender, EventArgs e) { BLL.Login.IsLogin(); if (!IsPostBack) { Model.EnterpriseUser user = (Model.EnterpriseUser)Session["Login"]; dd_l.Items.Clear(); DataTable dt = BLL.PhoneAndGroup.GetGroupByAccountCode(user.AccountCode); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { dd_l.Items.Add(new ListItem(dt.Rows[i]["TelPhoneGroupName"].ToString(), dt.Rows[i]["GID"].ToString())); } } dd_l.Items.Remove("0"); dd_l.Items.Insert(0, new ListItem("--请选择--", "-1")); } }