Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ingreso I = new Ingreso();
- I.ID_Producto = ID_Producto;
- I.Producto = cmb_producto.Text;
- I.ID_Productor = ID_Productor;
- I.Productor = cmb_productor.Text;
- I.Fecha_Ingreso = Fecha.Value.Date;
- I.Cantidad = Convert.ToInt16(txt_cantidad_ingresada.Text);
- I.Precio_Unitario = Convert.ToDecimal(txt_precio_unitario.Text);
- I.Descripcion = txt_descripcion.Text;
- Ingresos.Add(I);
- ListadeIngresos = new BindingList<Ingreso>(Ingresos);
- BindingSource source = new BindingSource(ListadeIngresos, null);
- Grid_Ingreso.DataSource = source;
- private void Grid_Ingreso_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
- {
- int index = e.Row.Index;
- Ingresos.RemoveAt(index);
- ListadeIngresos.RemoveAt(index);
- BindingSource source = new BindingSource(ListadeIngresos, null);
- Grid_Ingreso.DataSource = source;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement