Пример #1
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         string strInvoiceNo = string.Empty;
         if (txtQuotationNo.Text.Trim() == string.Empty)
         {
             txtQuotationNo.Text = string.Empty;
         }
         else
         {
             strInvoiceNo = txtQuotationNo.Text;
         }
         if (rbtnAll.Checked)
         {
             strCondition = "All";
         }
         if (rbtnPending.Checked)
         {
             strCondition = "False";
         }
         if (rbtnApproved.Checked)
         {
             strCondition = "True";
         }
         if (cmbCashOrParty.SelectedIndex == 0 || cmbCashOrParty.SelectedIndex == -1)
         {
             LedgerId = -1;
         }
         else
         {
             LedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
         }
         DateTime FromDate = this.dtpFromDate.Value;
         DateTime ToDate   = this.dtpToDate.Value;
         dtblSalesQuotationMasterRegister     = SpSalesQuotationMaster.SalesQuotationRegisterSearch(strInvoiceNo, LedgerId, FromDate, ToDate, strCondition);
         dgvSalesQuotationRegister.DataSource = dtblSalesQuotationMasterRegister;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SQREG2:" + ex.Message;
     }
 }