コード例 #1
0
        private void btnPreview_Click(object sender, EventArgs e)
        {
            try
            {
                if (!GlobalFunctions.checkRights("tsmMonthlyCollections", "Refresh"))
                {
                    return;
                }

                try
                {
                    loMonthlyCollectionsRpt.SetDataSource(GlobalVariables.DTCompanyLogo);
                    loMonthlyCollectionsRpt.Database.Tables[1].SetDataSource(loLoanEndOfDay.getMonthlyCollections(cboYear.Text, cboBranch.SelectedValue.ToString()));
                    loMonthlyCollectionsRpt.SetParameterValue("CompanyName", GlobalVariables.CompanyName);
                    loMonthlyCollectionsRpt.SetParameterValue("CompanyAddress", GlobalVariables.CompanyAddress);
                    loMonthlyCollectionsRpt.SetParameterValue("CompanyContactNumber", GlobalVariables.ContactNumber);
                    loMonthlyCollectionsRpt.SetParameterValue("Username", GlobalVariables.Userfullname);
                    loMonthlyCollectionsRpt.SetParameterValue("Title", "Monthly Collections");
                    loMonthlyCollectionsRpt.SetParameterValue("SubTitle", "Monthly Collections");
                    loMonthlyCollectionsRpt.SetParameterValue("BranchName", cboBranch.Text);
                    loMonthlyCollectionsRpt.SetParameterValue("Year", cboYear.Text);
                    crvMonthlyCollections.ReportSource = loMonthlyCollectionsRpt;
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnPreview_Click");
                em.ShowDialog();
                return;
            }
        }
コード例 #2
0
 public DataTable getMonthlyCollections(string pYear, string pBranchId)
 {
     return(loLoanEndOfDay.getMonthlyCollections(pYear, pBranchId));
 }