1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL;
using System.Data;
using CY.Infrastructure.Common;
using CY.Infrastructure.Query;
using CY.BLL.Sys;
using CY.Model;
using CY.BLL.Info;
 
namespace CY.WebForm.Pages.Templet.pingxuan
{
    //吴辉
    //企业网站首页_平轩
    public partial class CompanyIndex : TempletBasePage
    {
        public string MP_QQNumber;
        Info_ContentBLL bll_Info_ContentBLL = null;
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        Info_SortBLL bll_Info_SortBLL = null;
        EC_MemberBasicBLL _EC_MemberBasicBLL = null;
        OA_CorporateClientsBLL _OA_CorporateClientsBLL = null;
        Info_CompanyAdBLL _Info_CompanyAdBLL = null;
        Info_FirmBLL _Info_FirmBLL = null;
 
        //初始化
        public CompanyIndex()
        {
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_Info_ContentBLL = new Info_ContentBLL();
            bll_Info_SortBLL = new Info_SortBLL();
            _EC_MemberBasicBLL = new EC_MemberBasicBLL();
            _OA_CorporateClientsBLL = new OA_CorporateClientsBLL();
            _Info_CompanyAdBLL = new Info_CompanyAdBLL();
            _Info_FirmBLL = new Info_FirmBLL();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title += "-" + CurrentWeb().Name;
            if (!IsPostBack)
            {
                InitialData();
                BindList();
                this.TemplateList.InnerHtml = InitialSelectNewsDataInfo();
            }
        }
 
        protected string InitialSelectNewsDataInfo()
        {
            string SortTypeHtml = "<table width=\"170\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >";
            List<Info_Content> m_Info_ContentList = bll_Info_ContentBLL.SelectListBySortId(CurrentWeb().MemberId, 4) as List<Info_Content>;
            foreach (var item in m_Info_ContentList)
            {
 
                SortTypeHtml += "<tr><td width=\"20\" align=\"center\" height=\"50\"><img src=\"images/tt.jpg\"></td><td><a href='/Pages/Templet/pingxuan/CompanyNewsDetail.aspx?i=" + CurrentWeb().bid + "&Keyid=" + item.Keyid + "' class=\"hui\">" + item.Title.ToString2().JSubString(32, "..") + "</a></td></tr>";
            }
            SortTypeHtml += "</table>";
            return SortTypeHtml;
        }
 
        private void BindList()
        {
            Pagination pa3 = new Pagination();
            pa3.PageSize = 8;
            pa3.PageIndex = 1;
            this.Repeater3.DataSource = _Info_CompanyAdBLL.SelectModelListByType(pa3, "商家成功案列", CurrentWeb().MemberId.ToGuid2());
            this.Repeater3.DataBind();
 
            Pagination pa2 = new Pagination();
            pa2.PageSize = 8;
            pa2.PageIndex = 1;
            this.Repeater2.DataSource = _Info_CompanyAdBLL.SelectModelListByType(pa2, "商家设备展示", CurrentWeb().MemberId.ToGuid2());
            this.Repeater2.DataBind();
 
            Pagination pa = new Pagination();
            pa.PageSize = 3;
            pa.PageIndex =1;
            this.Repeater1.DataSource = _Info_CompanyAdBLL.SelectModelListByType(pa, "商家成功案列", CurrentWeb().MemberId.ToGuid2());
            this.Repeater1.DataBind();
 
            Pagination pa1 = new Pagination();
            pa1.PageSize = 5;
            pa1.PageIndex = 1;
            this.Repeater4.DataSource = _Info_CompanyAdBLL.SelectModelListByType(pa1, "首页滚动图片", CurrentWeb().MemberId.ToGuid2());
            this.Repeater4.DataBind();
        }
 
        protected void InitialData()
        {
            EC_MemberExtend m_EC_MemberExtend = _EC_MemberBasicBLL.GetMemberExtendByMemberId(CurrentWeb().MemberId);
            MP_QQNumber = m_EC_MemberExtend.QQ;
            Info_Firm model = _Info_FirmBLL.selectSingleModel(CurrentWeb().MemberId);
            if (model == null)
            {
                this.td_AboutUs.InnerHtml = "";
            }
            else
            {
                this.td_AboutUs.InnerHtml = model.FirmInroduce;
 
            }
        }
    }
}