Example #1
0
 void initLazyLoaders(bool newOrder)
 {
     _OemInfoLoader = new LazyLoader <OEMInfo>(() => OEMService.QueryOEMById(OEMID.Value));
     if (newOrder)
     {
         _applyformLoader    = new EnumerableLazyLoader <BaseApplyform>();
         _operationLoader    = new EnumerableLazyLoader <Log.Domain.OrderLog>();
         _coordinationLoader = new EnumerableLazyLoader <Coordination>();
     }
     else
     {
         _applyformLoader = new EnumerableLazyLoader <BaseApplyform>(() => {
             return(ApplyformQueryService.QueryApplyforms(this.Id));
         });
         _operationLoader = new EnumerableLazyLoader <Log.Domain.OrderLog>(() => {
             return(LogService.QueryOrderLog(this.Id));
         });
         _coordinationLoader = new EnumerableLazyLoader <Coordination>(() => {
             return(CoordinationService.QueryOrderCoordinations(this.Id));
         });
     }
     _associateOrderLoader   = new LazyLoader <Order>();
     _distributionBillLoader = new LazyLoader <Service.Distribution.Domain.OrderBill>(() => {
         return(DistributionQueryService.QueryOrderBill(this.Id));
     });
 }
Example #2
0
        public static bool HasUsePlatformConfig(Guid oemId, ConfigUseType type)
        {
            if (oemId == Guid.Empty)
            {
                return(true);
            }

            var config = OEMAirlineConfigService.QueryConfig(oemId);

            if (config.Config.ContainsKey(type))
            {
                return(false);
            }
            else
            {
                if (OEMService.QueryOEMById(oemId).UseB3BConfig)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
Example #3
0
        private void bingOEMContract(Guid companyId)
        {
            var oemInfo = OEMService.QueryOEM(companyId);

            if (oemInfo != null && oemInfo.Contract != null)
            {
                bingOEMContract(oemInfo.Contract);
            }
        }
Example #4
0
 void initLazyLoaders()
 {
     _operationLoader    = new EnumerableLazyLoader <Log.Domain.OrderLog>(() => LogService.QueryApplyformLog(this.Id));
     _coordinationLoader = new EnumerableLazyLoader <Coordination>(() => CoordinationService.QueryApplyformCoordinations(this.Id));
     _orderLoader        = new LazyLoader <Order>(() => OrderQueryService.QueryOrder(this.OrderId));
     _purchaserLoader    = new LazyLoader <DataTransferObject.Organization.CompanyInfo>(() => Organization.CompanyService.GetCompanyDetail(this.PurchaserId));
     _providerLoader     = new LazyLoader <DataTransferObject.Organization.CompanyInfo>(() => Organization.CompanyService.GetCompanyDetail(this.ProviderId));
     _OemInfoLoader      = new LazyLoader <OEMInfo>(() => OEMService.QueryOEMById(OEMID.Value));
 }
Example #5
0
        /// <summary>
        /// 查询上级的OEM信息
        /// </summary>
        private static OEMInfo GetSuperiorOEMInfo(Guid companyId)
        {
            var superiorInfo = CompanyService.QuerySuperiorInfo(companyId);

            if (superiorInfo == null)
            {
                return(null);
            }
            return(OEMService.QueryOEM(superiorInfo.Id));
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (fileImg.PostedFile.ContentLength > 51200)
            {
                ShowMessage("上传图片过大,请选择小图片。");
                return;
            }
            string path = "";

            try
            {
                path = fileImg.HasFile ? Service.FileService.Upload(fileImg, "OEMLogo", "(jpg)|(gif)|(png)|(jpeg)", 51200) : OldImgUrl.Text.Replace(FileWeb, "");
            }
            catch (Exception ex)
            {
                ShowExceptionMessage(ex, "上传图片");
                return;
            }
            DistributionOEM oem = new DistributionOEM()
            {
                SiteName       = txtName.Text,
                DomainName     = txtDomain.Text,
                ManageEmail    = txtEmail.Text,
                ICPRecord      = txtICP.Text,
                LogoPath       = path,
                EmbedCode      = txtEmbedCode.Text,
                Enabled        = radEnabled.Checked,
                AllowSelfRegex = radAllowSelfRegex.Checked
            };
            var oemold = OEMService.QueryOEM(Guid.Parse(Request.QueryString["id"]));

            oem.AirlineConfig   = oemold.AirlineConfig;
            oem.AuthCashDeposit = oemold.AuthCashDeposit;
            oem.CompanyId       = oemold.CompanyId;
            oem.Contract        = oemold.Contract;
            oem.EffectTime      = oemold.EffectTime;
            oem.RegisterTime    = oemold.RegisterTime;
            oem.Setting         = oemold.Setting;
            oem.UseB3BConfig    = oemold.UseB3BConfig;
            oem.OperatorAccount = oemold.OperatorAccount;
            oem.Id       = oemold.Id;
            oem.LoginUrl = oemold.LoginUrl;
            try
            {
                DistributionOEMService.UpdateDistributionOEM(oem);
            }
            catch (Exception ex)
            {
                ShowExceptionMessage(ex, "修改站点信息");
                return;
            }
            //刷新缓存
            FlushRequester.TriggerOEMFlusher(oem.Id);
            RegisterScript("alert('修改站点信息成功!');window.location.href='DistributionOemAuthorizationList.aspx';", true);
        }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     RegisterOEMSkins("page.css");
     RegisterOEMSkins("register.css");
     if (!IsPostBack)
     {
         var oem = OEMService.QueryOEM(CurrentCompany.CompanyId);
         LoadStyle(oem);
     }
 }
Example #8
0
        /// <summary>
        /// 根据给出的OEM编号和类型,得到其Office号;
        /// </summary>
        /// <param name="oemId"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        private static string GetOfficeNumber(Guid oemId, ConfigUseType type)
        {
            var config       = OEMAirlineConfigService.QueryConfig(oemId);
            var officeNumber = config.Config.ContainsKey(type) ? config.Config[type].Item2 : null;

            if (string.IsNullOrEmpty(officeNumber) && OEMService.QueryOEMById(oemId).UseB3BConfig)
            {
                config       = OEMAirlineConfigService.QueryConfig(Guid.Empty);
                officeNumber = config.Config.ContainsKey(type) ? config.Config[type].Item2 : null;
            }

            return(officeNumber);
        }
 void Query(Pagination pagination)
 {
     try
     {
         var oem = OEMService.QueryOEM(CurrentCompany.CompanyId);
         Range <DateTime> time = new Range <DateTime> {
             Lower = DateTime.Parse(txtStartTime.Text), Upper = DateTime.Parse(txtEndTime.Text)
         };
         var query_list = IntegralServer.GetIntegralConsumptionList(time, null, IntegralWay.Exchange, (ExchangeState)int.Parse(XiaoFei.Value), null, "1", oem == null ? (Guid?)null : oem.Id, pagination);
         var list       = from item in query_list
                          select new
         {
             ID = item.Id,
             item.ExchangeTiem,
             item.CommodityName,
             item.CompanyShortName,
             item.AccountNo,
             item.AccountName,
             Count    = item.CommodityCount,
             Integral = item.ConsumptionIntegral,
             Phone    = item.AccountPhone,
             Exchange = item.Exchange.GetDescription(),
             item.ConsumptionIntegral,
             Remark = item.Way == IntegralWay.ExchangeSms ? "" : (item.OEMCommodityState == OEMCommodityState.Processing ? "<a href='javascript:shengqi(\"" + item.Id + "\");'>申请平台处理</a>" : item.Exchange == ExchangeState.Processing ? "平台正在处理" : "平台已处理")
         };
         grv_xiaofei.DataSource = list;
         grv_xiaofei.DataBind();
         if (query_list.Any())
         {
             this.pager.Visible = true;
             showempty.Visible  = false;
             if (pagination.GetRowCount)
             {
                 this.pager.RowCount = pagination.RowCount;
             }
             grv_xiaofei.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             pager.Visible     = false;
             showempty.Visible = true;
         }
     }
     catch (Exception ex)
     {
         pager.Visible     = false;
         showempty.Visible = true;
         ShowExceptionMessage(ex, "查询");
     }
 }
Example #10
0
        private oem.OEMInfo createOEMContract()
        {
            Guid companyId = GetGuid();
            var  oemInfo   = OEMService.QueryOEM(companyId);

            oemInfo.Contract.EnterpriseQQ                   = txtEnterpriseQQ.Text.Trim();
            oemInfo.Contract.Fax                            = txtFax.Text.Trim();
            oemInfo.Contract.ServicePhone                   = txtServicePhone.Text.Trim();
            oemInfo.Contract.RefundPhone                    = txtRefundPhone.Text.Trim();
            oemInfo.Contract.ScrapPhone                     = txtScrapPhone.Text.Trim();
            oemInfo.Contract.PayServicePhone                = txtPayServicePhone.Text.Trim();
            oemInfo.Contract.EmergencyPhone                 = txtEmergencyPhone.Text.Trim();
            oemInfo.Contract.ComplainPhone                  = txtComplainPhone.Text.Trim();
            oemInfo.Contract.UseB3BServicePhone             = rdoAllowUseB3BServicePhone.Checked;
            oemInfo.Contract.AllowPlatformContractPurchaser = rdoAllowPlatformContractPurchaser.Checked;
            return(oemInfo);
        }
Example #11
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                var  oem     = OEMService.QueryOEM(CurrentCompany.CompanyId);
                Guid styleId = Guid.Parse(hidValue.Value);
                DistributionOEMService.ChooiceStyle(oem.Id, styleId, CurrentUser.UserName);
                //刷新缓存
                FlushRequester.TriggerOEMFlusher(oem.Id);
                oem = OEMService.QueryOEM(oem.DomainName);
                LoadStyle(oem);
            }
            catch (Exception ex)
            {
                ShowExceptionMessage(ex, "选择风格");
            }

            ShowMessage("选择风格成功,刷新页面后生效!");
        }
