/// <summary> /// Agregar un registro en el Gasto bancario /// </summary> /// <returns></returns> public Boolean NuevoGastoBancario() { try { CAJ005TransferenciasGView GView = new CAJ005TransferenciasGView(); GView.Presenter = this; GView.Item = new GastosBancarios(); GView.Item.GBAN_Estado = "I"; if (Item.ListGastosBancarios.Count > 0) { GView.Item.GBAN_Codigo = Item.ListGastosBancarios.Max(GBan => GBan.GBAN_Codigo) + 1; } else { GView.Item.GBAN_Codigo = 1; } GView.Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; GView.LoadView(); GView.StartPosition = FormStartPosition.CenterScreen; if (GView.ShowDialog() == DialogResult.OK) { Item.ListGastosBancarios.Add(GView.Item); return(true); } return(false); } catch (Exception) { throw; } }
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; } }