private void PatientChoiceExecute()
        {
            try
            {
                using (Service1Client wcf = new Service1Client())
                {
                    if (wcf.LoginUserPatient(UserName, loginRegistrationPatients.txtPass.Password))
                    {
                        int currentPatientID = wcf.currentPatientID(UserName, loginRegistrationPatients.txtPass.Password);

                        List <vwPatients> patientDetail = wcf.GetPatientsDetail(currentPatientID).ToList();
                        string            nameOfPatient = null;

                        foreach (vwPatients item in patientDetail)
                        {
                            nameOfPatient = item.NameAndSurname;
                        }

                        MessageBox.Show("Welcome " + nameOfPatient + ", you are successfully loged in!");

                        loginCurrent.PatientID = currentPatientID;
                        wcf.AddLoginCurrent(LoginCurrent);

                        PatientChoice view = new PatientChoice();
                        view.ShowDialog();
                        loginRegistrationPatients.Close();
                    }
                    else
                    {
                        MessageBox.Show("You did not enter valid data\nor need to register first!");
                        loginRegistrationPatients.txtName.Text     = "";
                        loginRegistrationPatients.txtPass.Password = "";
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
 public PatientChoiceViewModel(PatientChoice patientChoiceOpen)
 {
     patientChoice = patientChoiceOpen;
 }