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
110
111
112
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 CY.Model;
using CY.Infrastructure.Query;
using CY.Infrastructure.Common;
using CY.BLL.Sys;
using System.Data;
 
namespace CY.WebForm.Pages.member
{
    //吴辉
    //代理金额
    public partial class MyProxyMoneyList : BasePage
    {
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        EC_MemberBasicBLL bll_EC_MemberBasicBLL = null;
        EC_ProxyMemberBLL bll_EC_ProxyMemberBLL = null;
        public string Province = ""; //接收值 Request["selectProvince"].ToString2();
        public string City = "";//接收值 Request["selectCity"].ToString2();
        public string County = "";//接收值 Request["selectCounty"].ToString2();
        public string ProxyType = "";
 
        //初始化
        public MyProxyMoneyList()
        {
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_EC_MemberBasicBLL = new EC_MemberBasicBLL();
            bll_EC_ProxyMemberBLL = new EC_ProxyMemberBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            EC_ProxyMember m_EC_ProxyMember = bll_EC_ProxyMemberBLL.GetModelByMemberId(CurrentUser.MemberId);
            if (m_EC_ProxyMember == null || m_EC_ProxyMember.Keyid == null)
            {
                Response.Redirect("/Pages/member/MyProxyNo.aspx?i=0");
            }
            else if (m_EC_ProxyMember != null && m_EC_ProxyMember.ProxyState != 1)
            {
                Response.Redirect("/Pages/member/MyProxyNo.aspx?i=2");
            }
            else
            {
                ProxyType = m_EC_ProxyMember.ProxyType;
            }
 
            if (ProxyType == "地市总代理")
            {
                Province = m_EC_ProxyMember.ProxyProvince;
                City = m_EC_ProxyMember.ProxyCity;
                County = Request["selectCounty"].ToString2();
            }
            else if (ProxyType == "区县代理")
            {
                Province = m_EC_ProxyMember.ProxyProvince;
                City = m_EC_ProxyMember.ProxyCity;
                County = m_EC_ProxyMember.ProxyCountry;
            }
            if (!IsPostBack)
            {
                InitialSelectData();
                BindList();
            }
        }
 
        //加载查询条件
        protected void InitialSelectData()
        {
            this.selMemberType.Items.Insert(0, new ListItem("全部", ""));
            this.selMemberType.Items.Insert(1, new ListItem("印刷厂商", "印刷厂商"));
            this.selMemberType.Items.Insert(2, new ListItem("个人网店", "个人网店"));
            this.selMemberType.Items.Insert(3, new ListItem("买家会员", "买家会员"));
        }
 
        //绑定数据
        private void BindList()
        {
            Guid FromMemberId = string.IsNullOrEmpty(Request["Keyid"].ToString2()) ? Guid.Empty : Request["Keyid"].ToGuid2();
            if (!string.IsNullOrEmpty(Request["Keyid"].ToString2()))
            {
                this.IsKeyShow1.Visible = false;
                this.IsKeyShow2.Visible = false;
                this.IsKeyShow3.Visible = true;
            }
            else
            {
                this.IsKeyShow1.Visible = true;
                this.IsKeyShow2.Visible = true;
                this.IsKeyShow3.Visible = false;
            }
            Pagination pa = new Pagination();
            pa.PageSize = 500;
            pa.PageIndex = 1;
            DateTime? RegStTime = string.IsNullOrEmpty(this.txtRegTimeStart.Value) ? (string.IsNullOrEmpty(this.txtTimeStart.Value) ? null : this.txtTimeStart.Value.ToDateTime2()) : this.txtRegTimeStart.Value.ToDateTime2();
            DateTime? RegEnTime = string.IsNullOrEmpty(this.txtRegTimeEnd.Value) ? (string.IsNullOrEmpty(this.txtTimeEnd.Value) ? null : this.txtTimeEnd.Value.ToDateTime2()) : this.txtRegTimeEnd.Value.ToDateTime2();
            this.RepClientList.DataSource = bll_EC_MemberBasicBLL.MyProxymoneyList(pa, RegStTime, RegEnTime, Request["selectProvince"].ToString2(), Request["selectCity"].ToString2(), Request["selectCounty"].ToString2(), this.selMemberType.Value, this.txtCompanyName.Value, CurrentUser.MemberId, FromMemberId);
            this.RepClientList.DataBind();
        }
 
        //查询事件
        protected void btn_Search_Click(object sender, EventArgs e)
        {
            BindList();
        }
    }
}