void DoLogin() { var data = SqlService.GetDataTable("select * from Users where userid ='" + Utilities.ReplaceQuot(TextBoxUserId.Text) + "' and status =1 and password='******'"); if (data.Rows.Count > 0) { MYAPPCS.Properties.Settings.Default.id_user = data.Rows[0][0].ToString(); MYAPPCS.Properties.Settings.Default.userid = data.Rows[0][1].ToString(); MYAPPCS.Properties.Settings.Default.nama = data.Rows[0][2].ToString(); LogApp.Login(); this.Hide(); var formMain = new FormMain(); formMain.Show(); formMain.formLogin = this; } else { MessageBox.Show("Password Atau UserId Salah Atau Account Not Active"); } if (CheckBoxRemember.Checked) { MYAPPCS.Properties.Settings.Default.userid_remember = TextBoxUserId.Text; MYAPPCS.Properties.Settings.Default.passsword_remember = TextBoxPassword.Text; } MYAPPCS.Properties.Settings.Default.Save(); }