private void updateUserForm_Load(object sender, EventArgs e) { List <string> li = new List <string>(); li = dbo.multi_select("SELECT `username`, `password`, `name`, `type` from user where user_id=" + uid); usernameTB.Text = li[0]; usernameL.Text = li[0]; passwordL.Text = li[1]; nameL.Text = li[2]; typeL.Text = li[3]; }
private void remarkDGV_CellContentClick(object sender, DataGridViewCellEventArgs e) { int row = e.RowIndex; int column = 0; if (row > -1) { string rid = remarkDGV[column, row].Value.ToString(); string query = "SELECT `remark_id` , `remarks` , `author` , `hall_std_id` , `date_time` FROM `remark` WHERE `remark_id` =" + rid; List <string> r = new List <string>(); r = db.multi_select(query); remarkIDL.Text = r[0]; remarkTB.Text = r[1]; authorTB.Text = r[2]; hall_std_IDL.Text = r[3]; } }
private void userNameCB_SelectedIndexChanged(object sender, EventArgs e) { infoString = db.multi_select("SELECT `user_id`, `username`, `name`, `type` FROM `user` WHERE `username`= '" + userNameCB.SelectedItem + "'"); infoTB.Text = "User ID: " + infoString[0] + "\nUsername: "******"\n Name: " + infoString[2] + "\n Type: " + infoString[3]; }