示例#1
0
        private void MnuExtrato_Click(object sender, EventArgs e)
        {
            bool bAllow = gtiCore.GetBinaryAccess((int)TAcesso.ExtratoContribuinte);

            if (bAllow)
            {
                gtiCore.Ocupado(this);
                var formToShow = Application.OpenForms.Cast <Form>().FirstOrDefault(c => c is Forms.Extrato);
                if (formToShow != null)
                {
                    formToShow.Show();
                }
                else
                {
                    Extrato f1 = new Extrato
                    {
                        Tag       = "Menu",
                        MdiParent = this
                    };
                    f1.Show();
                }
                gtiCore.Liberado(this);
            }
            else
            {
                MessageBox.Show("Acesso não permitido.", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
    // Abre tela de extrato de acordo com conta selecionada
    protected void OnBtnExtratoClicked(object sender, EventArgs e)
    {
        if (viewContas.Selection.CountSelectedRows() > 0)
        {
            TreeIter  selectedConta;
            TreeModel model;

            viewContas.Selection.GetSelected(out model, out selectedConta);
            int pos = (int)model.GetValue(selectedConta, 0);

            Extrato ext = new Extrato(contas[pos]);
            ext.Show();
        }
    }