Пример #1
0
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            Model.SysAccount account = (Model.SysAccount)Session["Login"];
            if (account.UserCode != "admin")
            {
                bool ok = BLL.Permission.IsUsePermission(account.UserCode, del);
                if (!ok)
                {
                    Message.Alert(this, "无权限", "null");
                    return;
                }
            }
            string    serialNumber = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
            RPCResult r            = ZHSMSProxy.GetZHSMSPlatService().AffirmAuditFailureSMS(new Guid(serialNumber));

            if (r.Success)
            {
                Message.Success(this, "操作成功", "null");
                DataTable dt = (DataTable)this.ViewState["AuditFailure"];
                dt.Rows.RemoveAt(e.RowIndex);
                this.ViewState["AuditFailure"] = dt;
                GridView1.DataSource           = dt;
                GridView1.DataBind();
            }
            else
            {
                Message.Error(this, r.Message, "null");
            }
        }
Пример #2
0
        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;
            }
        }
Пример #3
0
 private void load()
 {
     dd_groups.Items.Clear();
     rb_types.Items.Clear();
     SMSModel.RPCResult <Dictionary <string, string> > r = ZHSMSProxy.GetZHSMSPlatService().GetKeyGroups();
     if (r.Success)
     {
         foreach (var v in r.Value)
         {
             ListItem li = new ListItem();
             li.Value = v.Key;
             li.Text  = v.Key;
             dd_groups.Items.Add(li);
         }
     }
     SMSModel.RPCResult <Dictionary <string, string> > rt = ZHSMSProxy.GetZHSMSPlatService().GetKeywordsTypes();
     if (rt.Success)
     {
         int i = 0;
         foreach (var v in rt.Value)
         {
             ListItem li = new ListItem();
             li.Value = v.Key;
             li.Text  = v.Key;
             rb_types.Items.Add(li);
             if (i == 0)
             {
                 li.Selected = true;
             }
             i++;
         }
     }
     dd_groups.Items.Insert(0, new ListItem("--请选择--", "-1"));
 }
Пример #4
0
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            Model.SysAccount account = (Model.SysAccount)Session["Login"];
            if (account.UserCode != "admin")
            {
                bool ok = BLL.Permission.IsUsePermission(account.UserCode, del);
                if (!ok)
                {
                    Message.Alert(this, "无权限", "null");
                    return;
                }
            }
            string    serialNumber = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
            RPCResult r            = ZHSMSProxy.GetZHSMSPlatService().DelSMS(new List <Guid> {
                new Guid(serialNumber)
            });

            if (r.Success)
            {
                Message.Success(this, "操作成功", "null");
                load();
            }
            else
            {
                Message.Error(this, r.Message, "null");
            }
        }
Пример #5
0
        private void LoadData()
        {
            string AnnunciateID = Request.QueryString["AnnunciateID"];
            string sthml        = string.Empty;

            sthml += " <div class=\"gonggao_title\">公告详情</div>";
            sthml += "  <ul class=\"gonggao_con\">";
            SMSModel.RPCResult <Model.Annunciate> no = ZHSMSProxy.GetZHSMSPlatService().GetAnnunciate(AnnunciateID);
            if (no != null)
            {
                sthml += " 	<li class=\"gg_con_title\">";
                sthml += " <a href=\"javascript:void(0);\">";
                sthml += "    <span class=\"title\">" + no.Value.AnnunciateTitle + "</span>";
                sthml += "   <span class=\"time\">" + no.Value.CreateTime + "</span>";
                sthml += " </a>";
                sthml += "  </li>";
                sthml += " <li class=\"gg_con_box\">";
                sthml += " 	<div class=\"gg_open_title\">" + no.Value.AnnunciateTitle + "<br /><span class=\"open_time\">" + no.Value.CreateTime + "</span></div>";
                sthml += "   <div class=\"gg_open_con\">" + no.Value.AnnunciateContent + "<br />";
                sthml += "   </div>";
                sthml += " </li>";
            }
            sthml += " </ul>";
            sthml += "</div>";
            this.tdInfo.InnerHtml = sthml;
        }
Пример #6
0
        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();
        }
Пример #7
0
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            Model.SysAccount account = (Model.SysAccount)Session["Login"];
            if (account.UserCode != "admin")
            {
                bool o = BLL.Permission.IsUsePermission(account.UserCode, del);
                if (!o)
                {
                    Message.Alert(this, "无权限", "null");
                    return;
                }
            }
            string    ID = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
            RPCResult rr = ZHSMSProxy.GetZHSMSPlatService().DelAnnunciate(ID);

            if (rr.Success)
            {
                Message.Success(this, rr.Message, "null");
                load();
            }
            else
            {
                Message.Alert(this, rr.Message, "null");
                return;
            }
        }
Пример #8
0
        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 GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            Model.SysAccount account = (Model.SysAccount)Session["Login"];
            if (account.UserCode != "admin")
            {
                bool ok = BLL.Permission.IsUsePermission(account.UserCode, del);
                if (!ok)
                {
                    Message.Alert(this, "无权限", "null");
                    return;
                }
            }
            string accountCode = this.GridView1.DataKeys[e.RowIndex][0].ToString();

            SMSModel.RPCResult r = ZHSMSProxy.GetZHSMSPlatService().DelEnterprise(accountCode);
            if (r.Success)
            {
                BLL.AccountEnterprise.Del(accountCode);
                Message.Success(this, "操作成功", "null");
                DataTable dt = (DataTable)this.ViewState["AgentLowerEnterprises"];
                dt.Rows.RemoveAt(e.RowIndex);
                this.ViewState["AgentLowerEnterprises"] = dt;
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
            else
            {
                Message.Alert(this, r.Message, "null");
            }
        }
Пример #10
0
        protected void bt1_Click(object sender, EventArgs e)
        {
            Model.SysAccount account = (Model.SysAccount)Session["Login"];
            if (account.UserCode != "admin")
            {
                bool ok = BLL.Permission.IsUsePermission(account.UserCode, bind);
                if (!ok)
                {
                    bt1.Visible = false;
                    Message.Alert(this, "无权限", "null");
                    return;
                }
            }
            List <string> a = new List <string>();

            for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
            {
                CheckBox CheckBox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox");
                if (CheckBox.Checked == true)
                {
                    string c = GridView1.DataKeys[i].Value.ToString();
                    a.Add(c);
                }
                RPCResult r = ZHSMSProxy.GetZHSMSPlatService().AddChannelGatewayBind(dd_l.SelectedValue, a);
            }
            CheckBoxAll.Checked = false;
            CheckBox1.Checked   = false;
            load();
            Message.Success(this, "通道网关绑定成功", "null");
        }
Пример #11
0
 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");
     }
 }
Пример #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     BLL.Login.IsLogin();
     Model.SysAccount account = (Model.SysAccount)Session["Login"];
     if (account.UserCode != "admin")
     {
         this.ViewState["Permissions"] = BLL.Permission.GetPermissionByAccount(account.UserCode);
     }
     if (!IsPostBack)
     {
         dd_l.Items.Clear();
         RPCResult <List <SMSModel.Channel> > r = ZHSMSProxy.GetZHSMSPlatService().GetChannels();
         if (r.Success)
         {
             if (r.Value.Count > 0)
             {
                 foreach (SMSModel.Channel c in r.Value)
                 {
                     dd_l.Items.Add(new ListItem(c.ChannelName, c.ChannelID));
                 }
             }
         }
         dd_l.Items.Insert(0, new ListItem("--请选择--", "-1"));
         load();
     }
 }
Пример #13
0
        private void load()
        {
            string    qryNum             = txt_Num.Text.Trim();
            DataTable dt                 = CreateTable();
            RPCResult <List <string> > r = ZHSMSProxy.GetZHSMSPlatService().GetBlacklist();

            if (r.Success)
            {
                lbl_message.Visible = false;
                List <string> ss = r.Value;
                if (!string.IsNullOrWhiteSpace(qryNum))
                {
                    ss = ss.Where(n => n.IndexOf(qryNum) > -1).ToList();
                }
                if (ss.Count > 0)
                {
                    foreach (string s in ss)
                    {
                        DataRow dr = dt.NewRow();
                        dr["A"] = s;
                        dt.Rows.Add(dr);
                    }
                }
            }
            GridView1.DataSource = dt;
            GridView1.DataBind();
            this.ViewState["BlackDt"] = dt;
        }
Пример #14
0
        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            Model.SysAccount account = (Model.SysAccount)Session["Login"];
            if (account.UserCode != "admin")
            {
                bool ok = BLL.Permission.IsUsePermission(account.UserCode, del);
                if (!ok)
                {
                    Message.Alert(this, "无权限", "null");
                    return;
                }
            }
            string    phone = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
            RPCResult r     = ZHSMSProxy.GetZHSMSPlatService().DelBlacklist(new List <string> {
                phone
            });

            if (r.Success)
            {
                Message.Success(this, "黑名单删除成功", "null");
                DataTable dt    = (DataTable)this.ViewState["BlackDt"];
                int       index = e.RowIndex;
                dt.Rows.RemoveAt(index);
                this.ViewState["BlackDt"] = dt;
                GridView1.DataSource      = dt;
                GridView1.DataBind();
            }
            else
            {
                Message.Alert(this, r.Message, "null");
            }
        }
Пример #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     BLL.Login.IsLogin();
     Model.SysAccount account = (Model.SysAccount)Session["Login"];
     if (account.UserCode != "admin")
     {
         string permissionValue = "AuditEnterprise.Manage.Audit";
         bool   ok = BLL.Permission.IsUsePermission(account.UserCode, permissionValue);
         if (!ok)
         {
             Message.Alert(this, "无权限", "null");
             return;
         }
     }
     if (!IsPostBack)
     {
         ProvinceLoad();
         SMSModel.RPCResult <List <SMSModel.Channel> > r = ZHSMSProxy.GetZHSMSPlatService().GetChannels();
         if (r.Success)
         {
             foreach (var v in r.Value)
             {
                 ListItem li = new ListItem();
                 li.Value = v.ChannelID;
                 li.Text  = v.ChannelName;
                 rb_SMSChannel.Items.Add(li);
             }
         }
         load();
     }
 }
Пример #16
0
 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();
             }
         }
     }
 }
Пример #17
0
 protected void btnFailuer_Click(object sender, EventArgs e)
 {
     //不通过
     if (txt_remark.Text.Trim() == "")
     {
         Message.Alert(this, "审核不通过时,请在审核备注里填写理由", "null");
         return;
     }
     Model.AuditEnterprise audit = new Model.AuditEnterprise();
     audit.Auditor          = ((Model.SysAccount)Session["Login"]).UserCode;
     audit.AuditRemark      = txt_remark.Text;
     audit.AuditResult      = true;
     audit.AuditTime        = DateTime.Now;
     audit.EnterpriseCode   = Request.QueryString["AccountID"];
     audit.EnterpriseResult = false;
     SMSModel.RPCResult r = ZHSMSProxy.GetZHSMSPlatService().UpdateAuditEnterprise(audit);
     if (r.Success)
     {
         btnFailuer.Enabled = false;
         btnSubmit.Enabled  = false;
         Message.Success(this, "操作成功", "null");
     }
     else
     {
         Message.Alert(this, r.Message, "null");
     }
     Response.Redirect("AuditEnterpriseManage.aspx");
 }
Пример #18
0
        void load()
        {
            DataTable dt = CreateTable();

            SMSModel.RPCResult <string[, ]> r = ZHSMSProxy.GetZHSMSPlatService().GetSMSStatistics(DateTime.Parse(txt_Start.Text), DateTime.Parse(txt_End.Text));
            if (r.Success)
            {
                if (r.Value != null && r.Value.Length > 0)
                {
                    string[,] str = r.Value;
                    long sendcount    = str[0, 0] == "" ? 0 : long.Parse(str[0, 0]);
                    long failurecount = str[0, 1] == "" ? 0 : long.Parse(str[0, 1]);

                    DataRow dr = dt.NewRow();
                    dr["SendCount"]    = sendcount;
                    dr["SuccessCount"] = (sendcount - failurecount).ToString();
                    dr["FailureCount"] = failurecount;
                    if (sendcount == 0)
                    {
                        dr["SuccessRate"] = "没有短信发送";
                    }
                    else
                    {
                        dr["SuccessRate"] = Decimal.Round(((decimal)(sendcount - failurecount) / sendcount) * 100, 2) + "%";
                    }
                    dt.Rows.Add(dr);
                }
            }
            else
            {
                Message.Alert(this, r.Message, "null");
            }
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
        private void load()
        {
            Model.EnterpriseUser account = (Model.EnterpriseUser)Session["Login"];
            RPCResult <List <Model.EnterpriseUser> > r = ZHSMSProxy.GetZKD().GetLowerEnterprises(account.AccountCode);
            DataTable dt = CreateTable();

            if (r.Success)
            {
                List <Model.EnterpriseUser> accounts = r.Value;
                if (accounts.Count > 0)
                {
                    foreach (Model.EnterpriseUser a in accounts)
                    {
                        DataRow dr = dt.NewRow();
                        dr["accountID"] = a.AccountID;
                        dr["code"]      = a.AccountCode;

                        dr["name"]    = a.Name;
                        dr["contact"] = a.Contact;
                        dr["phone"]   = a.Phone;
                        dr["address"] = a.Address;
                        dt.Rows.Add(dr);
                    }
                }

                GridView1.DataSource = dt;
                GridView1.DataBind();
                Session["dt"] = dt;
            }
        }
 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.SecretKeyReset";
         bool   ok = BLL.Permission.IsUsePermission(account.UserCode, permissionValue);
         if (!ok)
         {
             Message.Alert(this, "无权限", "null");
             return;
         }
     }
     if (!IsPostBack)
     {
         lbl_account.Text = Request.QueryString["AccountID"];
         SMSModel.RPCResult <Model.EnterpriseUser> r = ZHSMSProxy.GetZHSMSPlatService().GetEnterprise(lbl_account.Text);
         if (r.Success)
         {
             if (string.IsNullOrEmpty(r.Value.SecretKey))
             {
                 lbl_oldSecretKey.Text = "使用企业默认密钥";
             }
             else
             {
                 lbl_oldSecretKey.Text = r.Value.SecretKey;
             }
         }
     }
 }
Пример #21
0
        private void load()
        {
            DataTable dt                 = CreateTable();
            DateTime  starttime          = Convert.ToDateTime(txt_S.Text);
            DateTime  endtime            = Convert.ToDateTime(txt_E.Text);
            string    account            = Request.QueryString["AccountID"];
            RPCResult <List <MOSMS> > rr = ZHSMSProxy.GetZHSMSPlatService().GetMOSMS(account, starttime, endtime);

            if (rr.Success)
            {
                lbl_message.Visible = false;
                Label1.Text         = "当前已接收的短信有" + rr.Value.Count + "批次";
                var l = rr.Value.OrderByDescending(m => m.ReceiveTime);
                foreach (MOSMS s in l)
                {
                    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);
                }
            }
            else
            {
                Message.Alert(this, rr.Message, "null");
            }
            //   dt.DefaultView.Sort = "ReceiveTime desc";
            this.ViewState["MOSMS"] = dt;
            GridView1.DataSource    = dt;
            GridView1.DataBind();
        }
Пример #22
0
 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");
     }
 }
Пример #23
0
 protected void bt1_Click(object sender, EventArgs e)
 {
     Model.SysAccount account = (Model.SysAccount)Session["Login"];
     if (account.UserCode != "admin")
     {
         bool ok = BLL.Permission.IsUsePermission(account.UserCode, suc);
         if (!ok)
         {
             bt1.Visible = false;
             Message.Alert(this, "无权限", "null");
             return;
         }
     }
     for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
     {
         CheckBox CheckBox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox");
         if (CheckBox.Checked == true)
         {
             string    serialNumber = GridView1.DataKeys[i].Value.ToString();
             RPCResult r            = ZHSMSProxy.GetZHSMSPlatService().SetSMSLevel(Guid.Parse(serialNumber), (SMSModel.LevelType)(int.Parse(dd_l.SelectedItem.Text)), account.UserCode);
         }
     }
     CheckBoxAll.Checked = false;
     CheckBox1.Checked   = false;
     load();
     Message.Success(this, " 短信优先级调整成功", "null");
 }
Пример #24
0
        private void LoadData(DateTime beg, DateTime end)
        {
            string sthml = string.Empty;

            //sthml += " <div class=\"gonggao_title\">公告列表</div>";
            sthml += "  <ul class=\"gonggao_con\">";
            SMSModel.RPCResult <List <Model.Annunciate> > no = ZHSMSProxy.GetZHSMSPlatService().GetAunnuciateByMangge(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;
        }
Пример #25
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string gateway  = Request.QueryString["gateway"];
            string keyGroup = "";

            foreach (ListItem li in rb_keyGroup.Items)
            {
                if (li.Selected == true)
                {
                    keyGroup = li.Value;
                }
            }
            if (keyGroup == "")
            {
                Message.Alert(this, "请选择要关联的关键词组", "null");
                return;
            }
            SMSModel.RPCResult r = ZHSMSProxy.GetZHSMSPlatService().AddkeyGroupGatewayBind(keyGroup, gateway);
            if (r.Success)
            {
                Message.Success(this, "操作成功", "null");
                return;
            }
            Message.Alert(this, r.Message, "null");
        }
