예제 #1
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            string         dbcredstr = File.ReadAllText(Queries.user_setup_conf_file);
            UserCredential cred      = JsonConvert.DeserializeObject <UserCredential>(dbcredstr);

            if (txtuser.Text == cred.username && txtpass.Text == cred.password)
            {
                MessageBox.Show("success");
                Utils.hideAndShow(this, new Admin());
            }
            else
            {
                MessageBox.Show("wrong credentials try again");
                attempts++;
            }
            if (attempts == 3)
            {
                MessageBox.Show("you attempted 3 wrong logins, app is exiting");
                btnexit.PerformClick();
            }
        }
예제 #2
0
 private void btnsettings_Click(object sender, EventArgs e)
 {
     Utils.hideAndShow(this, new FrequentPattern());
 }
예제 #3
0
 private void btnstatistical_Click(object sender, EventArgs e)
 {
     Utils.hideAndShow(this, new BackupClient());
 }
예제 #4
0
 private void btnreports_Click(object sender, EventArgs e)
 {
     Utils.hideAndShow(this, new Graph());
 }
예제 #5
0
 private void btndiagnosis_Click(object sender, EventArgs e)
 {
     Utils.hideAndShow(this, new PatientDiagnosis());
 }
예제 #6
0
 private void btnPersonal_Information_Click(object sender, EventArgs e)
 {
     Utils.hideAndShow(this, new PatientInformation());
 }