private void btnNuevo_Click(object sender, EventArgs e) { FormularioMaterial fMaterial = new FormularioMaterial(); fMaterial._ConductorId = _ConductorId; fMaterial.ShowDialog(); MaterialGridView.Rows.Clear(); RetrieveData(); }
private void MaterialGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { DataGridViewRow selectedRow = MaterialGridView.Rows[e.RowIndex]; Material material = new Material(); material.materialId = Convert.ToInt16(selectedRow.Cells[0].Value); material.conductorId = _ConductorId; material.Descripcion = Convert.ToString(selectedRow.Cells[1].Value); material.fechaDeEntrega = Convert.ToDateTime(selectedRow.Cells[2].Value); material.fechaDeDevolucion = Convert.ToDateTime(selectedRow.Cells[3].Value); FormularioMaterial fMaterial = new FormularioMaterial(); fMaterial._material = material; fMaterial.ShowDialog(); MaterialGridView.Rows.Clear(); RetrieveData(); }