Пример #1
0
 /// <summary>
 /// Function to use the quotation no combofill
 /// </summary>
 /// <param name="decLedger"></param>
 public void QuotationNoComboFill(decimal decLedger)
 {
     try
     {
         DataTable dtbl = new DataTable();
         dtbl = new SalesQuotationMasterSP().GetQuotationNoCorrespondingtoLedgerForSalesOrderRpt(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()));
         if (dtbl != null)
         {
             DataRow dr = dtbl.NewRow();
             dr[0] = "0";
             dr[1] = string.Empty;
             dtbl.Rows.InsertAt(dr, 0);
             cmbQuotationNo.DataSource = dtbl;
             if (dtbl.Rows.Count > 0)
             {
                 cmbQuotationNo.ValueMember = "quotationMasterId";
                 cmbQuotationNo.DisplayMember = "invoiceNo";
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SO9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #2
0
 /// <summary>
 /// Function to fill the Order combo box based on the sales quotation numbers
 /// </summary>
 public void AgainstQuotationComboFill()
 {
     try
     {
         if (cmbType.Items.Count > 0)
         {
             if (cmbType.SelectedValue.ToString() != "System.Data.DataRowView")
             {
                 DataTable dtblQuotationFill = new DataTable();
                 dtblQuotationFill = new SalesQuotationMasterSP().GetSalesQuotationNumberCorrespondingToLedgerForSO(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), Convert.ToDecimal(cmbType.SelectedValue.ToString()), decSalesOrderMasterId);
                 DataRow dr = dtblQuotationFill.NewRow();
                 dr[0] = "0";
                 dr[1] = string.Empty;
                 dtblQuotationFill.Rows.InsertAt(dr, 0);
                 cmbQuotationNo.DataSource = dtblQuotationFill;
                 cmbQuotationNo.DisplayMember = "invoiceNo";
                 cmbQuotationNo.ValueMember = "quotationMasterId";
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SO6: " + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }