Ejemplo n.º 1
0
        private void Del()
        {
            int[] ids    = Utils.GetIntArray(Utils.GetQueryStringValue("ids"), ",");
            int   result = new EyouSoft.BLL.SmsStructure.BSmsPhrase().DelSmsPhrase(ids);

            if (result == 1)
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("tableToolbar._showMsg('删除成功!');window.location.href='SmsList.aspx?sl={0}';", Utils.GetQueryStringValue("sl")));
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("tableToolbar._showMsg('删除失败!');window.location.href='SmsList.aspx?sl={0}';", Utils.GetQueryStringValue("sl")));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void PageInit()
        {
            InitType();
            int Id = Utils.GetInt(Utils.GetQueryStringValue("id"));

            if (!Id.Equals(0))
            {
                var item = new EyouSoft.BLL.SmsStructure.BSmsPhrase().GetSmsPhrase(Id);
                if (item != null)
                {
                    TypeSelValue    = item.SmsPhraseType.TypeId.ToString();
                    txtContent.Text = item.Content;
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void PageInit()
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            var list = new EyouSoft.BLL.SmsStructure.BSmsPhrase().GetSmsPhraseList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, null);

            if (list == null || list.Count == 0)
            {
                this.ExporPageInfoSelect1.Visible = false;
                this.repList.EmptyText            = "<tr><td colspan=\"3\" align=\"center\">暂无相关记录!</td></tr>";
            }
            else
            {
                this.repList.DataSource = list;
                this.repList.DataBind();
                BindPage();
            }
        }
Ejemplo n.º 4
0
        private void PageInit()
        {
            EyouSoft.Model.SmsStructure.MQuerySmsPhrase model = new EyouSoft.Model.SmsStructure.MQuerySmsPhrase()
            {
                SmsPhraseType = new EyouSoft.Model.SmsStructure.MSmsPhraseTypeBase()
                {
                    TypeId = Utils.GetInt(Utils.GetQueryStringValue("type"))
                },
                KeyWord = Utils.GetQueryStringValue("iptKeyWord")
            };
            var List = new EyouSoft.BLL.SmsStructure.BSmsPhrase().GetSmsPhraseList(PageSize, PageIndex, ref RecordCount, SiteUserInfo.CompanyId, model);

            if (List != null && List.Count > 0)
            {
                this.repList.DataSource = List;
                this.repList.DataBind();
            }
            else
            {
                this.repList.EmptyText            = "<tr align=\"center\"><td colspan=\"3\">暂无常用短信!</td></tr>";
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            string msg       = string.Empty;
            int    TypeValue = Utils.GetInt(Utils.GetFormValue("selType"));
            string Content   = Utils.GetFormValue(txtContent.UniqueID);

            if (TypeValue == 0)
            {
                msg += "短信类型不能为空!</br>";
            }
            if (string.IsNullOrEmpty(Content))
            {
                msg += "短信内容不能为空";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson("0", msg));
                Response.End();
            }
            int Id     = Utils.GetInt(Utils.GetQueryStringValue("id"));
            int Result = 0;

            if (Id == 0)
            {
                Result = new EyouSoft.BLL.SmsStructure.BSmsPhrase().AddSmsPhrase(new EyouSoft.Model.SmsStructure.MSmsPhrase()
                {
                    CompanyId     = CurrentUserCompanyID,
                    Content       = Content,
                    IssueTime     = DateTime.Now,
                    OperatorId    = SiteUserInfo.UserId,
                    SmsPhraseType = new EyouSoft.Model.SmsStructure.MSmsPhraseTypeBase()
                    {
                        TypeId = TypeValue
                    }
                });
            }
            else
            {
                Result = new EyouSoft.BLL.SmsStructure.BSmsPhrase().UpdateSmsPhrase(new EyouSoft.Model.SmsStructure.MSmsPhrase()
                {
                    CompanyId     = CurrentUserCompanyID,
                    Content       = Content,
                    OperatorId    = SiteUserInfo.UserId,
                    PhraseId      = Id,
                    SmsPhraseType = new EyouSoft.Model.SmsStructure.MSmsPhraseTypeBase()
                    {
                        TypeId = TypeValue
                    }
                });
            }
            Response.Clear();
            if (Result == 1)
            {
                Response.Write(UtilsCommons.AjaxReturnJson("1", "保存成功!"));
            }
            else
            {
                Response.Write(UtilsCommons.AjaxReturnJson("0", "保存失败!"));
            }
            Response.End();
        }