public frmRegister() { impUser = new ImpUser(); login = new EntUser(); koneksi = KoneksiDB.Koneksi.getKoneksi(); InitializeComponent(); }
public Boolean Login(EntUser eu) { koneksi.Open(); query = "SELECT username,password FROM user WHERE username = '******' AND password = '******'"; MySqlCommand command = koneksi.CreateCommand(); command.CommandText = query; MySqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { if ((reader.GetString(0).ToString() == eu.getUsername()) && (reader.GetString(1).ToString() == eu.getPassword())) { status = true; } else { status = false; } } koneksi.Close(); return(status); }
public frmUser() { koneksi = KoneksiDB.Koneksi.getKoneksi(); impUser = new ImpUser(); entUser = new EntUser(); InitializeComponent(); txtUsername.Focus(); }
public Boolean updateUser(EntUser eu, int id_user) { status = false; try { koneksi.Open(); query = "UPDATE user SET username ='******', password ='******' WHERE id_users=" + id_user + ""; MySqlCommand command = koneksi.CreateCommand(); command.CommandText = query; command.ExecuteNonQuery(); status = true; koneksi.Close(); } catch (MySqlException me) { Console.WriteLine(me); } return(status); }
public Boolean insertUser(EntUser eu) { status = false; try { koneksi.Open(); query = "INSERT INTO user (username,password) VALUES ('" + eu.getUsername() + "' , '" + eu.getPassword() + "')"; MySqlCommand command = koneksi.CreateCommand(); command.CommandText = query; command.ExecuteNonQuery(); status = true; koneksi.Close(); } catch (MySqlException me) { Console.WriteLine(me); } return(status); }
public void updatePassword(EntUser entUser) { obj_userDAL.updatePassword_user(entUser); }
public void updateNote(EntUser entUser) { obj_userDAL.updateNote_user(entUser); }
public void updateAccessAndName(EntUser entUser) { obj_userDAL.updateAccess_name_user(entUser); }
public void insert(EntUser entUser) { entUser.user_access = strAccess(); obj_userDAL.insert_user(entUser); }
public void updatePassword_user(EntUser entUser) { userTA.spUpdateUser(entUser.user_nameID, entUser.user_passID); }
public void updateNote_user( EntUser entUser) { userTA.spUpdateNoteUser(entUser.user_nameID, entUser.user_note); }
public void updateAccess_name_user(EntUser entUser) { userTA.spUpdateUserAccessUser(entUser.user_nameID, entUser.user_access, entUser.user_name); }
public void insert_user(EntUser entUser) { userTA.spInsertUser(entUser.user_nameID, entUser.user_passID, entUser.user_name, entUser.user_access, entUser.user_note); }