/// <summary> /// Function to fill controls to update /// </summary> public void FillControls() { try { AccountLedgerInfo infoAccountledger = new AccountLedgerInfo(); AccountLedgerBll bllAccountLedger = new AccountLedgerBll(); infoAccountledger = bllAccountLedger.AccountLedgerViewForCustomer(decLedgerIdForEdit); txtCustomerName.Text = infoAccountledger.LedgerName; txtMailingName.Text = infoAccountledger.MailingName; txtOpeningBalance.Text = infoAccountledger.OpeningBalance.ToString(); cmbDrorCr.Text = infoAccountledger.CrOrDr.ToString(); txtAccountNo.Text = infoAccountledger.BankAccountNumber; txtBranchName.Text = infoAccountledger.BranchName; txtBranchCode.Text = infoAccountledger.BranchCode; txtMobile.Text = infoAccountledger.Mobile.ToString(); txtphone.Text = infoAccountledger.Phone.ToString(); txtAddress.Text = infoAccountledger.Address; txtEmail.Text = infoAccountledger.Email; cmbPricingLevel.SelectedValue = infoAccountledger.PricinglevelId.ToString(); if (infoAccountledger.BillByBill) { cmbBillbyBill.Text = "Yes"; } else { cmbBillbyBill.Text = "No"; } if (bllAccountLedger.PartyBalanceAgainstReferenceCheck(decLedgerIdForEdit.ToString(), 1)) { txtOpeningBalance.Enabled = false; cmbDrorCr.Enabled = false; cmbBillbyBill.Enabled = false; } txtCreditPeriod.Text = infoAccountledger.CreditPeriod.ToString(); txtCreditLimit.Text = infoAccountledger.CreditLimit.ToString(); txtTin.Text = infoAccountledger.Tin; txtPan.Text = infoAccountledger.Pan; txtCST.Text = infoAccountledger.Cst; cmbArea.SelectedValue = infoAccountledger.AreaId.ToString(); cmbRoute.SelectedValue = infoAccountledger.RouteId.ToString(); txtNarration.Text = infoAccountledger.Narration; decLedger = infoAccountledger.LedgerId; } catch (Exception ex) { MessageBox.Show("Cus11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }