/// <summary> /// On 'Print' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvContraReport.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); frmReport reportobj = new frmReport(); ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); DataTable dtblCotraReport = spContraMaster.ContraReport(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbVoucherType.Text, cmbCashOrBank.Text, strType); ds.Tables.Add(dtblCompany); ds.Tables.Add(dtblCotraReport); reportobj.MdiParent = formMDI.MDIObj; reportobj.ContraVoucherReport(ds); } else { MessageBox.Show("No data found", "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("CRT:12" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void ContraMasterEdit(ContraMasterInfo contramasterinfo) { try { ContraMasterSP spContraMaster = new ContraMasterSP(); spContraMaster.ContraMasterEdit(contramasterinfo); } catch (Exception ex) { MessageBox.Show("CVBLL:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public ContraMasterInfo ContraMasterView(decimal contraMasterId) { ContraMasterInfo contramasterinfo = new ContraMasterInfo(); try { ContraMasterSP spContraMaster = new ContraMasterSP(); contramasterinfo = spContraMaster.ContraMasterView(contraMasterId); } catch (Exception ex) { MessageBox.Show("CVBLL:12" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(contramasterinfo); }
public DataSet ContraVoucherPrinting(decimal decContraMasterId, decimal decCompanyId) { DataSet dSt = new DataSet(); try { ContraMasterSP spContraMaster = new ContraMasterSP(); dSt = spContraMaster.ContraVoucherPrinting(decContraMasterId, decCompanyId); } catch (Exception ex) { MessageBox.Show("CVBLL:12" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(dSt); }
public decimal ContraMasterAdd(ContraMasterInfo contramasterinfo) { decimal decIdentity = 0; try { ContraMasterSP spContraMaster = new ContraMasterSP(); decIdentity = spContraMaster.ContraMasterAdd(contramasterinfo); } catch (Exception ex) { MessageBox.Show("CVBLL:10" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(decIdentity); }
public bool ContraVoucherCheckExistence(string voucherNo, decimal voucherTypeId, decimal masterId) { bool trueOrfalse = false; try { ContraMasterSP spContraMaster = new ContraMasterSP(); trueOrfalse = spContraMaster.ContraVoucherCheckExistence(voucherNo, voucherTypeId, masterId); } catch (Exception ex) { MessageBox.Show("CVBLL:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(trueOrfalse); }
public string ContraVoucherMasterGetMax(decimal decVoucherTypeId) { string max = "0"; try { ContraMasterSP spContraMaster = new ContraMasterSP(); max = spContraMaster.ContraVoucherMasterGetMax(decVoucherTypeId); } catch (Exception ex) { MessageBox.Show("CVBLL:8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(max); }
public List <DataTable> ContraReport(DateTime dtdateFrom, DateTime dtdateTo, string strVoucherType, string strLedgerName, string strType) { List <DataTable> listObj = new List <DataTable>(); try { ContraMasterSP spContraMaster = new ContraMasterSP(); listObj = spContraMaster.ContraReport(dtdateFrom, dtdateTo, strVoucherType, strLedgerName, strType); } catch (Exception ex) { MessageBox.Show("CVBLL:8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }
/// <summary> /// Function to fill Cash/Bank combobox /// </summary> public void BankOrCashComboFill() { try { ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtbl = new DataTable(); dtbl = spContraMaster.CashOrBankComboFill(); DataRow dr = dtbl.NewRow(); dr[0] = "ALL"; dtbl.Rows.InsertAt(dr, 0); cmbCashOrBank.DataSource = dtbl; cmbCashOrBank.ValueMember = "ledgerId"; cmbCashOrBank.DisplayMember = "ledgerName"; cmbCashOrBank.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show("CRT:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Datagridview /// </summary> public void GridFill() { try { ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtbl = new DataTable(); if (rbtnDeposit.Checked) { strType = "Deposit"; } else { strType = "Withdraw"; } dtbl = spContraMaster.ContraReport(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbVoucherType.Text, cmbCashOrBank.Text, strType); dgvContraReport.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("CRT:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Datagridview /// </summary> public void Gridfill() { try { string strType = string.Empty; if (rbtnDeposit.Checked) { strType = "Deposit"; } else { strType = "Withdraw"; } ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtbl = new DataTable(); dtbl = spContraMaster.ContraVoucherRegisterSearch(Convert.ToDateTime(dtpFromDate.Value), Convert.ToDateTime(dtpToDate.Value), txtVoucherNo.Text.Trim(), cmbBankOrCash.Text, strType); dgvContraRegister.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("CR:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }