public ReseptionEditClient(ReseptionMain F, long Id)
        {
            InitializeComponent();
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            //this.WindowState = FormWindowState.Maximized;
            back    = F;
            this.Id = Id;

            model = client.Get_Item("Id", Id.ToString(), Kpo.BL.Filter.ConditionType.Equal);

            NameText.Text          = model.Name;
            SurnameText.Text       = model.Surname;
            PatronymicText.Text    = model.Patronymic;
            DayText.Text           = model.Date.Day.ToString();
            MounthText.Text        = model.Date.Month.ToString();
            YearText.Text          = model.Date.Year.ToString();
            PasportSeriesText.Text = model.Pasport.ToString().Substring(0, 4);
            PasportNumberText.Text = model.Pasport.ToString().Substring(3, 6);
            AdressText.Text        = model.Adress;
            InshuranceText.Text    = model.Insurance.ToString();
            if (model.Gender == 0)
            {
                Male.Checked = true;
            }
            if (model.Gender == 1)
            {
                Female.Checked = true;
            }
        }
 public ReseptionAddPatient(ReseptionMain F)
 {
     InitializeComponent();
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     //this.WindowState = FormWindowState.Maximized;
     Male.Checked = true;
     back         = F;
 }
        public ReseptionClientInfo(ReseptionMain F, long Id)
        {
            InitializeComponent();
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            back    = F;
            this.Id = Id;
            FilterCondition filter = new FilterCondition("Client_Id", Id, ConditionType.Equal);
            //MessageBox.Show(Id.ToString());
            List <FilterCondition> filt = new List <FilterCondition>();

            filt.Add(filter);
            List <HistoryModel> collection = history.List(filt);

            /*foreach (HistoryModel H in collection)
             * {
             *  //MessageBox.Show(H.ToString());
             * }*/

            foreach (HistoryModel H in collection)
            {
                listBox1.Items.Add(
                    "Диагноз:  "
                    + H.Diagnosis
                    + "\t Запись от "
                    + date.Get_Item("Id", H.Date_Id.ToString(), ConditionType.Equal).Day.Year + "."
                    + date.Get_Item("Id", H.Date_Id.ToString(), ConditionType.Equal).Day.Month + "."
                    + date.Get_Item("Id", H.Date_Id.ToString(), ConditionType.Equal).Day.Day
                    + ".   Врач "
                    + user.Get_Item("Id", H.Personal_Id.ToString(), ConditionType.Equal).Name
                    + " "
                    + user.Get_Item("Id", H.Personal_Id.ToString(), ConditionType.Equal).Surname
                    );

                listBox1.Items.Add("Симптомы: " + H.Symptoms);
            }
            List <AnalyseModel> ancollection = analyse.List(filt);

            foreach (AnalyseModel H in ancollection)
            {
                listBox2.Items.Add(
                    date.Get_Item("Id", H.Date_Id.ToString(), ConditionType.Equal).Day.Year + "."
                    + date.Get_Item("Id", H.Date_Id.ToString(), ConditionType.Equal).Day.Month + "."
                    + date.Get_Item("Id", H.Date_Id.ToString(), ConditionType.Equal).Day.Day
                    + "\tАнализ: "
                    + analysetype.Get_Item("Id", H.Type_Id.ToString(), ConditionType.Equal).Name
                    + "\t Значение: "
                    + H.Result
                    + "\t Комментарий: "
                    + H.Coment
                    );
            }
        }
Beispiel #4
0
        public ReseptionNewProc(ReseptionMain F, long id)
        {
            InitializeComponent();
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            //this.WindowState = FormWindowState.Maximized;
            back    = F;
            this.Id = id;
            List <JobModel> jobcollection = job.List();

            foreach (JobModel j in jobcollection)
            {
                if ((j.Id != 1) && (j.Id != 4) && (j.Id != 5))
                {
                    JobBox.Items.Add(j.Name);
                }
            }
        }
Beispiel #5
0
        private void LogIn_Click(object sender, EventArgs e)
        {
            User user = new User();

            if (LogInField.Text == "")
            {
                MessageBox.Show("Доступ запрещён!");
                PasswordField.Clear();
            }
            else
            if (user.Get_Item("Login", LogInField.Text, ConditionType.Equal) == null)
            {
                MessageBox.Show("Несуществующий логин");
                LogInField.Clear();
                PasswordField.Clear();
            }
            else
            if ((user.Get_Item("Login", LogInField.Text, ConditionType.Equal).Password == PasswordField.Text) && (user.Get_Item("Login", LogInField.Text, ConditionType.Equal) != null))
            {
                switch (user.Get_Item("Login", LogInField.Text, ConditionType.Equal).Permition_Level)
                {
                case 0:
                {
                    ReseptionMain F = new ReseptionMain(this);
                    F.Show();
                    this.Visible = false;
                    break;
                }

                case 1:
                {
                    DoctorMain F = new DoctorMain(this, user.Get_Item("Login", LogInField.Text, ConditionType.Equal).Id);
                    F.Show();
                    this.Visible = false;
                    break;
                }

                case 2:
                {
                    MedpersonalMain F = new MedpersonalMain(this);
                    F.Show();
                    this.Visible = false;
                    break;
                }

                case 3:
                {
                    AdminMainForm F = new AdminMainForm(this);
                    F.Show();
                    this.Visible = false;
                    break;
                }

                case 6:
                {
                    MessageBox.Show("Совпадений не найдено");
                    break;
                }
                }
                LogInField.Clear();
                PasswordField.Clear();
            }
            else
            if ((user.Get_Item("Login", LogInField.Text, ConditionType.Equal).Password != PasswordField.Text))
            {
                MessageBox.Show("Неправильный пароль");
                PasswordField.Clear();
            }
        }