private void CatdataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = CatdataGridView.Rows[e.RowIndex]; catID = Convert.ToInt32(row.Cells["categoryIDGV"].Value.ToString()); CatnameTxt.Text = row.Cells["CatNameGV"].Value.ToString(); activeCB.SelectedItem = row.Cells["CatStatusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
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(); passTxt.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 SupplierdataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { edit = 1; DataGridViewRow row = SupplierdataGridView.Rows[e.RowIndex]; suppID = Convert.ToInt32(row.Cells["SupplierIDGV"].Value.ToString()); SuppNameTxt.Text = row.Cells["CompanyGV"].Value.ToString(); ContactPersonTxt.Text = row.Cells["ContactPersonGV"].Value.ToString(); Phone1Txt.Text = row.Cells["Phone1GV"].Value.ToString(); Phone2Txt.Text = row.Cells["Phone2GV"].Value.ToString(); AddressTxt.Text = row.Cells["AddressGV"].Value.ToString(); TinTxt.Text = row.Cells["TinGV"].Value.ToString(); StatusDD.SelectedItem = row.Cells["StatusGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void ProductdataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { edit = 1; DataGridViewRow row = ProductdataGridView.Rows[e.RowIndex]; proID = Convert.ToInt32(row.Cells["ProductIDGV"].Value.ToString()); ProductTxt.Text = row.Cells["NameGV"].Value.ToString(); barcodeTxt.Text = row.Cells["BarcodeGV"].Value.ToString(); if (row.Cells["ExpiryGV"].FormattedValue.ToString() == "") { ExpiryPicker.Value = DateTime.Now; } else { ExpiryPicker.Value = Convert.ToDateTime(row.Cells["ExpiryGV"].Value.ToString()); } categoryCB.SelectedValue = row.Cells["CategoryIDGV"].Value.ToString(); MainClass.disable(leftPanel); } }
private void Categories_Load(object sender, EventArgs e) { MainClass.disable(leftPanel); }