Example #1
0
        protected void btnGenerate_Click(object sender, EventArgs e)
        {
            string signName = txtSign.Text.Trim();

            if (string.IsNullOrEmpty(signName))
            {
                lbMsg.Text      = "店铺签名不能为空!";
                lbMsg.ForeColor = Color.Red;
                return;
            }
            if (signName.Length > 15)
            {
                lbMsg.Text      = "店铺签名不能超过15个字符!";
                lbMsg.ForeColor = Color.Red;
                return;
            }
            if (!string.IsNullOrEmpty(signName))
            {
                Sellers objSell = new Sellers();
                objSell.Nick         = Users.Nick;
                objSell.SignShopName = signName;
                objSell.Cellphone    = "";
                if (SellersBLL.SetShopName(objSell))
                {
                    lbMsg.Text = "修改成功!";
                    Page_Load(sender, e);
                }
            }
        }
Example #2
0
        protected void imgBtnSetSign_Click(object sender, ImageClickEventArgs e)
        {
            if (String.IsNullOrEmpty(txtShopSign.Text.Trim()))
            {
                lbSignMsg.Text = "自定义签名不能为空!"; return;
            }
            Sellers objSell = new Sellers();

            objSell.Nick         = Users.Nick;
            objSell.SignShopName = txtShopSign.Text.Trim();
            objSell.Cellphone    = "";
            if (SellersBLL.SetShopName(objSell))
            {
                lbSignMsg.Text      = "签名修改成功,物流提醒将使用此签名!";
                lbSignMsg.ForeColor = Color.Blue;
                lbShopSignPre.Text  = "【" + SellersBLL.GetSignName(Users.Nick) + "】";
            }
            else
            {
                lbSignMsg.Text = "签名保存失败,联系客服!";
            }
        }
Example #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");
            string nick  = context.Request.Form["nick"];
            string phone = context.Request.Form["phone"];

            if (!string.IsNullOrEmpty(phone) && !Utility.IsCellPhone(phone))
            {
                context.Response.Write("0");
                context.Response.End();
                return;
            }
            if (!string.IsNullOrEmpty(nick))
            {
                Sellers objSell = new Sellers();
                objSell.Nick         = Users.Nick;
                objSell.SignShopName = nick;
                objSell.Cellphone    = phone;
                SellersBLL.SetShopName(objSell);
                context.Response.Write("1");
                context.Response.End();
            }
        }