Exemplo n.º 1
0
        /// <summary>
        /// 获得组团网店的实体
        /// </summary>
        public void DataInit(string cId)
        {
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo Sdll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.SupplierInfo model = Sdll.GetModel(cId);
            if (model != null && !model.State.IsDelete)
            {
                this.lblUserName.Text = model.ContactInfo.ContactName;
                this.lblTelPhone.Text = model.ContactInfo.Tel;
                this.lblFax.Text      = model.ContactInfo.Fax;
                this.lblAddress.Text  = model.CompanyAddress;

                this.MQ = model.ContactInfo.MQ;

                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                {
                    this.CityAndMenu1.HeadMenuIndex = 2;
                    this.Page.Title = model.CompanyName + "_组团";
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.其他采购商))
                {
                    this.CityAndMenu1.HeadMenuIndex = 2;
                    this.Page.Title = model.CompanyName + "_其他采购商";
                }
                model = null;
                Sdll  = null;
            }
            else
            {
                Utils.ShowError("单位信息不存在!", "Shop");
                return;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     EyouSoft.IBLL.CompanyStructure.ISupplierInfo Ibll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
     EyouSoft.Model.CompanyStructure.SupplierInfo model = Ibll.GetModel(CompanyID);
     if (model != null)
     {
         CompanyName = model.CompanyName;
         Remark      = model.Remark;
         ConnectName = model.ContactInfo.ContactName;
         Mobile      = model.ContactInfo.Mobile;
         Tel         = model.ContactInfo.Tel;
         Fax         = model.ContactInfo.Fax;
         Email       = model.ContactInfo.Email;
         Address     = model.CompanyAddress;
         ProvinceAndCityList1.SetProvinceId = model.ProvinceId;
         ProvinceAndCityList1.SetCityId     = model.CityId;
         WebSite    = model.WebSite;
         CompanyImg = model.CompanyImg;
         LogImg     = model.CompanyImgThumb;
         if (companyType != EyouSoft.Model.CompanyStructure.CompanyType.酒店 || companyType != EyouSoft.Model.CompanyStructure.CompanyType.景区)
         {
             ShortRemark = model.ShortRemark;
         }
     }
     //EyouSoft.Model.CompanyStructure.HotelLevel 酒店星级
     #region 酒店:周边环境+星级
     if (companyType == EyouSoft.Model.CompanyStructure.CompanyType.酒店)
     {
         string[] HotelLevelName = Enum.GetNames(typeof(EyouSoft.Model.CompanyStructure.HotelLevel));
         rbl_HotelLevel.DataSource = HotelLevelName;
         rbl_HotelLevel.DataBind();
         rbl_HotelLevel.Items.FindByText(Enum.GetName(typeof(EyouSoft.Model.CompanyStructure.HotelLevel), model.CompanyLevel)).Selected = true;
         ((List <EyouSoft.Model.SystemStructure.SysFieldBase>) EyouSoft.BLL.SystemStructure.SysField.CreateInstance().GetHotelArea()).ForEach(delegate(EyouSoft.Model.SystemStructure.SysFieldBase item)
         {
             string strChecked = "";
             if (model.CompanyTag != null && model.CompanyTag.Count > 0)
             {
                 int ReturnCount = ((List <EyouSoft.Model.CompanyStructure.CompanyTag>) model.CompanyTag).Count(delegate(EyouSoft.Model.CompanyStructure.CompanyTag sysItem)
                 {
                     return(sysItem.FieldId == item.FieldId);
                 });
                 if (ReturnCount > 0)
                 {
                     strChecked = "checked=\"checked\"";
                 }
             }
             cbl_CompanyTagHtml += string.Format("<input id=\"cb{0}\" type=\"checkbox\" name=\"cbCompanyTag\" value=\"{0}\" {2} /><label for=\"cb{0}\">{1}</label><input name=\"hidCompanyTag{0}\" value=\"{1}\" type=\"hidden\" />", item.FieldId, item.FieldName, strChecked);
         });
     }
     #endregion
     Ibll  = null;
     model = null;
 }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     EyouSoft.IBLL.CompanyStructure.ISupplierInfo Ibll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
     EyouSoft.Model.CompanyStructure.SupplierInfo model = Ibll.GetModel(CompanyID);
     if (model != null)
     {
         CompanyName     = model.CompanyName;
         CompanyImgThumb = model.CompanyImgThumb;
         Remark          = model.Remark;
         ShortRemark     = model.ShortRemark;
     }
     Ibll  = null;
     model = null;
 }
