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; } }
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); } }
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); } }