Esempio n. 1
0
        public PastVisits(USERS user, DateTime dt)
        {
            u = new UnitOfWork();
            InitializeComponent();
            var elements = from a1 in u.Visits.GetAll() where a1.VISIT_DATE_TIME1.Date == DateTime.Now.Date && a1.IS_COMPLETED == false && a1.USER_ID == user.USER_ID select a1;

            this.user = user;
            datetime1 = dt;
            foreach (VISIT v in elements)
            {
                ResSet.Items.Add(new PatientTherapistVisit(u.Patients.Get(v.PATIENT_ID.Value), u.Users.Get(v.USER_ID.Value), v));
            }
            this.Title = "Записи на сегодня";

            ResSet.SelectionMode = DataGridSelectionMode.Single;
        }
Esempio n. 2
0
        public PastVisits(PATIENT p, USERS user, DateTime dt)
        {
            u = new UnitOfWork();
            currentPatient = null;
            InitializeComponent();
            datetime1 = dt;
            this.user = user;
            var elements = from a1 in u.Visits.GetAll() where a1.PATIENT_ID == p.PATIENT_ID select a1;

            foreach (VISIT v in elements)
            {
                ResSet.Items.Add(new PatientTherapistVisit(u.Patients.Get(v.PATIENT_ID.Value), u.Users.Get(v.USER_ID.Value), v));
            }

            Choose.Visibility    = System.Windows.Visibility.Hidden;
            this.Title           = "Предыдущие посещения пациента " + p.SURNAME + " " + p.FATHERSNAME;
            ResSet.SelectionMode = DataGridSelectionMode.Single;
        }
 public AdminCreateOrChange(USERS user)
 {
     InitializeComponent();
     u                 = new UnitOfWork();
     this.user         = user;
     isNew             = false;
     PasswordHash.Text = user.PASSWORD_HASH.ToString();
     Surname.Text      = user.SURNAME;
     Name.Text         = user.NAME;
     FathersName.Text  = user.FATHERSNAME;
     Login.Text        = user.LOGIN;
     if (user.CHANGE == "1")
     {
         Change1.IsChecked = true;
     }
     else
     {
         Change2.IsChecked = true;
     }
 }
 private void Ok_Click(object sender, RoutedEventArgs e)
 {
     if (PasswordHash.Text != "" && Login.Text != "" && Surname.Text != "" && Name.Text != "" && FathersName.Text != "" &&
         ValidationText(Surname.Text) && ValidationText(Name.Text) && ValidationText(FathersName.Text))
     {
         if (isNew)
         {
             user = new USERS();
         }
         else
         {
             u.Users.Get(user.USER_ID);
         }
         user.FATHERSNAME   = FathersName.Text;
         user.SURNAME       = Surname.Text;
         user.NAME          = Name.Text;
         user.PASSWORD_HASH = int.Parse(PasswordHash.Text);
         user.LOGIN         = Login.Text;
         if (Change2.IsChecked == true)
         {
             user.CHANGE = "2";
         }
         else
         {
             user.CHANGE = "1";
         }
         if (isNew)
         {
             u.Users.Create(user);
         }
         u.Save();
         Close();
     }
     else
     {
         MessageBox.Show("Заполните все поля корректной информацией");
     }
 }
Esempio n. 5
0
 public NewRecipe(PATIENT pat, USERS user)
 {
     InitializeComponent();
     currentPat = pat;
     this.user  = user;
 }
 public FirstWindowTherapist(USERS user)
 {
     InitializeComponent();
     this.user = user;
 }
 public AdminCreateOrChange()
 {
     InitializeComponent();
     user = null;
     u    = new UnitOfWork();
 }
Esempio n. 8
0
 public PatientTherapistVisit(PATIENT p, USERS user, VISIT v)
 {
     this.p    = p;
     this.user = user;
     this.v    = v;
 }