Beispiel #1
0
 public static int AlteraConta(Conta conta)
 {
     int ret = 0;
     FrmNovaConta frm = new FrmNovaConta();
     frm.Conta = conta;
     DialogResult res = frm.ShowDialog();
     if (res == DialogResult.OK)
     {
         ret = frm.Conta.Update();
     }
     return ret;
 }
Beispiel #2
0
        public static int CriaNovaConta(Conta prmConta = null)
        {
            int ret = 0;
            FrmNovaConta frm = new FrmNovaConta();
            frm.Conta = prmConta;
            DialogResult res = frm.ShowDialog();
            if (res == DialogResult.OK)
            {
                prmConta = frm.Conta;
                prmConta.IDCarteira = Program.MainCarteira.ID;

                ret = prmConta.Insert();
            }
            return ret;
        }