Пример #1
0
        private void LoadData()
        {
            Payee payeeRead = payeeRepos.GetPayee(UserHelper.GetLoggedInUser(Session).UserID);

            pnlMain.Enabled = payeeRead == null;

            if (payeeRead != null)
            {
                //rblPayMethod.Items.FindByText(payeeRead.PaymentMethod).Selected = true;
                foreach (ListItem item in rblPayMethod.Items)
                {
                    if (item.Value.ToLower() == payeeRead.PaymentMethod.ToLower())
                    {
                        item.Selected = true;
                        break;
                    }
                }
                txtInternal.Text             = payeeRead.InternalRefNum;
                this.txtChequePayableTo.Text = payeeRead.ChequePayableTo;
                this.txtAttentionTo.Text     = payeeRead.AttentionTo;
                this.txtMailingAddr1.Text    = payeeRead.MailingAddr1;
                this.txtMailingAddr2.Text    = payeeRead.MailingAddr2;
                this.txtCity.Text            = payeeRead.City;
                this.DDListPro.SelectedValue = payeeRead.ProvinceID.Value.ToString();
                this.txtPostalCode.Text      = payeeRead.PostalCode;
                this.txtTaxNumber.Text       = payeeRead.TaxNumber;
                txtInstructions.Text         = payeeRead.AdditionalInstructions;
            }
        }
 public Domain.Payee GetPayee(int userID)
 {
     return(payeeRepos.GetPayee(userID));
 }