private void btnPreview_Click(object sender, EventArgs e) { try { if (!GlobalFunctions.checkRights("tsmMonthlyProjections", "Refresh")) { return; } try { loMonthlyProjectionsRpt.SetDataSource(GlobalVariables.DTCompanyLogo); loMonthlyProjectionsRpt.Database.Tables[1].SetDataSource(loLoanApplication.getMonthlyProjectionByBranch(cboBranch.SelectedValue.ToString())); loMonthlyProjectionsRpt.SetParameterValue("CompanyName", GlobalVariables.CompanyName); loMonthlyProjectionsRpt.SetParameterValue("CompanyAddress", GlobalVariables.CompanyAddress); loMonthlyProjectionsRpt.SetParameterValue("CompanyContactNumber", GlobalVariables.ContactNumber); loMonthlyProjectionsRpt.SetParameterValue("Username", GlobalVariables.Userfullname); loMonthlyProjectionsRpt.SetParameterValue("Title", "Monthly Projections"); loMonthlyProjectionsRpt.SetParameterValue("SubTitle", "Monthly Projections"); loMonthlyProjectionsRpt.SetParameterValue("BranchName", cboBranch.Text); crvMonthlyProjections.ReportSource = loMonthlyProjectionsRpt; } catch (Exception ex) { throw ex; } } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnPreview_Click"); em.ShowDialog(); return; } }
public DataTable getMonthlyProjectionByBranch(string pBranchId) { return(loLoanApplication.getMonthlyProjectionByBranch(pBranchId)); }