private void ToExamine() { Guid id = Guid.Parse(Request.QueryString["CompanyId"]); CompanyType type = (CompanyType)byte.Parse(Request.QueryString["CompanyType"]); AccountBaseType accounType = (AccountBaseType)byte.Parse(Request.QueryString["AccountType"]); AuditType auditType = (AuditType)int.Parse(Request.QueryString["AuditType"]); var address = ChinaPay.B3B.TransactionWeb.PublicClass.AddressShow.GetAddressBaseInfo(hfldAddressCode.Value); bool isUpgrade = false; CompanyUpgrade companyUpgrade = null; if (auditType == AuditType.ApplyAudit) { isUpgrade = true; companyUpgrade = CompanyUpgradeService.QueryCompanyUpgrade(id); } if ((type == CompanyType.Provider && !isUpgrade) || (isUpgrade && companyUpgrade.Type == CompanyType.Provider)) { AccountCombineService.AuditProviderInfo(id, GetProviderAuditInfo(address, isUpgrade)); } else { if (accounType == AccountBaseType.Individual) { AccountCombineService.AuditSupplier(id, GetSupplierIndividualAuditInfo(address, isUpgrade)); } else { AccountCombineService.AuditSupplier(id, GetSupplierEnterpriseInfo(address, isUpgrade)); } } }
protected void btnConfirm_Click(object sender, EventArgs e) { if (valiateUpgradeInfo()) { try { CompanyUpgradeService.Save(getCompanyUpgrade(), this.CurrentUser.UserName); ShowMessage("账号变更申请成功!"); this.typeUpgradeApply.Visible = false; } catch (Exception ex) { ShowMessage(ex.Message); } } }
private void getUpgradeInfo(CompanyDetailInfo companyInfo) { if (CompanyUpgradeService.IsValid(companyInfo) && BasePage.SuperiorOEM == null) { this.typeUpgradeApply.Visible = true; if (companyInfo.CompanyType == Common.Enums.CompanyType.Purchaser && companyInfo.AccountType == AccountBaseType.Individual) { this.rbnSupplierIndividual.Visible = true; this.rbnProviderEnterprise.Visible = true; this.rbnSupplierIndividual.Checked = true; } if (companyInfo.CompanyType == Common.Enums.CompanyType.Purchaser && companyInfo.AccountType == AccountBaseType.Enterprise) { this.rbnSupplierEnterprise.Visible = true; this.rbnProviderEnterprise.Visible = true; this.rbnSupplierEnterprise.Checked = true; } if (companyInfo.CompanyType == Common.Enums.CompanyType.Supplier && companyInfo.Audited == true && companyInfo.AuditTime.HasValue) { this.rbnProviderEnterprise.Visible = true; this.rbnProviderEnterprise.Checked = true; } if (companyInfo.CompanyType == Common.Enums.CompanyType.Supplier && companyInfo.Audited == false && companyInfo.AuditTime.HasValue) { this.rbnProviderEnterprise.Visible = true; if (companyInfo.AccountType == AccountBaseType.Individual) { this.rbnSupplierIndividual.Visible = true; this.rbnSupplierIndividual.Checked = true; } else { this.rbnSupplierEnterprise.Visible = true; this.rbnSupplierEnterprise.Checked = true; } } if (companyInfo.CompanyType == Common.Enums.CompanyType.Provider && companyInfo.Audited == false && companyInfo.AuditTime.HasValue) { this.rbnProviderEnterprise.Visible = true; this.rbnSupplierEnterprise.Visible = true; this.rbnSupplierEnterprise.Checked = true; } } }
/// <summary> /// 认证中心拒绝审核 /// </summary> /// <param name="companyId">公司Id</param> /// <param name="auditTypeValue">审核类型值</param> /// <param name="reason">拒绝审核原因</param> public void Audit(Guid companyId, string companyAccount, int auditTypeValue, string reason) { try { AuditType auditType = (AuditType)auditTypeValue; if (auditType == AuditType.NormalAudit) { CompanyService.Reject(companyId, companyAccount, reason, this.CurrentUser.UserName); } else { CompanyUpgradeService.Disable(companyId, companyAccount, reason, this.CurrentUser.UserName); } } catch (System.Data.Common.DbException ex) { Service.LogService.SaveExceptionLog(ex); throw new Exception("发生未知错误,请稍后再试"); } }
private void BindUpgradeInfo(Guid companyId) { var companyUpgrade = CompanyUpgradeService.QueryCompanyUpgrade(companyId); var companyDetailInfo = CompanyService.GetCompanyDetail(companyId); var companyDocument = AccountCombineService.QueryCompanyDocument(companyId); this.lblUpgradeType.Visible = true; this.lblCong.Visible = true; this.lblChange.Visible = true; BindCommenContent(companyDetailInfo); this.lblCompanyType.Style.Add(HtmlTextWriterStyle.Color, "blue"); this.lblUpgradeType.Style.Add(HtmlTextWriterStyle.Color, "blue"); if (companyUpgrade.AccountType == AccountBaseType.Individual) { this.hfdAccountType.Value = "individual"; this.txtFixedPhone.Text = companyDetailInfo.OfficePhones; this.lblUpgradeType.Text = CompanyType.Supplier.GetDescription() + "(" + AccountBaseType.Individual.GetDescription() + ")"; this.lblCompanyInfo.Visible = false; this.lblContactInfo.Visible = false; lblType.Text = "身份证"; this.lblTrueName.Text = companyDetailInfo.CompanyName; this.lblCertNo.Text = companyDetailInfo.CertNo; if (companyDocument != null) { if (companyDocument.CertLicense != null && companyDocument.CertLicense.Length > 0) { this.certNoOrBussness.Visible = false; this.iataAccess.Visible = false; this.bussnessTime.Visible = false; this.hfdBussnessValid.Value = "false"; } } else { this.hfdValid.Value = "false"; } } else { this.hfdAccountType.Value = "enterprise"; this.fixedPhoneTitle.Visible = false; this.fixedPhoneValue.Visible = false; this.lblIndividual.Visible = false; if (companyDocument != null) { if (companyDocument.BussinessLicense != null) { this.certNoOrBussness.Visible = false; this.hfdBussnessValid.Value = "false"; this.access.Visible = true; } if (companyDocument.IATALicense != null) { this.iataAccess.Visible = false; this.access.Visible = false; this.hfdValid.Value = "false"; } } else { if (companyUpgrade.Type == CompanyType.Supplier) { this.hfdValid.Value = "false"; this.hfdBussnessValid.Value = "false"; } } if (companyUpgrade.Type == CompanyType.Provider) { this.bussnessTime.Visible = false; this.lblUpgradeType.Text = CompanyType.Provider.GetDescription() + "(" + AccountBaseType.Enterprise.GetDescription() + ")"; } else { this.lblUpgradeType.Text = CompanyType.Supplier.GetDescription() + "(" + AccountBaseType.Enterprise.GetDescription() + ")"; } txtManagerName.Text = string.IsNullOrWhiteSpace(companyUpgrade.ManagerName) ? companyDetailInfo.ManagerName : companyUpgrade.ManagerName; txtManagerPhone.Text = string.IsNullOrWhiteSpace(companyUpgrade.ManagerPhone) ? companyDetailInfo.ManagerCellphone : companyUpgrade.ManagerPhone; txtEmergencyContact.Text = string.IsNullOrWhiteSpace(companyUpgrade.EmergencyName) ? companyDetailInfo.EmergencyContact : companyUpgrade.EmergencyName; txtEmergencyCall.Text = string.IsNullOrWhiteSpace(companyUpgrade.EmergencyPhone) ? companyDetailInfo.EmergencyCall : companyUpgrade.EmergencyPhone; lblAbbreviation.Text = string.IsNullOrWhiteSpace(companyUpgrade.AbbreviateName) ? companyDetailInfo.AbbreviateName : companyUpgrade.AbbreviateName; lblCompanyPhone.Text = string.IsNullOrWhiteSpace(companyUpgrade.OfficePhones) ? companyDetailInfo.OfficePhones : companyUpgrade.OfficePhones; lblIdCode.Text = string.IsNullOrWhiteSpace(companyUpgrade.OrginationCode) ? companyDetailInfo.OrginationCode : companyUpgrade.OrginationCode; } }