public Ref_ProceduresForm(Ref_Procedures p)
        {
            InitializeComponent();
            this.ref_proc = p;
            bd            = new Registration_patientsEntities2();
            //bd = new Registration_patientsEntities();
            comboBoxProced.DataSource = null;
            bd.Procedures.Load();
            comboBoxProced.DataSource    = bd.Procedures.Local.ToList();
            comboBoxProced.DisplayMember = "Name_proced";
            comboBoxProced.ValueMember   = "Id";

            comboBoxPatient.DataSource = null;
            bd.Card_Patients.Load();
            comboBoxPatient.DataSource    = bd.Card_Patients.Local.ToList();
            comboBoxPatient.DisplayMember = "Surname";
            comboBoxPatient.ValueMember   = "Id";

            comboBoxTherapist.DataSource = null;
            bd.Therapists.Load();
            comboBoxTherapist.DataSource    = bd.Therapists.Local.ToList();
            comboBoxTherapist.DisplayMember = "Surname";
            comboBoxTherapist.ValueMember   = "Id";

            dateTimePickerDate.Value = DateTime.Now.Date;
        }
Esempio n. 2
0
        private void SearchAnalyze()
        {
            if (comboBoxAnalyz.SelectedIndex != -1)
            {
                bd = new Registration_patientsEntities2();
                int id    = Convert.ToInt32(comboBoxAnalyz.SelectedValue);
                var query = (from res_an in bd.Result_Analyzes
                             join ref_an in bd.Ref_Analyzes on res_an.Id_ref_Analyzes equals ref_an.Id
                             join an in bd.Analyzes on ref_an.Id_Analyze equals an.Id
                             join p in bd.Card_Patients on ref_an.Id_Patient equals p.Id
                             join th in bd.Therapists on ref_an.Id_Therapist equals th.Id
                             where ref_an.Id_Analyze == id
                             select new
                {
                    FullName_Patient = p.Surname + " " + p.Name + " " + p.Patronymic,
                    Description_Analyze = res_an.Description,
                    FullName_Doctor = th.Surname + " " + th.Name + " " + th.Patronymic,
                    DateOfTest = res_an.Date_res_analyze
                }).ToList();

                dataGridViewSearch.DataSource = null;
                dataGridViewSearch.Update();
                dataGridViewSearch.DataSource = query;
            }
            else
            {
                MessageBox.Show("Выберите анализ!");
            }
        }
Esempio n. 3
0
 //Registration_patientsEntities bd = null;
 public SearchForm(Card_Patients p, Sick_leaves s, Ref_Analyzes a)
 {
     InitializeComponent();
     this.patient    = p;
     this.sick_leave = s;
     this.analyze    = a;
     bd = new Registration_patientsEntities2();
     comboBoxSurname.DataSource  = null;
     comboBoxAdress.DataSource   = null;
     comboBoxCard_num.DataSource = null;
     comboBoxAnalyz.DataSource   = null;
 }
Esempio n. 4
0
 private void SearchSurname()
 {
     if (comboBoxSurname.SelectedIndex != -1)
     {
         bd = new Registration_patientsEntities2();
         bd.Card_Patients.Load();
         int id    = Convert.ToInt32(comboBoxSurname.SelectedValue);
         var query = bd.Card_Patients.Local.Where(x => x.Id == id).ToList();
         dataGridViewSearch.DataSource = null;
         dataGridViewSearch.DataSource = query;
     }
     else
     {
         MessageBox.Show("Выберите фамилию!");
     }
 }
Esempio n. 5
0
 private void SearchSickData()
 {
     try
     {
         bd = new Registration_patientsEntities2();
         bd.Sick_leaves.Load();
         var query = bd.Sick_leaves.Local.Where(x => x.Opening_date == dateTimePickeSick.Value.Date).ToList();
         dataGridViewSearch.DataSource = null;
         dataGridViewSearch.DataSource = query;
         dataGridViewSearch.Columns["Card_Patients"].Visible = false;
         dataGridViewSearch.Columns["Therapists"].Visible    = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error" + ex.Message);
     }
 }
