private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { DataGridViewRow row = dataGridView1.SelectedRows[0]; _inventoryDetailTemp = (InventoryDetailModel)row.DataBoundItem; } else { _inventoryDetailTemp = null; } }
private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { DataGridViewRow row = dataGridView1.SelectedRows[0]; _inventoryDetailTemp = (InventoryDetailModel)row.DataBoundItem; AgregarEditarRegistroInventario detalleInventario = new AgregarEditarRegistroInventario(); detalleInventario.Operation = "EDICION"; detalleInventario.Inventory = new InventorySaveModel { Inventory = _inventoryModelTemp, InventoryDetail = _inventoryDetailTemp }; detalleInventario.Text = "Editar Registro de Inventario"; detalleInventario.Show(this); } }
private void btnEntrada_Click(object sender, EventArgs e) { _inventoryDetailTemp = new InventoryDetailModel(); _inventoryDetailTemp.BarCodeData = textBox2.Text; _inventoryDetailTemp.ConstructDate = DateTime.Now; _inventoryDetailTemp.DueDate = DateTime.Now; _inventoryDetailTemp.EventDate = DateTime.Now; AgregarEditarRegistroInventario detalleInventario = new AgregarEditarRegistroInventario(); detalleInventario.Operation = "ENTRADA"; detalleInventario.Inventory = new InventorySaveModel { Inventory = _inventoryModelTemp, InventoryDetail = _inventoryDetailTemp }; detalleInventario.Text = "Agregar Registro de Inventario"; detalleInventario.Show(this); }