/// <summary> /// Function to fill datagridview /// </summary> public void SalesReturnReportGrideFill() { try { if (cmbCashOrParty.SelectedValue != null && cmbSalesMan.SelectedValue != null && cmbVoucherType.SelectedValue != null) { if (cmbCashOrParty.SelectedValue.ToString() != "System.Data.DataRowView" && cmbSalesMan.SelectedValue.ToString() != "System.Data.DataRowView" && cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") { DataTable dtblReg = new DataTable(); dtblReg = spSalesReturnMaster.SalesReturnReportGrideFill(Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString()), txtProductCode.Text, txtVoucherNo.Text); dgvsalesReturnReport.DataSource = dtblReg; } } } catch (Exception ex) { formMDI.infoError.ErrorString = "SRRprt6:" + ex.Message; } }
/// <summary> /// Function to fill datagridview /// </summary> public void SalesReturnReportGrideFill() { try { if (cmbCashOrParty.SelectedValue != null && cmbSalesMan.SelectedValue != null && cmbVoucherType.SelectedValue != null) { if (cmbCashOrParty.SelectedValue.ToString() != "System.Data.DataRowView" && cmbSalesMan.SelectedValue.ToString() != "System.Data.DataRowView" && cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView") { DataTable dtblReg = new DataTable(); dtblReg = spSalesReturnMaster.SalesReturnReportGrideFill(Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString()), txtProductCode.Text, txtVoucherNo.Text); dgvsalesReturnReport.DataSource = dtblReg; } } } catch (Exception ex) { MessageBox.Show("SRRprt6:" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }