username@email.com
2025-05-12 ae6e40362a745caef9ead36f81f38313fb8c2c66
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
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.Model;
using CY.Infrastructure.Query;
using CY.Infrastructure.Common;
using CY.BLL.Sys;
 
namespace CY.WebForm.Pages.member
{
    //吴辉
    //收货地址
    public partial class MemberAcceptAddress : BasePage
    {
        EC_MemberBasicBLL bll_EC_MemberBasicBLL = null;
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        public Guid targetid = Guid.Empty;
 
        //初始化
        public MemberAcceptAddress()
        {
            bll_EC_MemberBasicBLL = new EC_MemberBasicBLL();
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            targetid = CurrentUser.MemberId;
        }
 
        //提交事件
        protected void btn_submit_info(object sender, EventArgs e)
        {
            try
            {
                #region 初始会员收货信息
 
                EC_AcceptWayBySeller m_EC_AcceptWayBySeller = bll_EC_MemberBasicBLL.GetEC_AcceptWayBySellerByMemberId(CurrentUser.MemberId);
                if (m_EC_AcceptWayBySeller == null)
                    m_EC_AcceptWayBySeller = new EC_AcceptWayBySeller();
                m_EC_AcceptWayBySeller.AcceptTypeId = Request["AcceptTypeId"].ToInt32();
                m_EC_AcceptWayBySeller.InvoiceDemand = Request["InvoiceId"].ToString2();
                m_EC_AcceptWayBySeller.Remark = Request["Remark"].ToString2();
                m_EC_AcceptWayBySeller.LastUpdateTime = DateTime.Now;
                m_EC_AcceptWayBySeller.Operator = CurrentUser.ShortName;
                m_EC_AcceptWayBySeller.SellerId = CurrentUser.MemberId;
 
                m_EC_AcceptWayBySeller.City = "";
                m_EC_AcceptWayBySeller.Accepter = "";
                m_EC_AcceptWayBySeller.AccepterPhone = "";
                m_EC_AcceptWayBySeller.AppointCourierCompany = "";
                m_EC_AcceptWayBySeller.AccepterAddress = CurrentUser.Province + CurrentUser.City + CurrentUser.County + CurrentMemberExtend.DetailedAddress;
                m_EC_AcceptWayBySeller.AccepterPhoneNum = "";
                m_EC_AcceptWayBySeller.AcceptContacts = "";
                m_EC_AcceptWayBySeller.FetchAddress = "";
                m_EC_AcceptWayBySeller.FetchPhoneNum = "";
                m_EC_AcceptWayBySeller.FetchContacts = "";
                m_EC_AcceptWayBySeller.AppointCourierCompany = "";
 
                string ReceiptType = bll_Sys_DictionaryBLL.GetModelByKeyid(Request["AcceptTypeId"].ToInt32());
                switch (ReceiptType)
                {
                    case "自提":
                        break;
                    case "代发货运":
                        m_EC_AcceptWayBySeller.City = Request["City_OnBehalfOfCargo"].ToString2();
                        m_EC_AcceptWayBySeller.Accepter = Request["Accepter_OnBehalfOfCargo"].ToString2();
                        m_EC_AcceptWayBySeller.AccepterPhone = Request["AccepterPhone_OnBehalfOfCargo"].ToString2();
                        break;
                    case "送货上门":
                        m_EC_AcceptWayBySeller.City = Request["City_HomeDelivery"].ToString2();
                        m_EC_AcceptWayBySeller.Accepter = Request["Accepter_HomeDelivery"].ToString2();
                        m_EC_AcceptWayBySeller.AccepterPhone = Request["AccepterPhone_HomeDelivery"].ToString2();
                        m_EC_AcceptWayBySeller.AccepterAddress = Request["AccepterAddress_HomeDelivery"].ToString2();
                        break;
                    case "指定货运公司":
                        m_EC_AcceptWayBySeller.City = Request["City_OfficialFreightForwarder"].ToString2();
                        m_EC_AcceptWayBySeller.Accepter = Request["Accepter_OfficialFreightForwarder"].ToString2();
                        m_EC_AcceptWayBySeller.AccepterPhone = Request["AccepterPhone_OfficialFreightForwarder"].ToString2();
                        m_EC_AcceptWayBySeller.AppointCourierCompany = Request["AppointCourierCompany"].ToString2();
                        m_EC_AcceptWayBySeller.AccepterAddress = Request["AccepterAddress"].ToString2();
                        m_EC_AcceptWayBySeller.AccepterPhoneNum = Request["AccepterPhoneNum"].ToString2();
                        m_EC_AcceptWayBySeller.AcceptContacts = Request["AcceptContacts"].ToString2();
                        m_EC_AcceptWayBySeller.FetchAddress = Request["FetchAddress"].ToString2();
                        m_EC_AcceptWayBySeller.FetchPhoneNum = Request["FetchPhoneNum"].ToString2();
                        m_EC_AcceptWayBySeller.FetchContacts = Request["FetchContacts"].ToString2();
                        m_EC_AcceptWayBySeller.AppointCourierCompany = Request["AppointCourierCompany"].ToString2();
                        break;
                    default:
                        break;
                }
 
                #endregion
 
                if (m_EC_AcceptWayBySeller.Keyid > 0)
                {
 
                    if (bll_EC_MemberBasicBLL.UpdateModelMemberExtend(m_EC_AcceptWayBySeller))
                    {
                        JavaScript.MessageBox("更新成功", this);
                    }
                    else
                        JavaScript.MessageBox("操作失败", this);
                }
                else
                {
                    if (bll_EC_MemberBasicBLL.InsertModelEC_AcceptWayBySeller(m_EC_AcceptWayBySeller))
                    {
                        JavaScript.MessageBox("更新成功", this);
                    }
                    else
                        JavaScript.MessageBox("操作失败", this);
                }
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                JavaScript.MessageBox("操作失败", this);
            }
 
        }
    }
}