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;
        }
Ejemplo n.º 2
0
        private void frmTransfer_Load(object sender, EventArgs e)
        {
            Dictionary <string, string> dict = new Dictionary <string, string>()
            {
                { "Selecione uma Conta", null }
            };

            foreach (var bank in ctrAccount.List().ToList())
            {
                dict.Add(ctrDash.GenerateCaptionHolder(bank.Holder) + " - " + bank.Bank, bank.Id.ToString());
            }

            cbBankSender.DataSource     = new BindingSource(dict, null);
            cbBankSender.DisplayMember  = "Key";
            cbBankSender.ValueMember    = "Value";
            cbDestination.DataSource    = new BindingSource(dict, null);
            cbDestination.DisplayMember = "Key";
            cbDestination.ValueMember   = "Value";
        }