private void btnModificar_Click(object sender, EventArgs e) { oAlmacen = (Modelo_Entidades.Almacen)bsAlmacenes.Current; if (oAlmacen == null) { MessageBox.Show("Primero debe elegir un almacén.", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { frmAlmacen ofrmAlmacen = new frmAlmacen(oAlmacen); ofrmAlmacen.Show(); } }
/* // Declare a new DataGridTableStyle in the // declarations area of your form. DataGridTableStyle ts = new DataGridTableStyle(); private void hideColumn() { // Set the DataGridTableStyle.MappingName property // to the table in the data source to map to. ts.MappingName = this.dgvAlmacenes.DataMember; // Add it to the datagrid's TableStyles collection this.dgvAlmacenes.TableStyles.Add(ts); this.dgvAlmacenes.ce // Hide the first column (index 0) this.dgvAlmacenes.TableStyles[0].GridColumnStyles[0].Width = 0; } */ private void btnAgregar_Click(object sender, EventArgs e) { frmAlmacen ofrmAlmacen = new frmAlmacen(); ofrmAlmacen.Show(); }