private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; delStatus = 1; MainClass.DisableControls(leftpanel); DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; catID = Convert.ToInt32(row.Cells["catIDGV"].Value.ToString()); categoryTxt.Text = row.Cells["catGV"].Value.ToString(); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; delStatus = 1; MainClass.DisableControls(leftpanel); DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; floorID = Convert.ToInt16(row.Cells["floorIDGV"].Value.ToString()); floorNumberDD.SelectedItem = row.Cells["floorNumberGV"].Value.ToString(); floorTxt.Text = row.Cells["floorNameGV"].Value.ToString(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; delStatus = 1; MainClass.DisableControls(leftpanel); DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; custID = Convert.ToInt64(row.Cells["custIDGV"].Value.ToString()); nameTxt.Text = row.Cells["NameGV"].Value.ToString(); phoneTxt.Text = row.Cells["phoneGV"].Value.ToString(); addressTxt.Text = row.Cells["addressGV"].Value.ToString(); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; delStatus = 1; MainClass.DisableControls(leftpanel); DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; menuID = Convert.ToInt32(row.Cells["menuIDGV"].Value.ToString()); categoryDD.SelectedValue = row.Cells["catIDGV"].Value.ToString(); itemTxt.Text = row.Cells["MenuItemGV"].Value.ToString(); priceTxt.Text = row.Cells["priceGV"].Value.ToString(); statusDD.SelectedItem = row.Cells["StatusGV"].Value.ToString(); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; delStatus = 1; MainClass.DisableControls(leftpanel); DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; userID = Convert.ToInt16(row.Cells["userIDGV"].Value.ToString()); userTxt.Text = row.Cells["NameGV"].Value.ToString(); usernameTxt.Text = row.Cells["usernameGV"].Value.ToString(); passwordTxt.Text = row.Cells["passGV"].Value.ToString(); phoneTxt.Text = row.Cells["phoneGV"].Value.ToString(); addressTxt.Text = row.Cells["addressGV"].Value.ToString(); rolesDD.SelectedValue = row.Cells["roleIDGV"].Value; } }