Example #12
0
        /// <summary>
        /// 平台获取订单列表信息(目的为了处理OEM是否能够联系采购)
        /// </summary>
        /// <param name="condition">查询条件</param>
        /// <param name="pagination">分页信息</param>
        /// <param name="extendDateTime">是否进行日期扩展(结束日期扩展时间到23:59)</param>
        /// <returns></returns>
        public static IEnumerable <OrderListView> QueryOperateOrders(OrderQueryCondition condition, Pagination pagination, bool extendDateTime = true)
        {
            var orders = QueryOrders(condition, pagination, extendDateTime);
            IEnumerable <Guid> oemIds = orders.Where(o => o.OEMID.HasValue).Select(o => o.OEMID.Value).Distinct();

            if (oemIds.Any())
            {
                IEnumerable <KeyValuePair <Guid, bool> > oems = OEMService.QueryOEMContractSettings(oemIds);
                foreach (var item in orders)
                {
                    item.AllowPlatformContractPurchaser = true;
                    if (!item.OEMID.HasValue)
                    {
                        continue;
                    }
                    var oem = oems.FirstOrDefault(o => o.Key == item.OEMID.Value);
                    item.AllowPlatformContractPurchaser = oem.Key != Guid.Empty && oem.Value;
                }
            }
            return(orders);
        }
