username@email.com
2025-04-23 d34ca25b9754e49b2d1220ff9f0de6af9b734d99
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL.Integrity;
using CY.BLL.Sys;
using CY.Model;
using CY.BLL;
using CY.Infrastructure.Common;
using CY.BLL.EC;
 
namespace CY.WebForm.Pages.business
{
    public partial class ComplainanEdit : BasePage
    {
        #region 变量
        Integrity_ComplainanInfoBLL _integrity_ComplainanInfoBLL = new Integrity_ComplainanInfoBLL();
        Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();
        EC_MemberBasicBLL _eC_MemberBasicBLL = new EC_MemberBasicBLL();
        EC_OrderBasicBLL bll_EC_OrderBasicBLL = new EC_OrderBasicBLL();
        #endregion
 
        #region 属性
        #endregion
 
        #region 方法
 
        /// <summary>
        /// 绑定投诉类别
        /// </summary>
        private void BindComplaintsType()
        {
            IEnumerable<Sys_Dictionary> typeList = _sys_DictionaryBLL.GetDataByType("投诉类型");
            this.ddlComplaintsType.DataSource = typeList;
            this.ddlComplaintsType.DataTextField = "Name";
            this.ddlComplaintsType.DataValueField = "MeanValue";
            this.ddlComplaintsType.DataBind();
            this.ddlComplaintsType.Items.Insert(0, new ListItem("请选择", ""));
            if (string.IsNullOrEmpty(Request["type"].ToString2()))
            {
                this.ddlComplaintsType.Items.Remove(new ListItem("订单质量", "0"));
                this.ddlComplaintsType.Items.Remove(new ListItem("恶意下单", "1"));
            }
 
            this.spanMemberName.InnerText = CurrentUser.Name;
            this.spanContact.InnerText = CurrentMemberExtend.BusinessContacts;
            this.spanPhoneNum.InnerText = CurrentMemberExtend.PhoneNum;
        }
 
        /// <summary>
        /// 绑定被投诉人
        /// </summary>
        /// <param name="paperTypeId"></param>
        private void BindRespondent()
        {
            IList<EC_MemberBasic> _list = _eC_MemberBasicBLL.GetAllMember().Where(p => p.MemberId != CurrentUser.MemberId).ToList<EC_MemberBasic>();
            this.ddlRespondent.DataSource = _list;
            this.ddlRespondent.DataTextField = "Name";
            this.ddlRespondent.DataValueField = "MemberId";
            this.ddlRespondent.DataBind();
            this.ddlRespondent.Items.Insert(0, new ListItem("请选择", ""));
            this.ddlRespondent.Items.Insert(1, new ListItem("四川印刷网", "11111111-1111-1111-1111-111111111111"));
        }
        #endregion
 
        #region 事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindComplaintsType();
                BindRespondent();
                if (Request["orderId"] != null)
                {
                    this.hidOrderId.Value = Request["orderId"].ToString2();
                    this.txtOrderCode.Text = Request["orderCode"].ToString2();
                    this.ddlComplaintsType.SelectedValue = Request["type"].ToString2();
                    this.ddlComplaintsType.Enabled = false;
                    this.ddlRespondent.SelectedValue = Request["firmId"].ToString2();
                    this.ddlRespondent.Enabled = false;
                    this.palOrder.Visible = true;
 
                    EC_OrderBasic m_EC_OrderBasic = bll_EC_OrderBasicBLL.SelectModelById(Request["orderId"].ToInt32() ?? 0);
                    this.spanOrderName.InnerText = m_EC_OrderBasic.DocumentName;
                    this.spanOrderQuality.InnerText = m_EC_OrderBasic.OrderExtend.PrintNum.ToString2();
                    this.spanOrderMoney.InnerText ="¥"+ m_EC_OrderBasic.SumPrice.Value.ToString("0.00");
                }
            }
        }
 
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            bool isSuccess = false;
            Integrity_ComplainanInfo model = new Integrity_ComplainanInfo();
            model.RespondentId = this.ddlRespondent.SelectedValue.ToString().ToGuid2();
            model.ComplainantId = this.CurrentUser.MemberId;
            model.OrderCode = this.txtOrderCode.Text;
            if (this.hidOrderId.Value != "")
                model.OrderId = this.hidOrderId.Value.ToInt32().Value;
            model.ComplaintsReason = this.txtComplaintsReason.Text;
            model.ComplaintsStatusId = 0;
            model.ComplaintsTypeId = this.ddlComplaintsType.SelectedValue.ToInt32().Value;
            model.ComplaintsTime = DateTime.Now;
            model.LastUpdateTime = DateTime.Now;
            isSuccess = _integrity_ComplainanInfoBLL.InserModel(model);
            if (isSuccess)
            {
                JavaScript.RefreshDIVOpener(this);
            }
            else
            {
                JavaScript.MessageBox("保存失败", this);
            }
        }
        #endregion
    }
}