Exemplo n.º 4
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo Ibll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.SupplierInfo model = Ibll.GetModel(CompanyID);
            if (model != null)
            {
                CompanyImg = model.CompanyImg;
                if (model.ProductInfo != null && model.ProductInfo.Count > 0)
                {
                    for (int i = 0; i < model.ProductInfo.Count; i++)
                    {
                        switch (i)
                        {
                        case 0:
                            ProductInfoID1        = model.ProductInfo[i].ID;
                            this.ProductInfoImg1  = model.ProductInfo[i].ImagePath;
                            this.ProductInfoLink1 = model.ProductInfo[i].ImageLink.Replace(Utils.EmptyLinkCode, "");
                            break;

                        case 1:
                            ProductInfoID2        = model.ProductInfo[i].ID;
                            this.ProductInfoImg2  = model.ProductInfo[i].ImagePath;
                            this.ProductInfoLink2 = model.ProductInfo[i].ImageLink.Replace(Utils.EmptyLinkCode, "");
                            break;

                        case 2:
                            ProductInfoID3        = model.ProductInfo[i].ID;
                            this.ProductInfoImg3  = model.ProductInfo[i].ImagePath;
                            this.ProductInfoLink3 = model.ProductInfo[i].ImageLink.Replace(Utils.EmptyLinkCode, "");
                            break;

                        case 3:
                            ProductInfoID4        = model.ProductInfo[i].ID;
                            this.ProductInfoImg4  = model.ProductInfo[i].ImagePath;
                            this.ProductInfoLink4 = model.ProductInfo[i].ImageLink.Replace(Utils.EmptyLinkCode, "");
                            break;
                        }
                    }
                }
            }
            Ibll  = null;
            model = null;
        }
Exemplo n.º 5
0
        private void BindListInfo()
        {
            FrontPage page = this.Page as FrontPage;

            ImageServerPath = page.ImageServerUrl;
            //实例化类的对象
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo Ibll     = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.SupplierInfo ComModel = Ibll.GetModel(SetAgencyId);
            if (ComModel != null)
            {
                if (ComModel.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区) || ComModel.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.酒店))
                {
                    this.isShowImprotent.Visible = false;
                }
                else
                {
                    this.lbl_Importent.Text = ComModel.ShortRemark;
                }
                this.lbl_Title.Text = ComModel.CompanyName;
                //文章、景区、车队、旅游用品等抓取来的内容页面,不能出现外链,同业114内部链接可以出现
                if (ComModel.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区) ||
                    ComModel.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.车队) ||
                    ComModel.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店))
                {
                    this.lit_Content.Text = Utils.RemoveHref(ComModel.Remark);
                }
                else
                {
                    this.lit_Content.Text = ComModel.Remark;
                }

                //this.lit_Content.Text = ComModel.Remark;
                //this.Page.Title = ComModel.CompanyName;
                CompanyName = ComModel.CompanyName;
            }
            //释放资源
            ComModel = null;
            Ibll     = null;
        }
