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.Infrastructure.DESEncrypt; using CY.Config; using CY.Infrastructure.Common; using CY.Model; namespace CY.WebForm.Pages.sysglobal { //吴辉 //注册设置 public partial class RegisterConfig : BasePage { Pay_CreditLineLevelRuleBLL bll_Pay_CreditLineLevelRuleBLL = null; Integrity_CreditLevelRuleBLL bll_Integrity_CreditLevelRuleBLL = null; //初始化 public RegisterConfig() { bll_Pay_CreditLineLevelRuleBLL = new Pay_CreditLineLevelRuleBLL(); bll_Integrity_CreditLevelRuleBLL = new Integrity_CreditLevelRuleBLL(); } //页面加载 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { List m_Pay_CreditLineLevelRuleList = bll_Pay_CreditLineLevelRuleBLL.GetModelList().ToList(); this.ddlRegisterCreditLine.DataSource = m_Pay_CreditLineLevelRuleList; this.ddlRegisterCreditLine.DataValueField = "Keyid"; this.ddlRegisterCreditLine.DataTextField = "LevelName"; this.ddlRegisterCreditLine.DataBind(); List m_Buyer_CreditLevelRuleList = bll_Integrity_CreditLevelRuleBLL.SelectListByType(false).ToList(); this.ddlRegisterBuyerCreditLine.DataSource = m_Buyer_CreditLevelRuleList; this.ddlRegisterBuyerCreditLine.DataValueField = "RuleId"; this.ddlRegisterBuyerCreditLine.DataTextField = "LevelName"; this.ddlRegisterBuyerCreditLine.DataBind(); List m_Seller_CreditLevelRuleList = bll_Integrity_CreditLevelRuleBLL.SelectListByType(true).ToList(); this.ddlRegisterSellerCreditLine.DataSource = m_Seller_CreditLevelRuleList; this.ddlRegisterSellerCreditLine.DataValueField = "RuleId"; this.ddlRegisterSellerCreditLine.DataTextField = "LevelName"; this.ddlRegisterSellerCreditLine.DataBind(); this.ddlRegisterCreditLine.SelectedValue = WebInfo.Instance.RegisterCreditLine.ToString2(); this.ddlRegisterBuyerCreditLine.SelectedValue = WebInfo.Instance.RegisterBuyerCreditLine.ToString2(); this.ddlRegisterSellerCreditLine.SelectedValue = WebInfo.Instance.RegisterSellerCreditLine.ToString2(); this.selIsRegister.Value = WebInfo.Instance.IsRegister.ToString2(); this.selIsRegisterQQ.Value = WebInfo.Instance.IsRegisterQQ.ToString2(); this.txtAccepterAddressNumber.Value = WebInfo.Instance.AccepterAddressNumber.ToString2(); this.txtBankInfoNumber.Value = WebInfo.Instance.BankInfoNumber.ToString2(); this.selRegisterVerificationType.Value = WebInfo.Instance.RegisterVerificationType; this.txtBuyerRegisterIntroduction.Text = WebInfo.Instance.BuyerRegisterIntroduction; this.txtShopRegisterIntroduction.Text = WebInfo.Instance.ShopRegisterIntroduction; this.txtFirmRegisterIntroduction.Text = WebInfo.Instance.FirmRegisterIntroduction; this.txtUserRegisterAgreementBuyer.Text = WebInfo.Instance.UserRegisterAgreement_Buyer; this.txtUserRegisterAgreementFirm.Text = WebInfo.Instance.UserRegisterAgreement_Firm; this.txtUserRegisterAgreementShop.Text = WebInfo.Instance.UserRegisterAgreement_Shop; this.txtFirmSMSCount.Value = WebInfo.Instance.FirmSMSCount; this.txtFirmFileCount.Value = WebInfo.Instance.FirmFileCount.ToString2(); this.txtRegisterWebPayByFirm.Value = WebInfo.Instance.RegisterWebPayByFirm.ToString2(); this.txtRegisterWebPayByShop.Value = WebInfo.Instance.RegisterWebPayByShop.ToString2(); } } //表单提交 protected void btn_Submit_Config(object sender, EventArgs e) { try { WebInfo.Instance.RegisterCreditLine = this.ddlRegisterCreditLine.SelectedValue.ToString2(); WebInfo.Instance.RegisterBuyerCreditLine = this.ddlRegisterBuyerCreditLine.SelectedValue.ToString2(); WebInfo.Instance.RegisterSellerCreditLine = this.ddlRegisterSellerCreditLine.SelectedValue.ToString2(); WebInfo.Instance.IsRegister = this.selIsRegister.Value.ToBoolean2(); WebInfo.Instance.IsRegisterQQ = this.selIsRegisterQQ.Value.ToBoolean2(); WebInfo.Instance.AccepterAddressNumber = this.txtAccepterAddressNumber.Value.ToString(); WebInfo.Instance.BankInfoNumber = this.txtBankInfoNumber.Value.ToString(); WebInfo.Instance.RegisterVerificationType = this.selRegisterVerificationType.Value.ToString(); WebInfo.Instance.BuyerRegisterIntroduction = this.txtBuyerRegisterIntroduction.Text.ToString(); WebInfo.Instance.ShopRegisterIntroduction = this.txtShopRegisterIntroduction.Text.ToString(); WebInfo.Instance.FirmRegisterIntroduction = this.txtFirmRegisterIntroduction.Text.ToString(); WebInfo.Instance.UserRegisterAgreement_Buyer = this.txtUserRegisterAgreementBuyer.Text.ToString(); WebInfo.Instance.UserRegisterAgreement_Firm = this.txtUserRegisterAgreementFirm.Text.ToString(); WebInfo.Instance.UserRegisterAgreement_Shop = this.txtUserRegisterAgreementShop.Text.ToString(); WebInfo.Instance.FirmSMSCount = this.txtFirmSMSCount.Value.ToString(); WebInfo.Instance.FirmFileCount = this.txtFirmFileCount.Value.ToInt32() ?? 0; WebInfo.Instance.RegisterWebPayByFirm = this.txtRegisterWebPayByFirm.Value.ToDecimal2() ?? 0; WebInfo.Instance.RegisterWebPayByShop = this.txtRegisterWebPayByShop.Value.ToDecimal2() ?? 0; WebInfo.Instance.Update(); } catch (Exception ex) { PAGEHandleException(ex); JavaScript.MessageBox("操作失败", this); } JavaScript.MessageBox("操作成功", this); } } }