예제 #1
0
 /// <summary>
 /// Gridfill function based on the search condition
 /// </summary>
 public void Search()
 {
     try
     {
         if (cmbVoucherType.Items.Count != 0 && cmbAccountLedger.Items.Count != 0)
         {
             if ((cmbAccountLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     string          strFromDate       = txtFromDate.Text;
                     string          strToDate         = txtToDate.Text;
                     decimal         decVoucherTypeId  = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                     decimal         decLedgerId       = Convert.ToDecimal(cmbAccountLedger.SelectedValue.ToString());
                     DataTable       dtblJournalReport = new DataTable();
                     JournalMasterSP spJournalMaster   = new JournalMasterSP();
                     dtblJournalReport           = spJournalMaster.JournalReportSearch(strFromDate, strToDate, decVoucherTypeId, decLedgerId);
                     dgvJournalReport.DataSource = dtblJournalReport;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("JVREP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        public List <DataTable> JournalReportSearch(string strFromDate, string strToDate, decimal decVoucherTypeId, decimal decLedgerId)
        {
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spJournalMaster.JournalReportSearch(strFromDate, strToDate, decVoucherTypeId, decLedgerId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("JVBLL13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }