private void displayDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = displayDataGridView.Rows[e.RowIndex]; catId = Convert.ToInt32(row.Cells["catIDGV"].Value.ToString()); categoryTextBox.Text = row.Cells["NameGV"].Value.ToString(); isActiveComboBox.SelectedItem = row.Cells["statusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
public void displayDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = displayDataGridView.Rows[e.RowIndex]; userId = Convert.ToInt32(row.Cells["userIDGV"].Value.ToString()); nameTextBox.Text = row.Cells["NameGV"].Value.ToString(); usernameTextBox.Text = row.Cells["UserNameGV"].Value.ToString(); passwordTextBox.Text = row.Cells["passGV"].Value.ToString(); phoneTextBox.Text = row.Cells["PhoneGV"].Value.ToString(); emailTextBox.Text = row.Cells["EmailGV"].Value.ToString(); statusComboBox.SelectedItem = row.Cells["statusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void displayDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = displayDataGridView.Rows[e.RowIndex]; supplierId = Convert.ToInt32(row.Cells["suppIDGV"].Value.ToString()); supplierTextBox.Text = row.Cells["comGV"].Value.ToString(); personNameTextBox.Text = row.Cells["conPerGV"].Value.ToString(); phone1TextBox.Text = row.Cells["phone1GV"].Value.ToString(); phone2TextBox.Text = row.Cells["phone2GV"].Value.ToString(); nTNTextBox.Text = row.Cells["ntnGV"].Value.ToString(); addressTextBox.Text = row.Cells["addressGV"].Value.ToString(); statusComboBox.SelectedItem = row.Cells["statusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void displayDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; DataGridViewRow row = displayDataGridView.Rows[e.RowIndex]; prodId = Convert.ToInt32(row.Cells["proIDGV"].Value.ToString()); productTextBox.Text = row.Cells["proGV"].Value.ToString(); barcodeTextBox.Text = row.Cells["barcodeGV"].Value.ToString(); if (row.Cells["ExpiryGV"].FormattedValue.ToString() == "") { expiryDateTimePicker.Value = DateTime.Now; } else { expiryDateTimePicker.Value = Convert.ToDateTime(row.Cells["ExpiryGV"].Value.ToString()); } categoryComboBox.SelectedValue = row.Cells["CatIDGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void Categories_Load(object sender, EventArgs e) { MainClass.disable(leftPanel); }