Esempio n. 6
0
 private void SearchCard_number()
 {
     if (comboBoxCard_num.SelectedIndex != -1)
     {
         bd = new Registration_patientsEntities2();
         bd.Card_Patients.Load();
         int id    = Convert.ToInt32(comboBoxCard_num.SelectedValue);
         var query = bd.Card_Patients.Local.Where(x => x.Id == id).ToList();
         dataGridViewSearch.DataSource = null;
         dataGridViewSearch.DataSource = query;
         dataGridViewSearch.Columns["Therapists"].Visible = false;
     }
     else
     {
         MessageBox.Show("Выберите номер карты пациента!");
     }
 }
 public PatientsForm(Card_Patients p)
 {
     InitializeComponent();
     this.patient = p;
     bd           = new Registration_patientsEntities2();
     //bd = new Registration_patientsEntities();
     textBoxNumCard.Text          = patient.Number_Card.ToString();
     textBoxSurname.Text          = patient.Surname;
     textBoxName.Text             = patient.Name;
     textBoxPatronymic.Text       = patient.Patronymic;
     textBoxPassropt.Text         = patient.Passport;
     textBoxAdress.Text           = patient.Adress;
     textBoxPhone.Text            = patient.Phone_number;
     dateTimePickerBirthday.Value = DateTime.Now.Date;
     comboBoxTherapist.DataSource = null;
     bd.Therapists.Load();
     comboBoxTherapist.DataSource    = bd.Therapists.Local.ToList();
     comboBoxTherapist.DisplayMember = "Surname";
     comboBoxTherapist.ValueMember   = "Id";
 }
        //Registration_patientsEntities bd = null;
        public Sick_LeavesForm(Sick_leaves s)
        {
            InitializeComponent();
            this.sick_leave = s;
            bd = new Registration_patientsEntities2();
            //bd = new Registration_patientsEntities();
            comboBoxPatient.DataSource = null;
            bd.Card_Patients.Load();
            comboBoxPatient.DataSource    = bd.Card_Patients.Local.ToList();
            comboBoxPatient.DisplayMember = "Surname";
            comboBoxPatient.ValueMember   = "Id";

            textBoxPlace.Text   = sick_leave.PlaceOfWork;
            textBoxDiagnos.Text = sick_leave.Diagnosis;
            bd.Therapists.Load();
            comboBoxTherapist.DataSource    = bd.Therapists.Local.ToList();
            comboBoxTherapist.DisplayMember = "Surname";
            comboBoxTherapist.ValueMember   = "Id";

            dateTimePickerOpen.Value = DateTime.Now.Date;
        }
        public Ref_AnalyzesForm(Ref_Analyzes an)
        {
            InitializeComponent();
            this.ref_analyze = an;
            bd = new Registration_patientsEntities2();
            //bd = new Registration_patientsEntities();
            comboBoxPatient.DataSource = null;
            bd.Card_Patients.Load();
            comboBoxPatient.DataSource    = bd.Card_Patients.Local.ToList();
            comboBoxPatient.DisplayMember = "Surname";
            comboBoxPatient.ValueMember   = "Id";

            comboBoxTherapist.DataSource = null;
            bd.Therapists.Load();
            comboBoxTherapist.DataSource    = bd.Therapists.Local.ToList();
            comboBoxTherapist.DisplayMember = "Surname";
            comboBoxTherapist.ValueMember   = "Id";

            comboBoxAnalyz.DataSource = null;
            bd.Analyzes.Load();
            comboBoxAnalyz.DataSource    = bd.Analyzes.Local.ToList();
            comboBoxAnalyz.DisplayMember = "Name_analyze";
            comboBoxAnalyz.ValueMember   = "Id";
        }
Esempio n. 10
0
 public MainForm()
 {
     InitializeComponent();
     //bd = new Registration_patientsEntities();
     bd = new Registration_patientsEntities2();
 }