Example #13
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         var contract = createOEMContract();
         OEMService.SvaeContract(contract, CurrentUser.UserName);
         FlushRequester.TriggerOEMFlusher(contract.Id);
         if (IsPlateform)
         {
             Response.Redirect("/OrganizationModule/TerraceModule/DistributionOemAuthorizationList.aspx?Search=Back", true);
         }
         else
         {
             ShowMessage("保存成功");
         }
     }
     catch (Exception ex)
     {
         ShowExceptionMessage(ex, "保存");
     }
 }
Example #14
0
        // 注意,这里的流量统计不是很准确,是否要在那边记录一个值,看指令是否执行;
        // 还有,清Q时结束的话,如果没有获取到,不会并发问题吧?

        /// <summary>
        /// 根据给出的OEM编号和类型,得到PID用户名;
        /// </summary>
        /// <param name="oemId"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        private static string GetUserName(Guid oemId, ConfigUseType type)
        {
            // 取得配置信息;
            var config = OEMAirlineConfigService.QueryConfig(oemId);
            // 在配置信息中查找指定类型的配置,若存在,赋值,否则为空;
            var userName = config.Config.ContainsKey(type) ? config.Config[type].Item1 : null;

            if (userName == string.Empty)
            {
                return(null);
            }

            // 若用户名为空,但要求使用平台配置,则此时取得平台配置;
            if (userName == null && OEMService.QueryOEMById(oemId).UseB3BConfig)
            {
                config   = OEMAirlineConfigService.QueryConfig(Guid.Empty);
                userName = config.Config.ContainsKey(type) ? config.Config[type].Item1 : null;
            }

            return(userName);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     RegisterOEMSkins("page.css");
     RegisterOEMSkins("register.css");
     if (!IsPostBack)
     {
         var oem = OEMService.QueryOEM(CurrentCompany.CompanyId);
         if (oem != null)
         {
             lblName.Text   = oem.SiteName;
             lblDomain.Text = oem.DomainName;
             lblEmail.Text  = oem.ManageEmail;
             txtICP.Text    = oem.ICPRecord;
             //lblLogo.Text = oem.LogoPath;
             txtEmbedCode.Text = oem.EmbedCode;
             lblEnable.Text    = oem.Enabled ? "启用" : "不启用";
             lblReg.Text       = oem.AllowSelfRegex ? "允许" : "不允许";
             imgUrl.Value      = FileWeb + "/" + oem.LogoPath;
         }
     }
 }
        private void initData()
        {
            string companyId = Request.QueryString["OemId"];

            if (!string.IsNullOrWhiteSpace(companyId))
            {
                var userNo            = Request.QueryString["UserNo"];
                var companyDetailInfo = OEMService.QueryOEMById(Guid.Parse(companyId));
                this.lblAuthorizationTime.Text     = companyDetailInfo.RegisterTime.ToString();
                this.lblUserNo.Text                = string.IsNullOrWhiteSpace(userNo) ? string.Empty : userNo;
                this.lblCompanyShortName.Text      = companyDetailInfo.Company.AbbreviateName;
                this.lblOemName.Text               = companyDetailInfo.SiteName;
                this.lblAuthorizationDomain.Text   = companyDetailInfo.DomainName;
                this.lblAuthorizationStatus.Text   = companyDetailInfo.EffectTime >= DateTime.Now ? "正常" : "失效";
                this.lblAuthorizationOperator.Text = companyDetailInfo.OperatorAccount;
                this.lblAuthorizationDeadline.Text = companyDetailInfo.EffectTime.Value.ToString("yyyy-MM-dd");
                this.lblAuthorizationDeposit.Text  = companyDetailInfo.AuthCashDeposit.TrimInvaidZero();
                var companyInfo = CompanyService.GetCompanyDetail(companyDetailInfo.OperatorAccount);
                hfdOperatorId.Value = companyInfo.CompanyId.ToString();
                hfdCompayId.Value   = companyDetailInfo.CompanyId.ToString();
            }
        }
        private void initData(string oemId)
        {
            lblOperator.Text = "修改";
            insert.Visible   = false;
            update.Visible   = true;
            OEMInfo distributionOEM = OEMService.QueryOEMById(Guid.Parse(oemId));

            if (distributionOEM != null)
            {
                txtOemName.Text               = distributionOEM.SiteName;
                txtAuthorizationDomain.Text   = distributionOEM.DomainName;
                txtAuthorizationDeadline.Text = distributionOEM.EffectTime.HasValue ? distributionOEM.EffectTime.Value.ToString("yyyy-MM-dd") : string.Empty;
                txtAuthorizationDeposit.Text  = distributionOEM.AuthCashDeposit.TrimInvaidZero();
                rdnPlatform.Checked           = distributionOEM.UseB3BConfig;
                rdnOwner.Checked              = !distributionOEM.UseB3BConfig;
                txtLoginUrl.Text              = distributionOEM.LoginUrl;
                CompanyDetailInfo companyDetailInfo = CompanyService.GetCompanyDetail(distributionOEM.CompanyId);
                if (companyDetailInfo != null)
                {
                    lblB3bAccountNo.Text = companyDetailInfo.UserName;
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     RegisterOEMSkins("page.css");
     RegisterOEMSkins("register.css");
     if (!IsPostBack)
     {
         var oem = OEMService.QueryOEM(Guid.Parse(Request.QueryString["id"]));
         if (oem != null)
         {
             OldImgUrlDiv.Visible      = true;
             txtName.Text              = oem.SiteName;
             txtDomain.Text            = oem.DomainName;
             txtEmail.Text             = oem.ManageEmail;
             txtICP.Text               = oem.ICPRecord;
             OldImgUrl.Text            = FileWeb + oem.LogoPath;
             txtEmbedCode.Text         = oem.EmbedCode;
             radEnabled.Checked        = oem.Enabled;
             radDisEnabled.Checked     = !oem.Enabled;
             radAllowSelfRegex.Checked = oem.AllowSelfRegex;
             radDisSelfRegex.Checked   = !oem.AllowSelfRegex;
         }
     }
 }
Example #19
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            IncomeGroupDeductSetting set = new IncomeGroupDeductSetting();

            set.IncomeGroupId = Guid.Parse(Request.QueryString["id"]);
            set.Price         = int.Parse(txtPrice.Text == "" ? "0" : txtPrice.Text);
            set.Remark        = txtRemark.Text;
            set.Type          = radQujian.Checked ? PeriodType.Interval : PeriodType.Unite;
            string str = "";

            foreach (ListItem item in chkAirlist.Items)
            {
                if (item.Selected)
                {
                    if (str == "")
                    {
                        str += item.Value;
                    }
                    else
                    {
                        str += "/" + item.Value;
                    }
                }
            }
            set.Airlines  = str;
            set.Departure = txtDepartureAirports.AirportsCode.ToList().Join("/");
            set.Id        = string.IsNullOrEmpty(hidSettingId.Value)?Guid.NewGuid():Guid.Parse(hidSettingId.Value);
            if (radQujian.Checked)
            {
                var rangeList = this.hidRanges.Value.Split(',');
                var ranges    = new List <IncomeGroupPeriod>();
                foreach (var item in rangeList)
                {
                    string[]          range  = item.Split('|');
                    IncomeGroupPeriod period = new IncomeGroupPeriod();
                    if (!string.IsNullOrWhiteSpace(range[0]))
                    {
                        period.StartPeriod = decimal.Parse(range[0]) / 100;
                    }
                    if (!string.IsNullOrWhiteSpace(range[1]))
                    {
                        period.EndPeriod = decimal.Parse(range[1]) / 100;
                    }

                    if (!string.IsNullOrWhiteSpace(range[2]))
                    {
                        period.Period = decimal.Parse(range[2]) / 100;
                    }
                    period.DeductId = set.Id;
                    ranges.Add(period);
                }
                set.Period = ranges;
            }
            else
            {
                var ranges = new List <IncomeGroupPeriod>();
                IncomeGroupPeriod period = new IncomeGroupPeriod();

                period.StartPeriod = 0;
                period.EndPeriod   = 1;
                period.Period      = txtTongyi.Text == "" ? 0 : decimal.Parse(txtTongyi.Text) / 100;
                period.DeductId    = set.Id;
                ranges.Add(period);
                set.Period = ranges;
            }
            var oem = OEMService.QueryOEM(CurrentCompany.CompanyId);

            try
            {
                IncomeGroupService.InsertIncomeGroupDeductSetting(set, CurrentUser.UserName);
                //刷新缓存
                FlushRequester.TriggerOEMFlusher(oem.Id);
            }
            catch (Exception ex)
            {
                ShowExceptionMessage(ex, "设置扣点信息");
                return;
            }
            RegisterScript("alert('设置扣点信息成功!');window.location.href='IncomeGroupList.aspx';", true);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterOEMSkins("form.css");
            RegisterOEMSkins("page.css");
            RegisterOEMSkins("register.css");
            if (!IsPostBack)
            {
                OEMInfo oem = null;
                if (Request.QueryString["id"] == null || Request.QueryString["id"] == "")
                {
                    oem            = OEMService.QueryOEM(CurrentCompany.CompanyId);
                    hidValue.Value = "1";
                }
                else
                {
                    oem               = OEMService.QueryOEM(Guid.Parse(Request.QueryString["id"]));
                    hidValue.Value    = "2";
                    btnCancel.Visible = false;
                }
                if (oem != null)
                {
                    hidOemdId.Value    = oem.Id.ToString();
                    txtKeyWord.Value   = oem.Setting.SiteKeyWord;
                    txtKeyDes.Value    = oem.Setting.SiteDescription;
                    txtCopyright.Value = oem.Setting.CopyrightInfo;
                    txtBGColor.Value   = oem.Setting.BGColor;
                    txtShowBGColor.Style.Add("background-color", "#" + (oem.Setting.BGColor.Replace("#", "")));
                    string strheader = "";
                    if (oem.Setting.HeaderLinks != null)
                    {
                        int countheader = oem.Setting.HeaderLinks.Count();
                        int countfooter = oem.Setting.FooterLinks.Count();
                        int index       = 0;
                        foreach (var item in oem.Setting.HeaderLinks)
                        {
                            index++;
                            if (strheader == "")
                            {
                                if (countheader == 1)
                                {
                                    strheader += "<span>增加头部链接:</span><div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='add'>+</a></div>";
                                }
                                else
                                {
                                    strheader += "<span>增加头部链接:</span><div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='reduce'>-</a></div>";
                                }
                            }
                            else
                            {
                                if (index == 5)
                                {
                                    strheader += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='add' style='visibility:hidden;'>+</a></div>";
                                }
                                else
                                {
                                    if (countheader == index)
                                    {
                                        strheader += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='add' >+</a></div>";
                                    }
                                    else
                                    {
                                        strheader += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='reduce'>-</a></div>";
                                    }
                                }
                                //else
                                //{
                                //    strheader += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='reduce'>-</a><a class='add' style='visibility:hidden;'>+</a></div>";
                                //}
                            }
                        }
                        string strfooter = "";
                        index = 0;
                        foreach (var item in oem.Setting.FooterLinks)
                        {
                            index++;
                            if (strfooter == "")
                            {
                                if (countfooter == 1)
                                {
                                    strfooter += "<span>底部链接管理:</span><div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='add'>+</a></div>";
                                }
                                else
                                {
                                    strfooter += "<span>底部链接管理:</span><div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='reduce'>-</a></div>";
                                }
                            }
                            else
                            {
                                if (index == 5)
                                {
                                    strfooter += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='add' style='visibility:hidden;'>+</a></div>";
                                }
                                else
                                {
                                    if (countfooter == index)
                                    {
                                        strfooter += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='add' >+</a></div>";
                                    }
                                    else
                                    {
                                        strfooter += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='reduce'>-</a></div>";
                                    }
                                }

                                //else
                                //{
                                //    strfooter += "<div><input type='text' placeholder='链接名称' value='" + item.LinkName + "' class='text text-s'  />\n<input type='text' placeholder='链接地址' value='" + item.URL + "'  class='text' />\n<a class='reduce'>-</a></div>";
                                //}
                            }
                        }
                        if (strheader != "")
                        {
                            divHeader.InnerHtml = strheader;
                        }
                        if (strfooter != "")
                        {
                            divFooter.InnerHtml = strfooter;
                        }
                    }
                }
            }
        }