Ejemplo n.º 1
0
 private void CamposInterface(Status status)
 {
     if (_FormaPgto == null)
     {
         _FormaPgto = new Dominio.FormaPagamento();
     }
     TxtDescricao.Text = _FormaPgto.Descricao;
     if (status == Status.Inserindo)
     {
         this.EnabledCampos(true);
         LblStatus.Text = "Status : Inserindo";
     }
     else if (status == Status.Editando)
     {
         this.EnabledCampos(true);
         LblStatus.Text = "Status : Editando";
     }
     else if (status == Status.Excluindo)
     {
         this.EnabledCampos(false);
         LblStatus.Text = "Status : Excluindo";
     }
     else
     {
         this.EnabledCampos(false);
         LblStatus.Text = "Status : Consultando";
     }
 }
Ejemplo n.º 2
0
 private void ctrNavigator1_CancelarAcao()
 {
     if (DGFormaPagamento.SelectedRows.Count > 0)
     {
         _FormaPgto = (Dominio.FormaPagamento)DGFormaPagamento.SelectedRows[0].DataBoundItem;
     }
     this.CamposInterface(Status.Consultando);
 }
Ejemplo n.º 3
0
 private void DGFormaPagamento_SelectionChanged(object sender, EventArgs e)
 {
     if (this.DGFormaPagamento.Rows.Count > 0)
     {
         if (DGFormaPagamento.SelectedRows.Count > 0)
         {
             _FormaPgto = (Dominio.FormaPagamento)DGFormaPagamento.SelectedRows[0].DataBoundItem;
             if (ctrNavigator1.DataSource != null)
             {
                 ctrNavigator1.Indice = DGFormaPagamento.SelectedRows[0].Index;
             }
         }
     }
     this.CamposInterface(Status.Consultando);
 }
Ejemplo n.º 4
0
 private void ctrNavigator1_EventoNovo()
 {
     _FormaPgto = null;
     _FormaPgto = new Dominio.FormaPagamento();
     this.CamposInterface(Status.Inserindo);
 }