Пример #1
0
 /// <summary>
 /// account no combobox selected index change 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbAccountLedger_SelectedIndexChanged(object sender, EventArgs e)
 {
     AccountLedgerSP spaccountledger = new AccountLedgerSP();
     try
     {
         strAccNameText = cmbAccountLedger.Text;
         if (isWorkLedgerIndexChange)
         {
             if (cmbAccountLedger.SelectedValue != null && cmbAccountLedger.SelectedValue.ToString() != "")
             {
                 if (spaccountledger.AccountGroupIdCheckSundryCreditorOnly(cmbAccountLedger.Text))
                 {
                     btnAgainstRef.Enabled = true;
                     txtAmount.ReadOnly = true;
                     decLedgerIdForPartyBalance = Convert.ToDecimal(cmbAccountLedger.SelectedValue.ToString());
                 }
                 else
                 {
                     btnAgainstRef.Enabled = false;
                     txtAmount.ReadOnly = false;
                 }
             }
             strOldLedgerId = (cmbAccountLedger.SelectedValue.ToString());
             txtAmount.Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PP42:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }