Example #1
0
 /// <summary>
 /// Print button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click_1(object sender, EventArgs e)
 {
     try
     {
         PhysicalStockMasterSP spPhysicalStockMaster = new PhysicalStockMasterSP();
         if (dgvPhysicalStockReport.RowCount > 0)
         {
             DataSet   ds                      = new DataSet();
             CompanySP spCompany               = new CompanySP();
             frmReport reportobj               = new frmReport();
             DataTable dtblCompany             = spCompany.CompanyViewDataTable(1);
             DataTable dtblPhysicalStockReport = spPhysicalStockMaster.PhysicalStockReportFill(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), txtProductName.Text.Trim(), Convert.ToDecimal(cmbProductCode.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue));
             ds.Tables.Add(dtblCompany);
             ds.Tables.Add(dtblPhysicalStockReport);
             reportobj.MdiParent = formMDI.MDIObj;
             reportobj.PhysicalStockReport(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PSRT6:" + ex.Message;
     }
 }
Example #2
0
 /// <summary>
 /// Print button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click_1(object sender, EventArgs e)
 {
     try
     {
         //PhysicalStockMasterSP spPhysicalStockMaster = new PhysicalStockMasterSP();
         PhysicalStockBll BllPhysicalStock = new PhysicalStockBll();
         if (dgvPhysicalStockReport.RowCount > 0)
         {
             DataSet ds = new DataSet();
             //CompanySP spCompany = new CompanySP();
             CompanyCreationBll bllCompanyCreation         = new CompanyCreationBll();
             frmReport          reportobj                  = new frmReport();
             List <DataTable>   listObjCompany             = bllCompanyCreation.CompanyViewDataTable(1);
             List <DataTable>   listObjPhysicalStockReport = BllPhysicalStock.PhysicalStockReportFill(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), txtProductName.Text.Trim(), Convert.ToDecimal(cmbProductCode.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue));
             ds.Tables.Add(listObjCompany[0]);
             ds.Tables.Add(listObjPhysicalStockReport[0]);
             reportobj.MdiParent = formMDI.MDIObj;
             reportobj.PhysicalStockReport(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PSRT:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Print button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click_1(object sender, EventArgs e)
 {
     try
     {
         //PhysicalStockMasterSP spPhysicalStockMaster = new PhysicalStockMasterSP();
         PhysicalStockBll BllPhysicalStock = new PhysicalStockBll();
         if (dgvPhysicalStockReport.RowCount > 0)
         {
             DataSet ds = new DataSet();
             //CompanySP spCompany = new CompanySP();
             CompanyCreationBll bllCompanyCreation = new CompanyCreationBll();
             frmReport reportobj = new frmReport();
             List<DataTable> listObjCompany = bllCompanyCreation.CompanyViewDataTable(1);
             List<DataTable> listObjPhysicalStockReport = BllPhysicalStock.PhysicalStockReportFill(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), txtProductName.Text.Trim(), Convert.ToDecimal(cmbProductCode.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue));
             ds.Tables.Add(listObjCompany[0]);
             ds.Tables.Add(listObjPhysicalStockReport[0]);
             reportobj.MdiParent = formMDI.MDIObj;
             reportobj.PhysicalStockReport(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PSRT:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }