username@email.com
2025-05-21 a980cd04341d71216e0f59bd4b7327fe9fc50032
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL.Sys;
using CY.BLL.EC;
using CY.Infrastructure.Common;
using CY.Model;
using CY.WebForm.cs;
 
namespace CY.WebForm.Pages.front
{
    /*
    * 寻找订单
    * 
    * 作用:寻找订单
    * 创建时间:2013-4-17 15:40
    * 修改时间:2013-4-17
    * 创建人:吴崎均
    * 修改人:吴崎均
    */
 
    /// <summary>
    /// 寻找订单
    /// </summary>
    public partial class FindOrder : FrontBasePage
    {
        public bool IsLogin = false;
        private SysInquiry_PrintingTypeBLL _sysInquiry_PrintingTypeBLL = null;//印刷业务类型业务逻辑操作类对象
        private EC_QuoteDemandBLL _eC_QuoteDemandBLL = null;//报价需求逻辑操作对象
 
        /// <summary>
        /// 初始化
        /// </summary>
        public FindOrder()
        {
            _sysInquiry_PrintingTypeBLL = new SysInquiry_PrintingTypeBLL();
            _eC_QuoteDemandBLL = new EC_QuoteDemandBLL();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CurrentUser != null)
            {
                if (CurrentUser.MemberType == "印刷厂商")
                    IsLogin = true;
            }
            try
            {
                switch (Request["Target"])
                {
                    case "Search":
                        Search();
                        return;
                    case "DemandQuote":
                        SaveQuoteInfo();
                        break;
                    default:
                        UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
                        UCPager1.AspNetPager.PageSize = 10;
                        if (!IsPostBack && !IsCallback)
                        {
                            InitPrintTypeData();
                            BingData();
                        }
                        return;
                }
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                Response.Clear();
                Response.Write("-1");
            }
            Response.End();
        }
 
        /// <summary>
        /// 查询方法
        /// </summary>
        private void Search()
        {
            PrintTypeId = string.IsNullOrEmpty(Request["PrintTypeId"]) ? -1 : MyConvert.ConvertToInt32(Request["PrintTypeId"]).Value;
            Province = Request["province"];
            City = Request["City"];
            UCPager1.AspNetPager.CurrentPageIndex = 1;
            BingData();
        }
 
        /// <summary>
        /// 保存报价
        /// </summary>
        private void SaveQuoteInfo()
        {
            EC_DemandQuoteBLL eC_DemandQuoteBLL = new EC_DemandQuoteBLL();
            EC_DemandQuote demandQuote = new EC_DemandQuote();
            demandQuote.QuoteRemark = "";
            demandQuote.QuoterId = CurrentUser.MemberId;
            WebUtil<EC_DemandQuote>.SaveData(eC_DemandQuoteBLL.AddData, eC_DemandQuoteBLL.UpdateData, demandQuote);
        }
 
        /// <summary>
        /// 分页事件
        /// </summary>
        /// <param name="src"></param>
        /// <param name="e"></param>
        protected void AspNetPager1_PageChanged(object src, EventArgs e)
        {
            BingData();
        }
 
        /// <summary>
        /// 加载是否结束情况数据
        /// </summary>
        private void InitPrintTypeData()
        {
            //selPrintTypes.DataSource = _sysInquiry_PrintingTypeBLL.SelectUsedModles();
            //selPrintTypes.DataBind();
            //selPrintTypes.Items.Add(new ListItem("不限", ""));
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        private void BingData()
        {
            Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() { PageSize = UCPager1.AspNetPager.PageSize, PageIndex = UCPager1.AspNetPager.CurrentPageIndex };
            rptData.DataSource = _eC_QuoteDemandBLL.SelectModelPage(pagination, Province, City, PrintTypeId);
            UCPager1.AspNetPager.RecordCount = pagination.RecordCount;
            rptData.DataBind();
        }
 
        #region 查询参数
 
        private string Province
        {
            get { object obj = ViewState["Province"]; return null == obj ? null : MyConvert.ConvertToString(obj); }
            set { ViewState["Province"] = value; }
        }
        private string City
        {
            get { object obj = ViewState["City"]; return null == obj ? null : MyConvert.ConvertToString(obj); }
            set { ViewState["City"] = value; }
        }
        private int PrintTypeId
        {
            get { object obj = ViewState["PrintTypeId"]; return null == obj ? -1 : MyConvert.ConvertToInt32(obj).Value; }
            set { ViewState["PrintTypeId"] = value; }
        }
        #endregion
    }
}