/// <summary> /// Function to fill Datagridview /// </summary> public void GridFill() { try { ServiceMasterSP spServiceMaster = new ServiceMasterSP(); DataTable dtbl = new DataTable(); dtbl = spServiceMaster.ServiceReportSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbVoucherType.Text.Trim(), cmbCashOrParty.Text.ToString(), cmbSalesman.Text.ToString()); dgvServiceReport.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("SVRT 9 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to view details for search in report based on parameter /// </summary> /// <param name="dtDateFrom"></param> /// <param name="dtDateTo"></param> /// <param name="strVoucherTypeName"></param> /// <param name="strLedgerName"></param> /// <param name="strEmployeeName"></param> /// <returns></returns> public List <DataTable> ServiceReportSearch(DateTime dtDateFrom, DateTime dtDateTo, string strVoucherTypeName, string strLedgerName, string strEmployeeName) { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spServiceMaster.ServiceReportSearch(dtDateFrom, dtDateTo, strVoucherTypeName, strLedgerName, strEmployeeName); } catch (Exception ex) { MessageBox.Show("AL35:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }