private void cmbCashParty_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         AccountLedgerInfo InfoAccountLedger = new AccountLedgerInfo();
         AccountLedgerBll bllAccountLedger = new AccountLedgerBll();
         if (cmbCashParty.SelectedValue.ToString() != "System.Data.DataRowView" && cmbCashParty.Text != "System.Data.DataRowView")
         {
             InfoAccountLedger = bllAccountLedger.accountLedgerviewbyId(Convert.ToDecimal(cmbCashParty.SelectedValue.ToString()));
             txtCustomer.Text = InfoAccountLedger.LedgerName;
             txtCreditPeriod.Text = InfoAccountLedger.CreditPeriod.ToString();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SV 63 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Cash or party combo changed, call the order combofill function and fill the basic functions
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbCashOrParty_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         GetSalesDetailsIdToDelete();
         AccountLedgerBll bllAccountLedger = new AccountLedgerBll();
         AccountLedgerInfo InfoAccountLedger = new AccountLedgerInfo();
         if (isFromEditMode == false)
         {
             if (cmbCashOrParty.Text != string.Empty)
             {
                 if (cmbCashOrParty.SelectedValue.ToString() != "System.Data.DataRowView" && cmbCashOrParty.Text != "System.Data.DataRowView")
                 {
                     InfoAccountLedger = bllAccountLedger.accountLedgerviewbyId(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()));
                     txtCustomer.Text = InfoAccountLedger.LedgerName;
                     cmbPricingLevel.SelectedValue = InfoAccountLedger.PricinglevelId == 0 ? 1 : InfoAccountLedger.PricinglevelId;
                     if (InfoAccountLedger.PricinglevelId == 0)
                     {
                         cmbPricingLevel.SelectedIndex = 0;
                     }
                     txtCreditPeriod.Text = InfoAccountLedger.CreditPeriod.ToString();
                 }
             }
         }
         else if (cmbSalesMode.SelectedIndex != 0)
         {
             Clear();
         }
         againstOrderComboFill();
     }
     catch (Exception ex)
     {
         MessageBox.Show("SI: 98" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }