using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.Model; using CY.BLL.OA; using CY.BLL; using CY.Infrastructure.Common; using System.Data; namespace CY.WebForm.Pages.procurement { public partial class SuppliersDetail : BasePage { OA_Suppliers supplier = null; OA_SuppliersBLL _OA_SuppliersBLL = null; OA_SuppliersOtherQualificationBLL _OA_SuppliersOtherQualificationBLL = null; public string[] Fileds; public SuppliersDetail() { _OA_SuppliersOtherQualificationBLL = new OA_SuppliersOtherQualificationBLL(); supplier = new OA_Suppliers(); _OA_SuppliersBLL = new OA_SuppliersBLL(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitialData(); } } protected void InitialData() { supplier = _OA_SuppliersBLL.getSingleSupplier(Request["Keyid"].ToString2()); this.spanBusinessLicenseNum.InnerText = supplier.BusinessLicenseNum; this.spanBusinessManagers.InnerText = supplier.BusinessManagers; this.spanBusinessScope.InnerText = supplier.BusinessScope; this.spanCompanyPhone.InnerText = supplier.CompanyPhone; this.spanCooperativeStateId.InnerText = supplier.CooperativeState.Name; this.spanDetailedAddress.InnerText = supplier.DetailedAddress; this.spanFax.InnerText = supplier.Fax; this.spanFinancialOfficers.InnerText = supplier.FinancialOfficers; this.spanBank.InnerText = supplier.Bank; this.spanHuming.InnerText = supplier.Huming; this.spanAccountID.InnerText = supplier.AccountID; this.spanLegalMobile.InnerText = supplier.LegalMobile; this.spanLegalQQ.InnerText = supplier.LegalQQ; this.spanLegalRepresentative.InnerText = supplier.LegalRepresentative; this.spanManagersMobile.InnerText = supplier.ManagersMobile; this.spanManagersQQ.InnerText = supplier.ManagersQQ; this.spanName.InnerText = supplier.Name; this.spanOfficersMobile.InnerText = supplier.OfficersMobile; this.spanOfficersQQ.InnerText = supplier.OfficersQQ; this.spanPostcode.InnerText = supplier.Postcode; this.spanQQ.InnerText = supplier.QQ; this.spanRegisterCapital.InnerText = supplier.RegisterCapital.ToString2(); this.spanSuppliersLevelId.InnerText = supplier.SuppliersLevel.Name; this.spanSuppliersTypeId.InnerText = supplier.SuppliersType.Name; this.spanWebSite.InnerText = supplier.WebSite; if (string.IsNullOrEmpty(supplier.TaxRegistrationFileId)) this.TaxRegistrationFileId.Src = supplier.TaxRegistrationFileId; else this.TaxRegistrationFileId.Visible = false; if (string.IsNullOrEmpty(supplier.BusinessLicenseFileId)) this.BusinessLicenseFileId.Src = supplier.BusinessLicenseFileId; else this.BusinessLicenseFileId.Visible = false; if (string.IsNullOrEmpty(supplier.OrganizationCodeFileId)) this.OrganizationCodeFileId.Src = supplier.OrganizationCodeFileId; else this.OrganizationCodeFileId.Visible = false; this.aOrganizationCodeFileId.HRef = supplier.OrganizationCodeFileId; this.aBusinessLicenseFileId.HRef = supplier.BusinessLicenseFileId; this.aTaxRegistrationFileImg.HRef = supplier.TaxRegistrationFileId; DataTable ds = _OA_SuppliersOtherQualificationBLL.selectOtherQuBySuppliersId(supplier.Keyid.ToString2()); if (ds != null && ds.Rows.Count > 0) { Fileds = new string[ds.Rows.Count]; for (int i = 0; i < ds.Rows.Count; i++) { Fileds[i] = ds.Rows[i]["FileId"].ToString2(); } } } } }