Exemplo n.º 6
0
        public void NewsListInit()
        {
            string agencyId = this.SetAgencyId;

            EyouSoft.IBLL.CompanyStructure.ISupplierInfo Sdll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.SupplierInfo model = Sdll.GetModel(agencyId);
            if (model != null)
            {
                IList <EyouSoft.Model.CompanyStructure.CompanyAffiche> list = null;
                int recordCount = 0;
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.酒店))
                {
                    list = EyouSoft.BLL.CompanyStructure.CompanyAffiche.CreateInstance().GetList(10, 1, ref recordCount, agencyId, EyouSoft.Model.CompanyStructure.CompanyAfficheType.酒店新闻, null, null, null);
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.车队))
                {
                    list = EyouSoft.BLL.CompanyStructure.CompanyAffiche.CreateInstance().GetList(10, 1, ref recordCount, agencyId, EyouSoft.Model.CompanyStructure.CompanyAfficheType.车队新闻, null, null, null);
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.购物店))
                {
                    list = EyouSoft.BLL.CompanyStructure.CompanyAffiche.CreateInstance().GetList(10, 1, ref recordCount, agencyId, EyouSoft.Model.CompanyStructure.CompanyAfficheType.购物点新闻, null, null, null);
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区))
                {
                    list = EyouSoft.BLL.CompanyStructure.CompanyAffiche.CreateInstance().GetList(10, 1, ref recordCount, agencyId, EyouSoft.Model.CompanyStructure.CompanyAfficheType.景区新闻, null, null, null);
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店))
                {
                    list = EyouSoft.BLL.CompanyStructure.CompanyAffiche.CreateInstance().GetList(10, 1, ref recordCount, agencyId, EyouSoft.Model.CompanyStructure.CompanyAfficheType.旅游用品新闻, null, null, null);
                }

                if (list != null && list.Count > 0)
                {
                    this.rptNewsList.DataSource = list;
                    this.rptNewsList.DataBind();
                }
                list = null;
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 获得高级网点的实体
        /// </summary>
        public void DataInit(string agencyId)
        {
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo Sdll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.SupplierInfo model = Sdll.GetModel(agencyId);
            if (model != null)
            {
                if (!model.State.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.HighShop))
                {
                    Utils.ShowError("对不起,该网店尚未开通高级!", "SupplyError");
                    return;
                }
                this.ImgHead.ImageUrl = Domain.FileSystem + model.CompanyImg;
                this.lblTitle.Text    = model.CompanyName;
                this.lblContent.Text  = Utils.RemoveHref(model.Remark);
                this.lblUserName.Text = model.ContactInfo.ContactName;
                this.lblTelPhone.Text = model.ContactInfo.Tel;
                this.lblFax.Text      = model.ContactInfo.Fax;
                this.lblAddress.Text  = model.CompanyAddress;

                //设置地区
                EyouSoft.Model.SystemStructure.SysCity     cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(model.CityId);
                EyouSoft.Model.SystemStructure.SysProvince provModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(model.ProvinceId);

                if (provModel != null && cityModel != null)
                {
                    this.lblDiQu.Text = "" + provModel.ProvinceName + "&nbsp;&nbsp;" + cityModel.CityName + "";
                }

                this.lblUrl.Text = model.WebSite;
                this.MQ          = model.ContactInfo.MQ;
                this.AdvancedControl11.SetAgencyId = agencyId;

                IList <EyouSoft.Model.CompanyStructure.ProductInfo> list = model.ProductInfo;
                if (list != null && list.Count > 0)
                {
                    this.rptContentImgList.DataSource = list.Take(4);
                    this.DataBind();
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区))
                {
                    this.CityAndMenu1.HeadMenuIndex = 4;
                    this.Page.Title = model.CompanyName + "_景区";
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.酒店))
                {
                    this.CityAndMenu1.HeadMenuIndex = 5;
                    this.Page.Title = model.CompanyName + "_酒店";
                    //星级、周边环境
                    this.lblLeaveTitle.Visible    = true;
                    this.lblLeave.Visible         = true;
                    this.lblHuanJingTitle.Visible = true;
                    this.lblHuanJing.Visible      = true;

                    this.lblLeave.Text = HotelLevel(model.CompanyLevel);
                    if (model.CompanyTag.Count > 0)
                    {
                        this.lblHuanJing.Text = "<a>";
                        for (int i = 0; i < model.CompanyTag.Count; i++)
                        {
                            this.lblHuanJing.Text += model.CompanyTag[i].FieldName + " &nbsp";
                        }
                        this.lblHuanJing.Text += "</a>";
                    }
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.车队))
                {
                    this.CityAndMenu1.HeadMenuIndex = 6;
                    //this.Page.Title = model.CompanyName + "_车队";
                    //业务优势
                    this.lblRemark.Visible      = true;
                    this.lblRemarkTitle.Visible = true;
                    this.lblRemarkTitle.Text    = "业务优势:";
                    this.lblRemark.Text         = model.ShortRemark;
                    //设置Title.....
                    this.Title = string.Format(EyouSoft.Common.PageTitle.CarDetail_Title, CityModel.CityName, model.CompanyName);
                    AddMetaTag("description", string.Format(EyouSoft.Common.PageTitle.CarDetail_Des, CityModel.CityName, model.CompanyName));
                    AddMetaTag("keywords", EyouSoft.Common.PageTitle.CarDetail_Keywords);
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店))
                {
                    this.CityAndMenu1.HeadMenuIndex = 7;
                    //this.Page.Title = model.CompanyName + "_旅游用品店";
                    //主营产品
                    this.lblRemark.Visible      = true;
                    this.lblRemarkTitle.Visible = true;
                    this.lblRemarkTitle.Text    = "主营产品:";
                    this.lblRemark.Text         = model.ShortRemark;
                    //设置Title.....
                    this.Title = string.Format(EyouSoft.Common.PageTitle.TravelDetail_Title, CityModel.CityName, model.CompanyName);
                    AddMetaTag("description", string.Format(EyouSoft.Common.PageTitle.TravelDetail_Des, CityModel.CityName, model.CompanyName));
                    AddMetaTag("keywords", EyouSoft.Common.PageTitle.TravelDetail_Keywords);
                }
                if (model.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.购物店))
                {
                    this.CityAndMenu1.HeadMenuIndex = 8;
                    this.Page.Title = model.CompanyName + "_购物店";
                    //主营产品
                    this.lblRemark.Visible      = true;
                    this.lblRemarkTitle.Visible = true;
                    this.lblRemarkTitle.Text    = "主营产品:";
                    this.lblRemark.Text         = model.ShortRemark;
                }

                list  = null;
                model = null;
                Sdll  = null;
            }
        }