Пример #1
0
 /// <summary>
 /// To fill the Order combo box based on the sales quotation numbers
 /// </summary>
 public void AgainstQuotationComboFill()
 {
     try
     {
         if (cmbType.SelectedValue.ToString() != "System.Data.DataRowView")
         {
             SalesQuotationMasterSP spQuotationMaster = new SalesQuotationMasterSP();
             DataTable dtblQuotationFill = new DataTable();
             dtblQuotationFill = spQuotationMaster.GetSalesQuotationNumberCorrespondingToLedgerForDN(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), Convert.ToDecimal(cmbType.SelectedValue.ToString()), decDelivryNoteIdToEdit);
             DataRow dr = dtblQuotationFill.NewRow();
             dr[0] = 0;
             dr[1] = string.Empty;
             dtblQuotationFill.Rows.InsertAt(dr, 0);
             cmbOrderNo.DataSource = dtblQuotationFill;
             if (dtblQuotationFill.Rows.Count > 0)
             {
                 cmbOrderNo.DisplayMember = "invoiceNo";
                 cmbOrderNo.ValueMember = "quotationMasterId";
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("DN13: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }