コード例 #1
0
        private void onload()
        {
            string sql   = string.Empty;
            string error = string.Empty;

            if (ToolManager.CheckQueryString("Id"))
            {
                sql = string.Format(@" select * from SupplierInfo where SupplierId='{0}' ", ToolManager.GetQueryString("Id"));
                SupplierInfo supplierinfo = SupplierInfoManager.ConvertDataTableToModel(sql);
                this.lbSupplierId.InnerText        = supplierinfo.SupplierId;
                this.lbSupplierName.InnerText      = supplierinfo.SupplierName;
                this.lbRegisteredAddress.InnerText = supplierinfo.RegisteredAddress;
                this.lbLegalPerson.InnerText       = supplierinfo.LegalPerson;
                this.lbContacts.InnerText          = supplierinfo.Contacts;
                this.lbRegisteredPhone.InnerText   = supplierinfo.RegisteredPhone;
                this.lbContactTelephone.InnerText  = supplierinfo.ContactTelephone;
                this.lbFax.InnerText             = supplierinfo.Fax;
                this.lbMobilePhone.InnerText     = supplierinfo.MobilePhone;
                this.lbEmail.InnerText           = supplierinfo.Email;
                this.lbQQ.InnerText              = supplierinfo.QQ;
                this.lbZipCode.InnerText         = supplierinfo.ZipCode;
                this.lbSparePhone.InnerText      = supplierinfo.SparePhone;
                this.lbAccountBank.InnerText     = supplierinfo.AccountBank;
                this.lbBankRowNumber.InnerText   = supplierinfo.BankRowNumber;
                this.lbBankAccount.InnerText     = supplierinfo.BankAccount;
                this.lbTaxNo.InnerText           = supplierinfo.TaxNo;
                this.lbDeliveryAddress.InnerText = supplierinfo.DeliveryAddress;
                this.lbWebsiteAddress.InnerText  = supplierinfo.WebsiteAddress;
                this.lbRemark.InnerText          = supplierinfo.Remark;
                lbPaymentdays.InnerText          = supplierinfo.paymentdays + "天";
                lbPercentageInAdvance.InnerText  = (Convert.ToDouble(supplierinfo.percentageInAdvance) * 100).ToString() + "%";
            }
        }
コード例 #2
0
        private void LoadPage()
        {
            string sql   = string.Empty;
            string error = string.Empty;

            if (ToolManager.CheckQueryString("Id"))
            {
                sql = string.Format(@" select * from SupplierInfo where SupplierId='{0}' ", ToolManager.GetQueryString("Id"));
                //sql = string.Format(@" select * from SupplierInfo where SupplierId='{0}' ", "1");
                this.trSupplierId.Visible = false;
                SupplierInfo supplierinfo = SupplierInfoManager.ConvertDataTableToModel(sql);
                this.txtSupplierId.Text        = supplierinfo.SupplierId;
                this.txtSupplierName.Text      = supplierinfo.SupplierName;
                this.txtRegisteredAddress.Text = supplierinfo.RegisteredAddress;
                this.txtLegalPerson.Text       = supplierinfo.LegalPerson;
                this.txtContacts.Text          = supplierinfo.Contacts;
                this.txtRegisteredPhone.Text   = supplierinfo.RegisteredPhone;
                this.txtContactTelephone.Text  = supplierinfo.ContactTelephone;
                this.txtFax.Text                  = supplierinfo.Fax;
                this.txtMobilePhone.Text          = supplierinfo.MobilePhone;
                this.txtZipCode.Text              = supplierinfo.ZipCode;
                this.txtSparePhone.Text           = supplierinfo.SparePhone;
                this.txtEmail.Text                = supplierinfo.Email;
                this.txtQQ.Text                   = supplierinfo.QQ;
                this.txtAccountBank.Text          = supplierinfo.AccountBank;
                this.txtBankRowNumber.Text        = supplierinfo.BankRowNumber;
                this.txtBankAccount.Text          = supplierinfo.BankAccount;
                this.txtTaxNo.Text                = supplierinfo.TaxNo;
                this.txtWebsiteAddress.Text       = supplierinfo.WebsiteAddress;
                this.txtDeliveryAddress.Text      = supplierinfo.DeliveryAddress;
                this.txtRemark.Text               = supplierinfo.Remark;
                this.drpPaymentMode.SelectedValue = supplierinfo.PaymentMode;
                //this.txtPaymentdays.Text = supplierinfo.paymentdays.ToString();
                //this.drpPercentageInAdvance.SelectedValue = supplierinfo.percentageInAdvance.ToString();
                this.txtFactoryAddress.Text   = supplierinfo.FactoryAddress;
                this.drpPayType.SelectedValue = supplierinfo.PayType;
                btnSubmit.Text = "修改";
            }
        }