Exemple #1
0
 public Boolean EditarGastoBancarios(ref Entities.GastosBancarios x_GastoBancario)
 {
     try
     {
         CAJ005TransferenciasGView GView = new CAJ005TransferenciasGView();
         GView.Presenter = this;
         GView.Item      = x_GastoBancario;
         GView.LoadView();
         GView.StartPosition = FormStartPosition.CenterScreen;
         if (GView.ShowDialog() == DialogResult.OK)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception)
     { throw; }
 }
Exemple #2
0
 private void EditarGastosBancarios()
 {
     try
     {
         if (BSItemsGastosBancarios.Current != null)
         {
             Entities.GastosBancarios _gbancario = (BSItemsGastosBancarios.Current as Entities.GastosBancarios);
             if (Presenter.EditarGastoBancarios(ref _gbancario))
             {
                 BSItemsGastosBancarios.ResetBindings(false);
                 grdItemsGastosBancarios.BestFitColumns();
                 navItemsGastosBancarios.BindingSource = BSItemsGastosBancarios;
                 CalcularDiferencias();
             }
         }
     }
     catch (Exception ex)
     { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error editando un gasto bancario.", ex); }
 }
Exemple #3
0
 public Boolean EliminarGastosBancarios(Entities.GastosBancarios _gastosBancarios)
 {
     try
     {
         if (
             Infrastructure.WinForms.Controls.Dialogos.MostrarMensajePregunta(Title,
                                                                              "¿Desea eliminar el registro seleccionado?", Infrastructure.WinForms.Controls.Dialogos.LabelBoton.Si_No) ==
             System.Windows.Forms.DialogResult.Yes)
         {
             if (_gastosBancarios.Instance != InstanceEntity.Added)
             {
                 Item.ListGastosBancariosEliminados.Add(_gastosBancarios);
             }
             Item.ListGastosBancarios.Remove(_gastosBancarios);
             return(true);
         }
         return(false);
     }
     catch (Exception)
     { return(false); }
 }