Beispiel #1
0
        //申请开通高级网店
        protected void AddEShop()
        {
            if (!IsCompanyCheck)
            {
                Response.Clear();
                return;
            }
            int    result      = 0;
            string ContactName = Utils.InputText(Server.HtmlDecode(Request.QueryString["p"]));
            string Tel         = Utils.InputText(Server.HtmlDecode(Request.QueryString["t"]));
            string Mobile      = Utils.InputText(Server.HtmlDecode(Request.QueryString["m"]));
            string Net         = Utils.InputText(Request.QueryString["n"]);
            string CompanyName = Utils.InputText(Server.HtmlDecode(Request.QueryString["c"]));

            if (ContactName.Length > 0 && Tel.Length > 0 && Mobile.Length > 0 && Net.Length > 0 && CompanyName.Length > 0)
            {
                if (Utils.IsMobile(Mobile) && Utils.IsPhone(Tel) && StringValidate.IsUrl(Net) && CompanyName == this.SiteUserInfo.CompanyName)
                {
                    EyouSoft.Model.SystemStructure.SysApplyServiceInfo model = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();
                    model.ContactMobile    = Mobile;
                    model.ContactMQ        = this.SiteUserInfo.ContactInfo.MQ;
                    model.ContactName      = ContactName;
                    model.ContactQQ        = this.SiteUserInfo.ContactInfo.QQ;
                    model.ContactTel       = Tel;
                    model.ApplyTime        = DateTime.Now;
                    model.UserId           = this.SiteUserInfo.ID;
                    model.CityId           = this.SiteUserInfo.CityId;
                    model.CityName         = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(this.SiteUserInfo.CityId).CityName;
                    model.CompanyId        = this.SiteUserInfo.CompanyID;
                    model.CompanyName      = this.SiteUserInfo.CompanyName;
                    model.ProvinceId       = this.SiteUserInfo.ProvinceId;
                    model.ProvinceName     = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(this.SiteUserInfo.ProvinceId).ProvinceName;
                    model.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.HighShop;
                    model.ApplyText        = Net;
                    if (EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().Apply(model))
                    {
                        result = 1;
                    }
                    model = null;
                }
                else
                {
                    result = 4;  //数据输入错误
                }
            }
            else
            {
                result = 3;     //数据填写不完整
            }
            Response.Write(result.ToString());
            Response.End();
            return;
        }
Beispiel #2
0
        /// <summary>
        /// 修改友情链接
        /// </summary>
        private void UpdateFriendLink()
        {
            string LinkAddress = Utils.InputText(Request.QueryString["LinkAddress"]);

            LinkAddress = LinkAddress.ToLower().Contains("http://") ? LinkAddress : "http://" + LinkAddress;
            string LinkName = Server.HtmlDecode(Utils.InputText(Request.QueryString["LinkName"]));
            string errorMsg = string.Empty;

            if (string.IsNullOrEmpty(LinkName))
            {
                errorMsg = "链接名称为空或输入错误!";
            }
            if (string.IsNullOrEmpty(LinkAddress))
            {
                errorMsg = errorMsg == "" ? "链接地址不能为空!" : errorMsg + ",链接地址不能为空!";
            }
            else
            {
                if (!StringValidate.IsUrl(LinkAddress))
                {
                    errorMsg = errorMsg == "" ? "链接地址输入错误!" : errorMsg + ",链接地址输入错误!";
                }
            }
            if (errorMsg == "")
            {
                EyouSoft.Model.ShopStructure.HighShopFriendLink link = new EyouSoft.Model.ShopStructure.HighShopFriendLink();
                link.ID          = StringValidate.SafeRequest(Request.QueryString["FriendLinkId"]);
                link.CompanyID   = CompanyId;
                link.LinkAddress = LinkAddress;
                link.OperatorID  = this.SiteUserInfo.ID;
                link.LinkName    = StringValidate.SafeRequest(LinkName);
                link.SortID      = Utils.GetInt(Request.QueryString["SortId"], 0);
                if (EyouSoft.BLL.ShopStructure.HighShopFriendLink.CreateInstance().Update(link))
                {
                    link = null;
                    Response.Clear();
                    Response.Write("1");
                    Response.End();
                }
            }
            else
            {
                Response.Clear();
                Response.Write("{errorMsg:\"" + errorMsg + "\"}");
                Response.End();
            }
        }