Ejemplo n.º 1
0
        private void onload()
        {
            string sql   = string.Empty;
            string error = string.Empty;

            if (ToolManager.CheckQueryString("Id"))
            {
                sql = string.Format(@" select * from Customer where CustomerId='{0}' ", ToolManager.GetQueryString("Id"));
                Customer customer = CustomerInfoManager.ConvertDataTableToModel(sql);
                this.lbCustomerId.InnerText        = customer.CustomerId;
                this.lbCustomerName.InnerText      = customer.CustomerName;
                this.lbRegisteredAddress.InnerText = customer.RegisteredAddress;
                this.lbLegalPerson.InnerText       = customer.LegalPerson;
                this.lbContacts.InnerText          = customer.Contacts;
                this.lbRegisteredPhone.InnerText   = customer.RegisteredPhone;
                this.lbContactTelephone.InnerText  = customer.ContactTelephone;
                this.lbFax.InnerText             = customer.Fax;
                this.lbMobilePhone.InnerText     = customer.MobilePhone;
                this.lbEmail.InnerText           = customer.Email;
                this.lbQQ.InnerText              = customer.QQ;
                this.lbZipCode.InnerText         = customer.ZipCode;
                this.lbSparePhone.InnerText      = customer.SparePhone;
                this.lbAccountBank.InnerText     = customer.AccountBank;
                this.lbSortCode.InnerText        = customer.SortCode;
                this.lbBankAccount.InnerText     = customer.BankAccount;
                this.lbTaxNo.InnerText           = customer.TaxNo;
                this.lbDeliveryAddress.InnerText = customer.DeliveryAddress;
                this.lbWebsiteAddress.InnerText  = customer.WebsiteAddress;
                this.lbRemark.InnerText          = customer.Remark;
            }
        }
Ejemplo n.º 2
0
        private void LoadPage()
        {
            string sql   = string.Empty;
            string error = string.Empty;

            ControlBindManager.BindDrp(" select id,MakeCollectionsMode from MakeCollectionsMode ", this.drpMakeCollectionsModeId, "id", "MakeCollectionsMode");
            if (ToolManager.CheckQueryString("Id"))
            {
                sql = string.Format(@" select * from Customer where CustomerId='{0}' ", ToolManager.GetQueryString("Id"));
                //sql = string.Format(@" select * from Customer where CustomerId='{0}' ", "5");
                this.trCustomerNuber.Visible = false;
                Customer customer = CustomerInfoManager.ConvertDataTableToModel(sql);
                this.txtCustomerNumber.Text    = customer.CustomerId;
                this.txtCustomerName.Text      = customer.CustomerName;
                this.txtRegisteredAddress.Text = customer.RegisteredAddress;
                this.txtLegalPerson.Text       = customer.LegalPerson;
                this.txtContacts.Text          = customer.Contacts;
                this.txtRegisteredPhone.Text   = customer.RegisteredPhone;
                this.txtContactTelephone.Text  = customer.ContactTelephone;
                this.txtFax.Text             = customer.Fax;
                this.txtMobilePhone.Text     = customer.MobilePhone;
                this.txtZipCode.Text         = customer.ZipCode;
                this.txtSparePhone.Text      = customer.SparePhone;
                this.txtEmail.Text           = customer.Email;
                this.txtQQ.Text              = customer.QQ;
                this.txtAccountBank.Text     = customer.AccountBank;
                this.txtSortCode.Text        = customer.SortCode;
                this.txtBankAccount.Text     = customer.BankAccount;
                this.txtTaxNo.Text           = customer.TaxNo;
                this.txtWebsiteAddress.Text  = customer.WebsiteAddress;
                this.txtDeliveryAddress.Text = customer.DeliveryAddress;
                //this.txtPaymentdays.Text = customer.Paymentdays.ToString();
                //this.drpPercentageInAdvance.SelectedValue = customer.PercentageInAdvance.ToString();
                this.txtRemark.Text = customer.Remark;
                this.drpMakeCollectionsModeId.SelectedValue = customer.MakeCollectionsModeId;
                this.txtFactoryAddress.Text       = customer.FactoryAddress;
                this.drpReceiveType.SelectedValue = customer.ReceiveType;
                btnSubmit.Text = "修改";
            }
            else
            {
                btnSubmit.Text = "添加";
            }
        }