Ejemplo n.º 1
0
        private void FrmReport_Load(object sender, EventArgs e)
        {
            lbHolder.Text = "Titular: ";
            if (this.Payment is null)
            {
                ctrDash.LoadReport(date);
                report            = ctrDash.report;
                pnPayment.Visible = false;
                lbHolder.Visible  = false;
                lbName.Visible    = false;
            }
            else
            {
                pnReport.Visible  = false;
                pnPayment.Visible = true;
                if (this.Payment is Account)
                {
                    lbPayment.Text       = $"{ctrDash.GenerateCaptionHolder(Payment.Holder)} - {((Account)Payment).Bank}";
                    lbName.Text         += Payment.Holder;
                    lbName.Visible       = true;
                    lbHolder.Visible     = true;
                    btnPayFatura.Visible = false;
                    report = ctrReport.GenerateByAccount(date, ((Account)this.Payment));
                }
                else
                {
                    lbPayment.Text         = $"{ctrDash.GenerateCaptionHolder(Payment.Holder)} - {((CreditCard)Payment).Issuer}";
                    lbName.Text           += Payment.Holder;
                    lbName.Visible         = true;
                    lbHolder.Visible       = true;
                    lbCaptionRevenue2.Text = "Limite";
                    report = ctrReport.GenerateByCreditCard(date, ((CreditCard)this.Payment));
                }

                ctrDash.report = report;
            }

            LoadFilds(date, report);
            editDate = true;
        }