Example #1
0
        public void Page_Load(object sender, EventArgs args)
        {
            //me = UserBll.GetSessionUser();
            var t_site_id = Request["site"].TryToShort();

            if (t_site_id > 0)
            {
                site = SiteBll.GetById(t_site_id);
                SiteBll.SetSessionSite(site);
            }

            site = SiteBll.GetSessionSite();

            //cases = CaseBll.GetCasesForFront(6, 0).Table.Populate<Case>() ;
            cases = CaseBll.GetCasesForFrontOnlyDesigner(6, 0, 0, 0).Populate <Case>();

            articles1 = ArticleBll.GetArticleForFront("热点新闻").Table.Populate <Article>();
            articles2 = ArticleBll.GetArticleForFront("居家布置").Table.Populate <Article>();
            articles3 = ArticleBll.GetArticleForFront("装修常识").Table.Populate <Article>();
            articles4 = ArticleBll.GetArticleForFront("装修手册").Table.Populate <Article>();

            materials = MaterialsBll.GetMaterialsForFront().Table.Populate <Material>();

            tdks = SeoBll.GetTDKbyPage("index.aspx", "").Table.Populate <SeoBll.Seo>();

            contractors = ContractorBll.GetAllContractors(0, 50).Table.Populate <Contractor>();
            suppliers   = SupplierBll.GetAll(0, 50).Table.Populate <Supplier>();


            dists = DistrictBll.GetAll();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor>();
        }
Example #2
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();


            material = MaterialsBll.GetDetailById(Request["meterial_id"].TryToLong());

            if (material == null)
            {
                material = new Material();
            }

            imgs = string.IsNullOrEmpty(material.imgs) ? null : material.imgs.Split('?');

            me = UserBll.GetSessionUser();
            if (me != null)
            {
                var myId = me.user_id;
                me          = UserBll.GetUserById(myId);
                isLogin     = true;
                canExchange = me.bonuses >= material.bonus;
            }
            else
            {
                me          = new User();
                isLogin     = false;
                canExchange = false;
            }

            tdks = SeoBll.GetTDKbyPage("thjc_xq.aspx", Request["meterial_id"]).Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #3
0
        public void Page_Load(object sender, EventArgs args)
        {
            var pageIndex = Request["pg"].TryToInt();

            if (pageIndex < 0)
            {
                pageIndex = 0;
            }

            cur_page = pageIndex + 1;

            var frontDp = CaseBll.SearchCasesForFront(Request["building_kw"], Request["rs"], Request["dst"], Request["ht"], 20, pageIndex);

            cases = frontDp.Table.Populate <Case>();
            pages = frontDp.Page.pageCount;
            count = frontDp.Page.rowCount;

            site = SiteBll.GetSessionSite();

            htypes = DictBll.GetHouseTypes();
            styles = DictBll.GetRoomStyles();
            types  = DictBll.GetDecorationStyles();

            tdks = SeoBll.GetTDKbyPage("search.aspx", "").Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #4
0
        public void Page_Load(object sender, EventArgs args)
        {
            contractors = ContractorBll.GetAllContractors(0, 50).Table.Populate <Contractor>();
            site        = SiteBll.GetSessionSite();

            tdks = SeoBll.GetTDKbyPage("zxgs.aspx", "").Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #5
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();

            contractor_id = Request["cid"].TryToLong();

            workers = WorkerBll.GetWorkersByContractorId(contractor_id);

            tdks = SeoBll.GetTDKbyPage("zxgsxq-sgd.aspx", Request["cid"]).Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #6
0
        public void Page_Load(object sender, EventArgs args)
        {
            site          = SiteBll.GetSessionSite();
            contractor_id = Request["cid"].TryToLong();

            var dp_case = CaseBll.GetCasesByContractorId(contractor_id, 0, 50);

            cases = dp_case.Table.Populate <Case>();

            tdks = SeoBll.GetTDKbyPage("zxgsxq-jdal.aspx", Request["cid"]).Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #7
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();

            supplier = SupplierBll.GetDetailById(Request["supplier_id"].TryToLong());

            var dp_case = MaterialsBll.GetMaterialsBySupplierId(supplier.supplier_id);

            materials = dp_case.Table.Populate <Material>();

            tdks = SeoBll.GetTDKbyPage("sjxq.aspx", Request["supplier_id"]).Table.Populate <SeoBll.Seo>();
            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #8
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();

            var pageIndex = Request["pg"].TryToInt();

            cur_page = pageIndex + 1;

            var frontDp = MaterialsBll.GetMaterialsForFront(20, pageIndex);

            mts   = frontDp.Table.Populate <Material>();
            pages = frontDp.Page.pageCount;


            tdks = SeoBll.GetTDKbyPage("thjc_list.aspx", "").Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor>();
        }
Example #9
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();

            the_case = CaseBll.GetCaseByCaseId(Request["case_id"].TryToLong());
            imgs     = the_case.imgs.Split('?');

            contractor_id = the_case.contractor_id;

            contractor = ContractorBll.GetContractorByContractorId(contractor_id);

            var dp_case = CaseBll.GetCasesByContractorId(contractor_id, 0, 20);

            cases = dp_case.Table.Populate <Case>();

            tdks = SeoBll.GetTDKbyPage("zxgsxq-jdal-xq.aspx", Request["case_id"]).Table.Populate <SeoBll.Seo>();


            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #10
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();

            long designer_id = Request["designer_id"].TryToLong();

            if (designer_id > 0)
            {
                designer = DesignerBll.GetDetailByDesignerId(designer_id);
                cases    = CaseBll.GetCasesByAuthorId(designer_id);
            }
            else
            {
                designer = new Designer();
                cases    = new List <Case>();
            }

            tdks = SeoBll.GetTDKbyPage("zxgsxq_sjs_xq.aspx", Request["designer_id"]).Table.Populate <SeoBll.Seo>();

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }
Example #11
0
        public void Page_Load(object sender, EventArgs args)
        {
            site = SiteBll.GetSessionSite();

            contractor = ContractorBll.GetContractorByContractorId(Request["cid"].TryToLong());

            contractor.address = contractor.address.Replace("\r\n", "<br/>");

            var dp_case = CaseBll.GetCasesByContractorId(contractor.contractor_id, 0, 4);

            cases = dp_case.Table.Populate <Case>();


            tdks = SeoBll.GetTDKbyPage("zxgsxq.aspx", Request["cid"]).Table.Populate <SeoBll.Seo>();


            designers = DesignerBll.GetDesignersByContractorId(contractor.contractor_id, 4);
            workers   = WorkerBll.GetWorkersByContractorId(contractor.contractor_id, 4);

            contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> ();
        }