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
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.BLL.Sys;
using CY.Model;
using CY.Infrastructure.Query;
using CY.Infrastructure.Common;
using CY.BLL.EC;
using CY.Model.Inquiry;
 
namespace CY.WebForm.Pages.business
{
    //吴辉
    //行政管理
    public partial class DeliverWorkBookList : BasePage
    {
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        EC_OrderBasicBLL bll_EC_OrderBasicBLL = null;
        EC_OrderPrintParameterBLL _eC_OrderPrintParameterBLL = null;
        OA_StaffBLL bll_OA_StaffBLL = null;
 
        //初始化
        public DeliverWorkBookList()
        {
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_EC_OrderBasicBLL = new EC_OrderBasicBLL();
            bll_OA_StaffBLL = new OA_StaffBLL();
            _eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
            if (!IsPostBack)
            {
                this.selCustormerManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, true);
                this.selCustormerManager.DataTextField = "Name";
                this.selCustormerManager.DataValueField = "Keyid";
                this.selCustormerManager.DataBind();
                this.selCustormerManager.Items.Insert(0, new ListItem("全部", ""));
 
                this.selBusinessManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, true, false);
                this.selBusinessManager.DataTextField = "Name";
                this.selBusinessManager.DataValueField = "Keyid";
                this.selBusinessManager.DataBind();
                this.selBusinessManager.Items.Insert(0, new ListItem("全部", ""));
 
                this.selOrderStates.DataSource = bll_Sys_DictionaryBLL.GetDataByType("EC_订单状态").Where(p => p.MeanValue.Value != -5 && p.MeanValue.Value != -4);
                this.selOrderStates.DataBind();
                this.selOrderStates.Items.Insert(0, new ListItem("全部", ""));
 
                BindList();
            }
             
        }
 
        //绑定数据
        private void BindList()
        {
            Pagination pa = new Pagination();
            pa.PageSize = UCPager1.AspNetPager.PageSize;
            pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex;
 
            var eC_OrderBasics = bll_EC_OrderBasicBLL.SelectModelPageWorkBook(pa, CurrentUser.MemberId, this.txtBeginDate.Value.Trim(), this.txtEndDate.Value.Trim(), this.txtOrderId.Value.Trim(), this.txtSearchyjname.Value.Trim(), this.selCustormerManager.Value, this.selBusinessManager.Value, this.selOrderStates.Value);
            foreach (var orderBasic in eC_OrderBasics)
            {
                EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterBLL.GetModel(orderBasic.Keyid.Value);
                InquiryCommonModel _inquiryCommonModel = null;
                if (null == _eC_OrderPrintParameter)
                {
                    _inquiryCommonModel = new InquiryCommonModel();
                }
                else
                {
                    _inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel;
 
                }
                orderBasic.OrderExtend.PrintNum = _inquiryCommonModel.PrintCount;
            }
 
            this.RepClientList.DataSource = eC_OrderBasics;
            this.RepClientList.DataBind();
            UCPager1.AspNetPager.RecordCount = pa.RecordCount;
        }
 
        //分页事件
        protected void AspNetPager1_PageChanged(object src, EventArgs e)
        {
            BindList();
        }
 
        //查询事件
        protected void btn_Search_Click(object src, EventArgs e)
        {
            BindList();
        }
    }
}