/// <summary> /// Function to fill Datagirdview /// </summary> public void RejectionInReportFill() { try { RejectionInBll bllRejectionIn = new RejectionInBll(); List <DataTable> listObj = new List <DataTable>(); try { decimal decDeliveryNoteNo = 0; if (cmbDeliveryNoteNo.SelectedIndex != -1) { decDeliveryNoteNo = Convert.ToDecimal(cmbDeliveryNoteNo.SelectedValue.ToString()); } string strVoucherNo = txtVoucherNo.Text; string strProductCode = txtProductCode.Text; listObj = bllRejectionIn.RejectionInReportFill(Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), strVoucherNo, Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString()), decDeliveryNoteNo, Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString()), strProductCode); dgvRejectionInReport.DataSource = listObj[0]; txtFromDate.Focus(); } catch (Exception ex) { MessageBox.Show("RIReport:04" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("RIReport:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill VoucherType combobox /// </summary> public void VoucherTypeComboFill() { RejectionInBll bllRejectionIn = new RejectionInBll(); try { bllRejectionIn.VoucherTypeSelectionFill(cmbVoucherType, "Rejection In", true); } catch (Exception ex) { MessageBox.Show("RIReport:05" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function for Print /// </summary> public void PrintReport() { try { RejectionInBll bllRejectionIn = new RejectionInBll(); DataSet dsRejectionInReport = bllRejectionIn.RejectionInReportPrinting(dtFromDate, dtToDate, decVoucherType, strVocherNo, decCashOrParty, decDeliveryNoteNo, decSalesManId, strProductCode); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.RejectionInReportPrinting(dsRejectionInReport); } catch (Exception ex) { MessageBox.Show("RIReport:08" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill DeliveryNote No combobox /// </summary> public void DeliveryNoteComboFill() { decimal decLedgerId = 0; RejectionInBll bllRejectionIn = new RejectionInBll(); //RejectionInMasterSP spRejectionInMaster = new RejectionInMasterSP(); try { bllRejectionIn.DeliveryNoteNoComboFillToLedger(cmbDeliveryNoteNo, decLedgerId, true); } catch (Exception ex) { MessageBox.Show("RIReport:06" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Datagridview /// </summary> public void RegisterGridFill() { RejectionInBll bllRejectionIn = new RejectionInBll(); List <DataTable> listObj = new List <DataTable>(); try { decimal decvouchertypeId = 0; decimal decLedgerId = 0; string strInvoiceNo = string.Empty; strInvoiceNo = (txtRejectionInNo.Text.Trim() == string.Empty) ? string.Empty : txtRejectionInNo.Text; decLedgerId = (cmbCashorParty.SelectedIndex == 0 || cmbCashorParty.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString()); decvouchertypeId = (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()); DateTime FromDate = this.dtpFromDate.Value; DateTime ToDate = this.dtpToDate.Value; DataTable dtbl = new DataTable(); listObj = bllRejectionIn.RejectionInRegisterFill(FromDate, ToDate, decLedgerId, strInvoiceNo, decvouchertypeId); dgvRejectionInRegister.DataSource = listObj[0]; } catch (Exception ex) { MessageBox.Show("RIRgstr:01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }