username@email.com
2025-01-17 8d51a0762a43eedada5eb15bd24180d7204e63b3
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/**  
* MyOrderDialogue.aspx.cs
*
* 功 能: 订单请求列表
* 类 名: MyOrderDialogue
*
* Ver    变更日期             负责人  变更内容
* ───────────────────────────────────
* V0.01  2013-5-11 14:23        吴崎均    初版
*
*
*
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL.EC;
using CY.Model;
using CY.BLL;
using CY.Infrastructure.Common;
using CY.BLL.Sys;
 
namespace CY.WebForm.Pages.business
{
    /// <summary>
    /// 订单请求列表
    /// </summary>
    public partial class MyOrderDialogue : BasePage
    {
 
        EC_OrderDialogueBLL _eC_OrderDialogueBLL = null;
 
        /// <summary>
        /// 初始化构造
        /// </summary>
        public MyOrderDialogue()
        {
            _eC_OrderDialogueBLL = new EC_OrderDialogueBLL();
        }
 
        /// <summary>
        /// 加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                switch (Request["Target"])
                {
 
                    default:
                        Page_Load_Default();
                        return;
                }
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                Response.Clear();
                Response.Write("-1");
            }
 
 
            Response.End();
 
        }
        /// <summary>
        /// 默认加载事件
        /// </summary>
        private void Page_Load_Default()
        {
            UCPager1.AspNetPager.PageChanged += AspNetPager_PageChanged;
            btn_Search.Click += new EventHandler(btn_Search_Click);
            if (!IsPostBack && !IsCallback)
            {
                SearchParam = new Dictionary<int, object>();
                Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();
                selDialogueTypes.DataSource = _sys_DictionaryBLL.GetDataByType("EC_OrderDialogue");
                selDialogueTypes.DataBind();
                selDialogueTypes.Items.Add(new ListItem("全部", ""));
                selDialogueTypes.Value = "";//选中“全部”
                AspNetPager_PageChanged(UCPager1.AspNetPager, new EventArgs());
                return;
            }
        }
 
        /// <summary>
        /// 搜索按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btn_Search_Click(object sender, EventArgs e)
        {
            Dictionary<int, object> searchParam = new Dictionary<int, object>();
 
            if (!string.IsNullOrEmpty(txtSubmitBegin.Value))
            {
                searchParam.Add(0, MyConvert.ConvertToDateTime(txtSubmitBegin.Value));
            }
            else { }
 
            if (!string.IsNullOrEmpty(txtSubmitEnd.Value))
            {
                searchParam.Add(1, MyConvert.ConvertToDateTime(txtSubmitEnd.Value));
            }
            else { }
 
            if (!string.IsNullOrEmpty(txtOrderId.Value))
            {
                searchParam.Add(2, MyConvert.ConvertToString(txtOrderId.Value));
            }
            else { }
 
            if (!string.IsNullOrEmpty(selDialogueTypes.Value))
            {
                searchParam.Add(3, MyConvert.ConvertToString(selDialogueTypes.Value));
            }
            else { }
 
            if (!string.IsNullOrEmpty(selReplyCase.Value))
            {
                searchParam.Add(4, MyConvert.ConvertToString(selReplyCase.Value));
            }
            else { }
 
            if (!string.IsNullOrEmpty(selExecuteCase.Value))
            {
                searchParam.Add(5, MyConvert.ConvertToString(selExecuteCase.Value));
            }
            else { }
            if (!string.IsNullOrEmpty(txtReplyBegin.Value))
            {
                searchParam.Add(6, MyConvert.ConvertToDateTime(txtReplyBegin.Value));
            }
            else { }
            if (!string.IsNullOrEmpty(txtReplyEnd.Value))
            {
                searchParam.Add(7, MyConvert.ConvertToDateTime(txtReplyEnd.Value));
            }
            else { }
 
            SearchParam = searchParam;
            AspNetPager_PageChanged(UCPager1.AspNetPager, new EventArgs());
        }
 
        /// <summary>               
        /// 分页事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AspNetPager_PageChanged(object sender, EventArgs e)
        { 
 
            Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() { PageSize = UCPager1.AspNetPager.PageSize, PageIndex = UCPager1.AspNetPager.CurrentPageIndex };
            SearchParam = null == SearchParam ? new Dictionary<int, object>() : SearchParam;
            int index = 9;
            if (!SearchParam.ContainsKey(index)) SearchParam.Add(index, CurrentUser.MemberId);//申请人
            IEnumerable<EC_OrderDialogue> result = _eC_OrderDialogueBLL.SelectModelPage(pagination, SearchParam);
            rptData.DataSource = result;
            rptData.DataBind();
 
            UCPager1.AspNetPager.RecordCount = pagination.RecordCount;
        }
 
        /// <summary>
        /// 查询参数
        /// </summary>
        private Dictionary<int, object> SearchParam
        {
            get { return ViewState["SearchParam"] as Dictionary<int, object>; }
            set { ViewState["SearchParam"] = value; }
        }
 
    }
}