Example #1
0
        protected override void LerObjetoTela()
        {
            base.LerObjetoTela();
            obj = (Pastoral)dtgDados.SelectedRows[0].DataBoundItem;

            edtCodigo.Text = obj.PstCodigo.ToString();
            edtDescricao.Text = obj.PstDescricao;

            edtCodigo.Focus();
        }
Example #2
0
        private int Incluir()
        {
            try
            {
                Pastoral pastoral = new Pastoral();
                pastoral.PstCodigo = int.Parse(ctrl.LastID());
                pastoral.PstDescricao = "Pastoral incluída";

                return ctrl.Incluir(pastoral);
            }
            catch
            {
                Assert.Fail("Falha ao cadastrar a pastoral");
                return -1;
            }
        }
Example #3
0
 private void AntesCadastrar(object sender)
 {
     Pastoral obj = new Pastoral();
     obj.PstCodigo = int.Parse(ctrl.LastID());
     vm.Objeto = obj;
 }
Example #4
0
 protected override void AntesAdicionar()
 {
     base.AntesAdicionar();
     obj = new Pastoral();
 }
Example #5
0
        private static int IncluirPastoral()
        {
            Pastoral obj = new Pastoral();
            obj.PstCodigo = int.Parse(ctrlPastoral.LastID());
            obj.PstDescricao = "Pastoral incluída";

            return ctrlPastoral.Incluir(obj);
        }
Example #6
0
 public Escala()
 {
     pastoral = new Pastoral();
     funcoes = new ListaFuncao(this);
 }
Example #7
0
 public PastoralVM()
 {
     obj = new Pastoral();
 }