Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.MaintainScrollPositionOnPostBack = true;
     shopName    = SellersBLL.GetSignName(Users.Nick);
     users.Value = shopName;
     if (!Page.IsPostBack)
     {
         string type = string.Empty;
         if (Request.QueryString["type"] != null)
         {
             type = Request.QueryString["type"].ToString();
         }
         else
         {
             type = "notplay";
         }
         //初始化短信发送条件配置
         MsgSendConfig o = new MsgSendConfig();
         o.warnType = type;
         mark       = type;
         //o.SellerNick = "TestAcc001";
         o.SellerNick = Users.Nick;
         if (MemberNotifyBLL.CheckMsgConfigTypeIsExit(o))
         {
             InitAutoControl(o);
         }
         else
         {
             clearValue(o.warnType);
         }
     }
 }
Ejemplo n.º 2
0
        protected void btnSave_Click(object sender, ImageClickEventArgs e)
        {
            bool          isOk = false;
            MsgSendConfig msc  = getMsgObj();

            msc.warnType = mark;
            int amount   = 0;
            int amount01 = 0;

            try
            {
                amount   = Convert.ToInt32(txtAmount.Text.Trim());
                amount01 = Convert.ToInt32(txtAmount01.Text.Trim());
                if (amount >= amount01)
                {
                    Alert("请输入正确的订单金额!");
                }
            }
            catch
            {
                Alert("请输入正确的金额!");
                return;
            }
            msc.Amount    = amount.ToString();
            msc.AmountMax = amount01.ToString();
            //是否开启提醒  统一使用UnPayType作为短信内容
            if (radio_on.Checked)
            {
                msc.UnPayType = "1";
            }
            else
            {
                msc.UnPayType = "0";
            }
            //是否开启黑名单过滤
            if (cbx_blackList.Checked == true)
            {
                msc.blackListType = 1;
            }
            else
            {
                msc.blackListType = 0;
            }
            //是否开启3天过滤
            if (cbx_threeDay.Checked == true)
            {
                msc.threeDayType = 1;
            }
            else
            {
                msc.threeDayType = 0;
            }//是否开启地区过滤
            if (cbx_area.Checked == true)
            {
                msc.areType = 1;
                msc.areList = tbx_area.Text.Trim();
            }
            //金额过滤
            msc.Amount = txtAmount.Text.Trim();
            //短信内容  统一使用UnpayMsg作为短信内容
            msc.UnpayMsg = txt_div_nopay_msg.Text.Trim();
            msc.warnType = mark;
            if (MemberNotifyBLL.CheckMsgConfigTypeIsExit(msc))
            {
                isOk = MemberNotifyBLL.updateWarn(msc);
            }
            else
            {
                isOk = MemberNotifyBLL.addWarnConfig(msc);
            }
            if (isOk)
            {
                Alert("保存成功!");
            }
            else
            {
                Alert("保存失败!");
            }
        }