Esempio n. 1
0
 /// <summary>
 /// New doctor handler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button_tabDoctors_new_Click(object sender, EventArgs e)
 {
     if (AddClick(tabElement_tabDoctors))
     {
         ((doctors)doctorsBindingSource.Current).doctors_username  = Randomizer.BuildRandomNumberString(8).ToLower();
         ((doctors)doctorsBindingSource.Current).doctors_password  = Randomizer.BuildRandomNumber(6);
         ((doctors)doctorsBindingSource.Current).doctors_token     = null;
         ((doctors)doctorsBindingSource.Current).doctors_lastlogin = null;
         doctorsBindingSource.ResetBindings(true);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Reset username and password
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_tabDoctors_resetusernamepassword_Click(object sender, EventArgs e)
        {
            ((doctors)doctorsBindingSource.Current).doctors_username  = Randomizer.BuildRandomNumberString(8).ToLower();
            ((doctors)doctorsBindingSource.Current).doctors_password  = Randomizer.BuildRandomNumber(6);
            ((doctors)doctorsBindingSource.Current).doctors_token     = null;
            ((doctors)doctorsBindingSource.Current).doctors_lastlogin = null;
            doctorsBindingSource.ResetBindings(true);

            doctors_lastloginDateTimePicker.Visible = false;
            doctors_lastloginLabel.Visible          = false;
        }
Esempio n. 3
0
 public void Randomizer_BuildRandomNumberString()
 {
     Assert.That(Randomizer.BuildRandomNumberString(5).Length, Is.EqualTo(5));
 }