public void OutPutStram(string companyId) { string type = HttpContext.Current.Request.QueryString["type"]; HttpContext.Current.Response.ContentType = "image/jpeg"; CompanyDocument companyDocument = null; if (!string.IsNullOrWhiteSpace(companyId)) { companyDocument = AccountCombineService.QueryCompanyDocument(Guid.Parse(companyId)); } if (companyDocument != null) { if (type == "bussiness" && companyDocument.BussinessLicense != null && companyDocument.BussinessLicense.Length > 0) { HttpContext.Current.Response.BinaryWrite(companyDocument.BussinessLicense); } if (type == "certNo" && companyDocument.CertLicense != null && companyDocument.CertLicense.Length > 0) { HttpContext.Current.Response.BinaryWrite(companyDocument.CertLicense); } if (type == "iata" && companyDocument.IATALicense != null && companyDocument.IATALicense.Length > 0) { HttpContext.Current.Response.BinaryWrite(companyDocument.IATALicense); } } }
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; } }