static public int FindUser(string userName, string password) { MySqlConnection C = new MySqlConnection(SqlUpdater.conString); C.Open(); MySqlCommand cmd = new MySqlCommand($"SELECT userId FROM user WHERE userName = '******' AND password = '******'", C); MySqlDataReader rdr = cmd.ExecuteReader(); if (rdr.HasRows) { rdr.Read(); SqlUpdater.SetCurrentUserID(Convert.ToInt32(rdr[0])); SqlUpdater.SetCurrentUserName(userName); rdr.Close(); return(SqlUpdater.GetCurrentUserID()); } return(0); }