Ejemplo n.º 1
0
        public DepositCrystalReportUI(string month)
        {
            InitializeComponent();


            DepositManager aDepositManager = new DepositManager();
            HelperClass    helper          = new HelperClass();


            List <MemberWithDeposit> depositList = aDepositManager.GetMemberWithDepositList(month);

            DepositCrystalReport depositCrystalReport = new DepositCrystalReport();

            depositCrystalReport.SetDataSource(depositList);
            //depositCrystalReport.SetParameterValue("Month", helper.CurrentMonthAsString());
            //shopingCrystalReportViewer.ReportSource = shopingCrystalReport;
            depositCrystalReportViewer.ReportSource = depositCrystalReport;
        }
Ejemplo n.º 2
0
        private void GeMemberWithDepositList()
        {
            int    subtotal = 0;
            string date     = DateTime.Now.Month.ToString();

            depositListView.Items.Clear();
            List <MemberWithDeposit> memberWithDepositList = aDepositManager.GetMemberWithDepositList(date);

            foreach (var member in memberWithDepositList)
            {
                subtotal = subtotal + member.Amount;
                ListViewItem item = new ListViewItem();

                item.Text = member.MemberName;
                item.SubItems.Add(member.Date.ToString());
                item.SubItems.Add(member.Amount.ToString());
                item.SubItems.Add(subtotal.ToString());
                item.Tag = member;
                depositListView.Items.Add(item);
            }
        }