Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MWzYuMingInfo m = null;

            m = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();
            EyouSoft.BLL.YlStructure.BHangQi bll = new EyouSoft.BLL.YlStructure.BHangQi();
            int           recordCount            = 0;
            StringBuilder sb = new StringBuilder();

            if (!IsTuanGou)
            {
                MHangQiChaXunInfo chaxun = new MHangQiChaXunInfo()
                {
                    IsYouXiao = true,

                    BiaoQian = EyouSoft.Model.EnumType.YlStructure.HangQiBiaoQian.热门推荐
                };
                chaxun.LeiXing = LeiXing;

                var list = bll.GetHangQis(m.CompanyId, 7, 1, ref recordCount, chaxun);

                if (list != null)
                {
                    foreach (var item in list)
                    {
                        string FuJians = "";

                        string url      = "/hangqi/";
                        var    _leiXing = (EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing)item.LeiXing;
                        if (_leiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮)
                        {
                            url = "/hangqi/HY";
                        }



                        if (item.FuJians != null && item.FuJians.Count > 0)
                        {
                            FuJians = TuPian.F1(Utils.GetErpFilepath() + item.FuJians[0].Filepath, 153, 104);
                        }
                        sb.AppendFormat("<li title='{0}'>", item.MingCheng);
                        sb.AppendFormat("<a href=\"{0}\"><img src=\"{1}\"><span style='height:23px;overflow:hidden;'>{2}", url + item.HangQiId + ".html", FuJians, item.MingCheng);
                        sb.Append("</span></a></li>");
                    }
                    litList.Text = sb.ToString();
                }
            }
            else
            {
                MTuanGouChaXunInfo tg = new MTuanGouChaXunInfo();

                var TuanGou = bll.GetTuanGous(m.CompanyId, 7, 1, ref recordCount, tg);

                if (TuanGou != null)
                {
                    foreach (var item in TuanGou)
                    {
                        string FuJians = "";

                        string url = "/TuanGou/TuanGouXiangQing.aspx";

                        FuJians = TuPian.F1(Utils.GetErpFilepath() + item.FengMian, 153, 104);
                        sb.AppendFormat("<li title='{0}'>", item.MingCheng);
                        sb.AppendFormat("<a href=\"{0}\"><img src=\"{1}\"><span style='height:23px;overflow:hidden;'>{2}", url + "?TuanGouId=" + item.TuanGouId, FuJians, item.MingCheng);
                        sb.Append("</span></a></li>");
                    }
                }
            }
            litList.Text = sb.ToString();
        }
Example #2
0
        private void GetContent()
        {
            MTuanGouChaXunInfo search = new MTuanGouChaXunInfo();

            search.IsYouXiao = true;

            string jiage = Utils.GetQueryStringValue("jiage");

            if (!string.IsNullOrEmpty(jiage))
            {
                search.JiaGe1 = int.Parse(jiage.Split('-')[0]);
                if (jiage.Split('-').Length == 2)
                {
                    search.JiaGe2 = int.Parse(jiage.Split('-')[1]);
                }
            }
            string youlun_leixing = Utils.GetQueryStringValue("youlunleixing");

            if (!string.IsNullOrEmpty(youlun_leixing))
            {
                search.LeiXing = (EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing) int.Parse(youlun_leixing);
            }
            string xingcheng = Utils.GetQueryStringValue("xingcheng");

            if (!string.IsNullOrEmpty(xingcheng))
            {
                search.TianShu1 = int.Parse(xingcheng.Split('-')[0]);
                if (xingcheng.Split('-').Length == 2)
                {
                    search.TianShu2 = int.Parse(xingcheng.Split('-')[1]);
                }
            }
            string chufadi = Utils.GetQueryStringValue("chufadi");

            if (!string.IsNullOrEmpty(chufadi))
            {
                search.ChuFaGangKouId = int.Parse(chufadi.Trim());
            }

            string hangxian = Utils.GetQueryStringValue("hangxian");

            if (!string.IsNullOrEmpty(hangxian))
            {
                search.HangXianId = int.Parse(hangxian);
            }
            var isasc = Utils.GetQueryStringValue("desc").ToLower() == "asc";

            switch (Utils.GetQueryStringValue("sort").ToLower())
            {
            case "xiaoliang":
                search.PaiXu = isasc ? 9 : 8;
                break;

            case "jiage":
                search.PaiXu = isasc ? 3 : 2;
                break;

            case "fabushijian":
                search.PaiXu = isasc ? 1 : 0;
                break;

            default:
                search.PaiXu = 8;
                break;
            }

            BHangQi bll = new BHangQi();

            int pageSize              = 18;
            int pageIndex             = UtilsCommons.GetPadingIndex();
            int recordCount           = 0;
            IList <MTuanGouInfo> list = bll.GetTuanGous(YuMingInfo.CompanyId, pageSize, pageIndex, ref recordCount, search);

            if (list != null && list.Count() > 0)
            {
                Repeater1.DataSource = list;
                Repeater1.DataBind();

                RegisterScript(string.Format("pConfig.pageSize={0};pConfig.pageIndex={1};pConfig.recordCount={2};", pageSize, pageIndex, recordCount));
            }

            YouLunHangXiang();
            DengChuan();
        }