void btnNuevo_Click(object sender, EventArgs e) { FrmComprasItem f = new FrmComprasItem(); f.Incluir(); if (f.DialogResult == System.Windows.Forms.DialogResult.OK) { Busqueda(); } }
void btnVer_Click(object sender, EventArgs e) { if (this.bs.Current == null) { return; } FrmComprasItem f = new FrmComprasItem(); f.registro = (Compra)this.bs.Current; f.Ver(); }
void btnEditar_Click(object sender, EventArgs e) { if (this.bs.Current == null) { return; } Compra c = (Compra)this.bs.Current; if (c.ActualizadoInventario.GetValueOrDefault(false) == true) { MessageBox.Show("Esta compra ya fue pasada a inventario y no se puede modificar"); return; } FrmComprasItem f = new FrmComprasItem(); f.registro = (Compra)this.bs.Current; f.Modificar(); }