private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; catID = Convert.ToInt32(row.Cells["catIDGV"].Value.ToString()); CategoryTxt.Text = row.Cells["NameGV"].Value.ToString(); activeDD.SelectedItem = row.Cells["statusGV"].Value.ToString(); MainClass.disable(lftPanel); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) //e is referencing to the column index and row index { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; catID = Convert.ToInt32(row.Cells["catIDGV"].Value.ToString()); catTxt.Text = row.Cells["NameGV"].Value.ToString(); activeDD.SelectedItem = row.Cells["StatusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; prodID = Convert.ToInt32(row.Cells["proIDGV"].Value.ToString()); productTxt.Text = row.Cells["proGV"].Value.ToString(); barcodeTxt.Text = row.Cells["barcodeGV"].Value.ToString(); expiryPicker.Value = Convert.ToDateTime(row.Cells["expiryGV"].Value.ToString()); categoryDD.SelectedItem = row.Cells["catGV"].Value.ToString(); MainClass.disable(lftPanel); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; userID = Convert.ToInt32(row.Cells["userIDGV"].Value.ToString()); nameTxt.Text = row.Cells["NameGV"].Value.ToString(); usernametxt.Text = row.Cells["UsernameGV"].Value.ToString(); pwdTxt.Text = row.Cells["PassGV"].Value.ToString(); phoneTxt.Text = row.Cells["PhoneGV"].Value.ToString(); EmailTxt.Text = row.Cells["EmailGV"].Value.ToString(); statusDD.SelectedItem = row.Cells["statusGV"].Value.ToString(); MainClass.disable(lftPanel); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) //This is for the VIEW section { if (e.RowIndex != -1) //e is referencing to the column index and row index { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; userID = Convert.ToInt32(row.Cells["userIDGV"].Value.ToString()); // We get the userID of the selected cell. https://youtu.be/B5td7E7YGeA min 11:10 nameTxt.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(); emailTxt.Text = row.Cells["EmailGV"].Value.ToString(); statusDD.SelectedItem = row.Cells["StatusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) //e is referencing to the column index and row index { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; supplierID = Convert.ToInt32(row.Cells["SuppIDGV"].Value.ToString()); // We get the userID of the selected cell. https://youtu.be/B5td7E7YGeA min 11:10 supplierCompanyTxt.Text = row.Cells["companyGV"].Value.ToString(); personNameTxt.Text = row.Cells["personGV"].Value.ToString(); Phone1Txt.Text = row.Cells["phone1GV"].Value.ToString(); phone2Txt.Text = row.Cells["phone2GV"].Value.ToString(); ntnTxt.Text = row.Cells["ntnGV"].Value.ToString(); addressTxt.Text = row.Cells["addressGV"].Value.ToString(); statusDD.SelectedItem = row.Cells["StatusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void dataGridView1_CellClick_1(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; SupplierID = Convert.ToInt32(row.Cells["suppIDGV"].Value.ToString()); supplierComTxt.Text = row.Cells["companyGV"].Value.ToString(); personNameTxt.Text = row.Cells["personGV"].Value.ToString(); phone1txt.Text = row.Cells["phone1GV"].Value.ToString(); phone2txt.Text = row.Cells["phone2GV"].Value.ToString(); TaxNotxt.Text = row.Cells["ntnGV"].Value.ToString(); addresstxt.Text = row.Cells["addressGV"].Value.ToString(); statusDD.SelectedItem = row.Cells["statusGV"].Value.ToString(); MainClass.disable(lftPanel); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) //e is referencing to the column index and row index { edit = 1; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; prodID = Convert.ToInt32(row.Cells["proIDGV"].Value.ToString()); // We get the userID of the selected cell. https://youtu.be/B5td7E7YGeA min 11:10 proTxt.Text = row.Cells["proGV"].Value.ToString(); priceTxt.Text = row.Cells["priceGV"].Value.ToString(); barcodeTxt.Text = row.Cells["barcodeGV"].Value.ToString(); //When we select a product that has a null expiry date if (row.Cells["expiryGV"].FormattedValue.ToString() == "") // if it is null then we set the current date { expiryPicker.Value = DateTime.Now; } else //if it is not null then we set the date in the picker { expiryPicker.Value = Convert.ToDateTime(row.Cells["expiryGV"].Value.ToString()); } categoryDD.SelectedValue = row.Cells["catIDGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void Supplier_Load(object sender, EventArgs e) { MainClass.disable(leftPanel); //we disable the elements from leftpanel with the method of MainClass }
private void categories_Load(object sender, EventArgs e) { MainClass.disable(leftPanel); }
private void Users_Load(object sender, EventArgs e) { MainClass.disable(leftPanel); //we disable the elements from leftpanel with the method of MainClass //r.showUsers(dataGridView1, UserIDGV, NameGV, UserNameGV, PassGV, EmailGV, PhoneGV, StatusGV); //Load the Grid View }