Пример #26
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     SMSModel.GatewayConfiguration config = new SMSModel.GatewayConfiguration();
     config.Operators = new List <string>();
     foreach (ListItem li in cb_operators.Items)
     {
         if (li.Selected == true)
         {
             config.Operators.Add(li.Value);
         }
     }
     if (config.Operators.Count == 0)
     {
         Message.Alert(this, "请选择运营商", "null");
         return;
     }
     config.HandlingAbility = int.Parse(txt_handlity.Text);
     config.Gateway         = txt_gateway.Text;
     SMSModel.RPCResult r = ZHSMSProxy.GetZHSMSPlatService().AddGatewayConfig(config);
     if (r.Success)
     {
         Message.Success(this, "添加成功", "null");
     }
     else
     {
         Message.Alert(this, r.Message, "null");
     }
 }
        void load()
        {
            string accountID = Request.QueryString["AccountID"];
            RPCResult <List <Model.ChargeRecord> > r = ZHSMSProxy.GetZKD().GetEnterpriseChargeRecord(accountID, DateTime.Parse(txt_startTime.Text), DateTime.Parse(txt_endTime.Text));
            DataTable dt = CreateTable();

            if (r.Success)
            {
                List <Model.ChargeRecord> list = r.Value;
                foreach (var v in list)
                {
                    DataRow dr = dt.NewRow();
                    dr["operatorAccount"] = v.OperatorAccount;
                    dr["accountCode"]     = v.PrepaidAccount;
                    dr["number"]          = v.SMSCount;
                    dr["moneny"]          = v.Money;
                    dr["dateTime"]        = v.PrepaidTime;
                    dr["rate"]            = v.ThenRate;
                    dr["type"]            = v.PrepaidType == 0 ? "金额充值" : "短信条数充值";
                    dr["Remark"]          = v.Remark;
                    dt.Rows.Add(dr);
                }
                dt.DefaultView.Sort  = "dateTime desc";
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
        }
Пример #28
0
        private void search(int pageIndex)
        {
            DataTable dt = CreateTable();

            SMSModel.RPCResult <List <Model.SMSTemplet> > r = ZHSMSProxy.GetZHSMSPlatService().GetAuditSMSTemplet(DateTime.Parse(txt_S.Text), DateTime.Parse(txt_E.Text));
            if (r.Success)
            {
                List <Model.SMSTemplet> 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["TempletID"]      = s.TempletID;
                    dr["AccountCode"]    = s.AccountCode;
                    dr["AccountName"]    = s.AccountName;
                    dr["TempletContent"] = s.TempletContent + s.Signature;
                    dr["SubmitTime"]     = s.SubmitTime;
                    dr["Signature"]      = s.Signature;
                    dt.Rows.Add(dr);
                }
            }
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
Пример #29
0
        private void QueryByInputText()
        {
            DataTable dt       = CreateTable();
            string    condtion = txt_name.Text;

            SMSModel.RPCResult <List <Model.EnterpriseUser> > r = ZHSMSProxy.GetZHSMSPlatService().GetAuditEnterprises();
            if (r.Success)
            {
                List <Model.EnterpriseUser> enterprises = r.Value;

                foreach (Model.EnterpriseUser a in enterprises)
                {
                    DataRow dr = dt.NewRow();
                    dr["accountID"]    = a.AccountID;
                    dr["code"]         = a.AccountCode;
                    dr["name"]         = a.Name;
                    dr["contact"]      = a.Contact;
                    dr["phone"]        = a.Phone;
                    dr["address"]      = a.Address;
                    dr["registerDate"] = a.RegisterDate;
                    dt.Rows.Add(dr);
                }
                if (condtion != "")
                {
                    DataView dv = new DataView(dt);
                    dv.RowFilter = "code like '%" + condtion + "%' or name like '%" + condtion + "%'";
                    dt           = dv.ToTable();
                }
                this.ViewState["AgentEnterprises"] = dt;
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
        }
Пример #30
0
 private void ChannelGatewayBindLoad()
 {
     foreach (DataListItem item in DataListGateway.Items)
     {
         System.Web.UI.WebControls.CheckBoxList cbk = (CheckBoxList)item.FindControl("Application_ID");
         foreach (ListItem li in cbk.Items)
         {
             li.Selected = false;
         }
     }
     SMSModel.RPCResult <List <string> > r = ZHSMSProxy.GetZHSMSPlatService().GetGatewaysByChannel(lbl_channelID.Text);
     if (r.Success)
     {
         foreach (string str in r.Value)
         {
             foreach (DataListItem item in DataListGateway.Items)
             {
                 System.Web.UI.WebControls.CheckBoxList cbk = (CheckBoxList)item.FindControl("Application_ID");
                 for (int i = 0; i < cbk.Items.Count; i++)
                 {
                     if (cbk.Items[i].Value == str)
                     {
                         cbk.Items[i].Selected = true;
                     }
                 }
             }
         }
     }
     else
     {
         btnSubmit.Visible = false;
         Message.Alert(this, r.Message, "null");
     }
 }