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
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.BLL.Sys;
using CY.Config;
 
namespace CY.WebForm.Pages.membermanage
{
    public partial class Renewal : MainPage
    {
        EC_MemberBasicBLL _EC_MemberBasicBLL = new EC_MemberBasicBLL();
 
        public Guid MemberId
        {
            get
            {
                return Request.Params["MemberId"] != null ? Guid.Parse(Request.Params["MemberId"].ToString()) : Guid.Empty;
            }
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindPage();
            }
        }
 
        private void BindPage()
        {
            EC_MemberBasic memberBaic = _EC_MemberBasicBLL.GetMemberByMemberId(MemberId);
            if (memberBaic!=null)
            {
                string statusName = string.Empty;
                Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();
                statusName = _sys_DictionaryBLL.GetNameByMeanValue(memberBaic.UseState, "会员帐号状态");
 
                this.lblMemberName.Text = memberBaic.Name;
                this.lblStatusName.Text = statusName;
                this.lblEneTime.Text = memberBaic.ExpirationTime.Value.ToString("yyyy-MM-dd hh:mm");
 
                decimal payMoney = 0;
                if (memberBaic.MemberType == "印刷厂商")
                {
                    payMoney = WebInfo.Instance.RegisterWebPayByFirm;
                }
                else if (memberBaic.MemberType == "个人网店")
                {
                    payMoney = WebInfo.Instance.RegisterWebPayByShop;
                }
 
                this.hidPayMoney.Value = payMoney.ToString();
            }
        }
 
        protected void btnSave_Click(object sender, EventArgs e)
        {
            EC_PaymentRecordBLL _EC_PaymentRecordBLL = new EC_PaymentRecordBLL();
            EC_MemberBasic memberBaic = _EC_MemberBasicBLL.GetMemberByMemberId(MemberId);
 
            int renewalTime = int.Parse(ddlRenewalTime.SelectedValue.ToString());
 
            DateTime endTime = DateTime.Now.AddYears(renewalTime);
 
            decimal payMoney = decimal.Parse(this.hidPayMoney.Value);
 
            decimal payAllMoney = payMoney * renewalTime;
 
            string payType = "印刷厂商续费";
 
            EC_PaymentRecord m_EC_PaymentRecord = new EC_PaymentRecord();
 
            m_EC_PaymentRecord.BusinessManagerId = 0;
            m_EC_PaymentRecord.AccountManagerId = 0;
            m_EC_PaymentRecord.PayStartTime = DateTime.Now;
            m_EC_PaymentRecord.PayEndTime = endTime;
            m_EC_PaymentRecord.LastUpdateTime = DateTime.Now;
            m_EC_PaymentRecord.AdForum = "";
            m_EC_PaymentRecord.AdImg = "";
            m_EC_PaymentRecord.AdInstallments = "";
            m_EC_PaymentRecord.AdLocation = "";
            m_EC_PaymentRecord.AdSize = "";
            m_EC_PaymentRecord.CompanyPhone = memberBaic.EC_MemberExtendMode.PhoneNum;
            m_EC_PaymentRecord.Contact = string.IsNullOrEmpty(memberBaic.EC_MemberExtendMode.BusinessContacts) ? string.Empty : memberBaic.EC_MemberExtendMode.BusinessContacts;
            m_EC_PaymentRecord.Email = memberBaic.EC_MemberExtendMode.Email;
            m_EC_PaymentRecord.MemberId = memberBaic.MemberId;
            m_EC_PaymentRecord.MemberName = memberBaic.Name;
            m_EC_PaymentRecord.Operator = memberBaic.Operator;
            m_EC_PaymentRecord.PayAllMoney = payAllMoney;
            m_EC_PaymentRecord.PayMoney = 0;
            m_EC_PaymentRecord.PayRole = memberBaic.MemberType;
            m_EC_PaymentRecord.PayType = payType;
            m_EC_PaymentRecord.QQ = memberBaic.EC_MemberExtendMode.QQ;
            m_EC_PaymentRecord.Remark = _EC_PaymentRecordBLL.GetNewOrderId(); ;
            m_EC_PaymentRecord.SoftwarePermissions = string.Empty;
 
            if (_EC_PaymentRecordBLL.InsertModel(m_EC_PaymentRecord))
            {
                JavaScript.MessageBoxCloseAndRefreshFirst("操作成功",this);
            }
            else
            {
                JavaScript.MessageBox("操作失败", this);
            }
        }
    }
}