public List <DataTable> MaterialReceiptReportViewAll(decimal decOrderId, string strInvoiceNo, decimal decLedgerId, decimal decVouchertypeId, string strProductCode, DateTime FromDate, DateTime ToDate, string strStatus)
        {
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spMaterialReceiptMaster.MaterialReceiptReportViewAll(decOrderId, strInvoiceNo, decLedgerId, decVouchertypeId, strProductCode, FromDate, ToDate, strStatus);
            }
            catch (Exception ex)
            {
                MessageBox.Show("MRBLL19:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }
Exemple #2
0
 /// <summary>
 /// Function to fill the grid based on the search condition
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable dtblMaterialReceiptRegister           = new DataTable();
         MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
         if (cmbOrderNo.SelectedIndex == 0 || cmbOrderNo.SelectedIndex == -1)
         {
             decOrderId = -1;
         }
         else
         {
             decOrderId = Convert.ToDecimal(cmbOrderNo.SelectedValue.ToString());
         }
         if (txtVoucherNo.Text.Trim() == string.Empty)
         {
             strInvoiceNo = string.Empty;
         }
         else
         {
             strInvoiceNo = txtVoucherNo.Text;
         }
         if (cmbCashOrParty.SelectedIndex == 0 || cmbCashOrParty.SelectedIndex == -1)
         {
             decLedgerId = -1;
         }
         else
         {
             decLedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
         }
         if (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1)
         {
             decVoucherTypeId = -1;
         }
         else
         {
             decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
         }
         if (txtProductCode.Text.Trim() == string.Empty)
         {
             strproductCode = string.Empty;
         }
         else
         {
             strproductCode = txtProductCode.Text;
         }
         if (cmbStatus.SelectedIndex == 0 || cmbStatus.SelectedIndex == -1)
         {
             strStatus = "All";
         }
         else
         {
             strStatus = cmbStatus.SelectedItem.ToString();
         }
         DateTime FromDate = this.dtpFromDate.Value;
         DateTime ToDate   = this.dtpToDate.Value;
         dtblMaterialReceiptRegister         = spMaterialReceiptMaster.MaterialReceiptReportViewAll(decOrderId, strInvoiceNo, decLedgerId, decVoucherTypeId, strproductCode, FromDate, ToDate, strStatus);
         dgvMaterialReceiptReport.DataSource = dtblMaterialReceiptRegister;
     }
     catch (Exception ex)
     {
         MessageBox.Show("MRR5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }