username@email.com
2025-05-15 6fe02a16e55f17e45a3997171e1b2284d45af25b
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
/**  
* OrderDeatil.aspx.cs
*
* 功 能: 订单详情
* 类 名: OrderDeatil
*
* Ver    变更日期             负责人  变更内容
* ───────────────────────────────────
* V0.01  2013-4-24 13:25      吴崎均    初版
* V0.02  2013-5-15 18:23      吴崎均    编辑界面样式
* V0.03  2013-5-15 15:58      吴崎均    完成数据获取
* V0.04  2013-5-21 14:38      吴崎均    增加订单进度
* V0.05  2013-5-23 9:33       吴崎均    修改继承类为默认类Page使显示信息不受登录控制
*
*
*
*
*
*
*/
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.Infrastructure.Common;
using CY.Model;
using CY.BLL;
using CY.Model.Inquiry;
using CY.BLL.Sys;
using CY.Infrastructure.Query;
 
namespace CY.WebForm.Pages.business
{
    public partial class WaixieOrderPrint : BasePage
    {
        EC_OrderBasicBLL _eC_OrderBasicBLL = new EC_OrderBasicBLL();
        OA_KaipiaoshenqingBLL oA_KaipiaoshenqingBLL = new OA_KaipiaoshenqingBLL();
        public static string SellerOrderId = "";
        public static string PrintType = "";
        /// <summary>
        /// 页面加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                switch (Request["Target"])
                {
                    case "GetCommunication":
                        break;
                    case "print":
                        break;
                    default:
                        Page_Load_Default();
                        return;
                }
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                Response.Clear();
                Response.Write("-1");
            }
            Response.End();
        }
 
        /// <summary>
        /// 默认加载事件方法
        /// </summary>
        private void Page_Load_Default()
        {
            LoadOrderInfo();
        }
 
        /// <summary>
        /// 加载订单信息
        /// </summary>
        private bool LoadOrderInfo()
        {
            string KaipiaoshenqingId = Request["Keyid"] == null ? "" : Request["Keyid"];
 
 
 
            string orderids = Request["SellerOrderId"] == null ? "" : Request["SellerOrderId"];
 
 
 
 
            Dictionary<int, object> searchParam = new Dictionary<int, object>();
 
            SetParamValue(searchParam, 0, CurrentUser.MemberId);
 
            SetParamValue(searchParam, 17, orderids);
 
            SearchParam = searchParam;
            Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination()
            {
                PageSize = 1000,// UCPager1.AspNetPager.PageSize,
                PageIndex = 1// UCPager1.AspNetPager.CurrentPageIndex
            };
            
            //this.RepClientList.DataSource = 
            IEnumerable<EC_OrderBasic> result = _eC_OrderBasicBLL.SelectModelPage_Outsource(pagination, SearchParam);
            rptOrder.DataSource = result;
            rptOrder.DataBind();
 
            this.Spanjineheji.InnerText = string.Format("{0:F2}", result.Sum(x => x.SumPrice));
            this.Spanyishou.InnerText = string.Format("{0:F2}", result.Sum(x => x.TradingSingle.PayedMoney));
            this.Spanweishou.InnerText = string.Format("{0:F2}", result.Sum(x => x.UnPayedMoney));
 
 
 
            return true;
        }
 
        /// <summary>
        /// 设置查询参数方法
        /// </summary>
        /// <param name="target">设置目标</param>
        /// <param name="key">键</param>
        /// <param name="value">值</param>
        private static void SetParamValue(Dictionary<int, object> target, int key, object value)
        {
            if (string.IsNullOrEmpty(string.Format("{0}", value)))
                return;
            else
            {
            }
 
            if (target.ContainsKey(key))
            {
                target[key] = value;
            }
            else
            {
                target.Add(key, value);
            }
        }
 
        /// <summary>
        /// 查询参数
        /// </summary>
        private Dictionary<int, object> SearchParam
        {
            get
            {
                return ViewState["SearchParam"] as Dictionary<int, object>;
            }
            set
            {
                ViewState["SearchParam"] = value;
            }
        }
 
 
        /// <summary>
        /// 是否已经操作
        /// </summary>
        /// <param name="keyid"></param>
        /// <param name="orderState"></param>
        /// <param name="opType"></param>
        /// <returns></returns>
        public bool IsOpearted(object keyidObj, object orderStateObj, object opTypeObj)
        {
            int keyid = (int)keyidObj;
            int orderState = (int)orderStateObj;
            string opType = (string)opTypeObj;
            return _eC_OrderBasicBLL.IsOpearted(keyid, orderState, opType);
        }
    }
}