Пример #1
0
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     if (!GlobalFunctions.checkRights("tsmStockInventory", "Preview"))
     {
         return;
     }
     try
     {
         loStockInventoryRpt.SetDataSource(GlobalVariables.DTCompanyLogo);
         loStockInventoryRpt.Database.Tables[1].SetDataSource(loInventoryDetail.getStockInventory(cboLocation.SelectedValue.ToString()));
         loStockInventoryRpt.SetParameterValue("CompanyName", GlobalVariables.CompanyName);
         loStockInventoryRpt.SetParameterValue("CompanyAddress", GlobalVariables.CompanyAddress);
         loStockInventoryRpt.SetParameterValue("CompanyContactNumber", GlobalVariables.ContactNumber);
         loStockInventoryRpt.SetParameterValue("Username", GlobalVariables.Userfullname);
         loStockInventoryRpt.SetParameterValue("Title", "Stock Inventory");
         loStockInventoryRpt.SetParameterValue("SubTitle", "StockInventory");
         loStockInventoryRpt.SetParameterValue("Location", cboLocation.Text);
         crvStockInventory.ReportSource = loStockInventoryRpt;
     }
     catch
     { }
 }
Пример #2
0
 private void btnPreviewAllStocks_Click(object sender, EventArgs e)
 {
     try
     {
         loStockInventoryRpt.SetDataSource(GlobalVariables.DTCompanyLogo);
         loStockInventoryRpt.Database.Tables[1].SetDataSource(ldtAllStocks);
         loStockInventoryRpt.SetParameterValue("CompanyName", GlobalVariables.CompanyName);
         loStockInventoryRpt.SetParameterValue("CompanyAddress", GlobalVariables.CompanyAddress);
         loStockInventoryRpt.SetParameterValue("CompanyContactNumber", GlobalVariables.ContactNumber);
         loStockInventoryRpt.SetParameterValue("Username", GlobalVariables.Userfullname);
         loStockInventoryRpt.SetParameterValue("Title", "Stock Inventory");
         loStockInventoryRpt.SetParameterValue("SubTitle", "Stock Inventory");
         loReportViewer.crystalReportViewer.ReportSource = loStockInventoryRpt;
         loReportViewer.ShowDialog();
     }
     catch (Exception ex)
     {
         ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnPreviewAllStocks_Click");
         em.ShowDialog();
         return;
     }
 }