Beispiel #1
0
 /// <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();
         AccountLedgerSP SpAccountLedger = new AccountLedgerSP();
         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 = SpAccountLedger.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);
     }
 }
 private void cmbCashParty_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         AccountLedgerInfo InfoAccountLedger = new AccountLedgerInfo();
         AccountLedgerSP SpAccountLedger = new AccountLedgerSP();
         if (cmbCashParty.SelectedValue.ToString() != "System.Data.DataRowView" && cmbCashParty.Text != "System.Data.DataRowView")
         {
             InfoAccountLedger = SpAccountLedger.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);
     }
 }