/// <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 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) { formMDI.infoError.ErrorString = "SVRT9:" + ex.Message; } }