private void btnUpdate_Click(object sender, EventArgs e)
        {
            var re = new DoctorDashRepo();
            var en = new DoctorDashEntity();

            if (ValidateToSave() == true)
            {
                en.Id        = txtId.Text;
                en.Name      = txtName.Text;
                en.Age       = txtAge.Text;
                en.Sex       = txtSex.Text;
                en.Reference = txtReference.Text;
                en.Address   = txtAddress.Text;
                en.Phone     = txtPhone.Text;
                en.Username  = txtUsername.Text;
                en.Password  = txtPassword.Text;
                en.Time      = dtpTime.Value.ToString("hh:mm tt");
                //en.Availability = this.Available();

                if (ckbThr.Checked == false && ckbWed.Checked == false && ckbTue.Checked == false && ckbMon.Checked == false && ckbSun.Checked == false && ckbSat.Checked == false && ckbFri.Checked == false)
                {
                    en.Availability = txtAvailable.Text;
                }
                else
                {
                    en.Availability = this.Available();
                }

                if (MessageBox.Show("Are you sure?", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    return;
                }
                else
                {
                    re.Update(en);
                }
                //re.Credentials(DoctorName);
                lblUser.Text = en.Username;
                DoctorName   = en.Username;
            }
            else
            {
                MessageBox.Show("Invalid Input");
            }
        }
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            var re = new DoctorDashRepo();
            var en = re.Credentials(DoctorName);

            txtId.Text         = en.Id;
            txtName.Text       = en.Name;
            txtAge.Text        = en.Age;
            txtSex.Text        = en.Sex;
            txtReference.Text  = en.Reference;
            txtAddress.Text    = en.Address;
            txtPhone.Text      = en.Phone;
            txtSpeciality.Text = en.Speciality;
            txtUsername.Text   = en.Username;
            txtPassword.Text   = en.Password;
            txtAvailable.Text  = en.Availability;
            dtpTime.Text       = en.Time;
        }