Пример #1
0
        public VisitViewercs(int ID, TextBox text) : this()
        {
            listView1.FullRowSelect = true;
            listView1.GridLines     = true;
            patid = ID;
            textb = text;
            var res = SQLLab.GetPatientData(patid);

            foreach (var order in res)
            {
                textBox1.Text = order.PESEL;
            }

            docs = SQLAdm.GetStaff("", "", "", "doc");
            foreach (var order in docs)
            {
                comboBox3.Items.Add(order.Surname);
            }

            listView1.Items.Clear();

            var temp = SQLRec.GetApo(patid);

            foreach (var order in temp)
            {
                ListViewItem lvi  = new ListViewItem(order.Id_Appointment.ToString());
                var          tmp  = SQLRec.GetDocData(order.Id_Doctor);
                string       name = tmp.FirstOrDefault().Name + " " + tmp.FirstOrDefault().Surname;
                lvi.SubItems.Add(name);
                lvi.SubItems.Add(order.Date_Appointment.ToString());
                lvi.SubItems.Add(SQLRec.translateRolePL(order.State.ToString()));

                listView1.Items.Add(lvi);
            }
        }
Пример #2
0
        public Edit(int ID, TextBox text) : this()
        {
            apoid = ID;
            textb = text;

            var a = SQLRec.GetApoSE(apoid);
            //comboBox4.drop

            var res = SQLLab.GetPatientData(a.First().Id_Patient);

            foreach (var order in res)
            {
                textBox1.Text = order.Name;
                textBox2.Text = order.Surname;
                textBox3.Text = order.PESEL;
            }
            docs = SQLAdm.GetStaff("", "", "", "doc");
            foreach (var order in docs)
            {
                comboBox1.Items.Add(order.Surname);
            }

            var doc = SQLAdm.GetStaff(a.First().Id_Doctor);

            comboBox1.Text = doc.First().Name.ToString();                        //lekarz
            monthCalendar1.SetDate(a.First().Date_Appointment);                  //data
            comboBox3.Text = SQLRec.translateRolePL(a.First().State.ToString()); //stan
            //string time = a.First().Date_Appointment.Hour.ToString()+":" + a.First().Date_Appointment.Minute.ToString();
            string time = a.First().Date_Appointment.ToString("HH:mm");

            comboBox2.Text = time;//godzina

            // comboBox4.DropDownStyle = ComboBoxStyle.DropDownList;
            // comboBox2.Text = a.First().Date_Appointment.TimeOfDay.ToString();
        }
Пример #3
0
        private void listupdate(IQueryable <Appointment> temp)
        {
            listView1.Items.Clear();

            foreach (var order in temp)
            {
                ListViewItem lvi  = new ListViewItem(order.Id_Appointment.ToString());
                var          tmp  = SQLRec.GetDocData(order.Id_Doctor);
                string       name = tmp.FirstOrDefault().Name + " " + tmp.FirstOrDefault().Surname;
                lvi.SubItems.Add(name);
                lvi.SubItems.Add(order.Date_Appointment.ToString());
                lvi.SubItems.Add(SQLRec.translateRolePL(order.State.ToString()));

                listView1.Items.Add(lvi);;
            }
        }
Пример #4
0
        public Show(int ID, TextBox text) : this()
        {
            apoid = ID;
            textb = text;

            var a = SQLRec.GetApoSE(apoid);


            var res = SQLLab.GetPatientData(a.First().Id_Patient);

            foreach (var order in res)
            {
                textBox1.Text = order.Name;
                textBox2.Text = order.Surname;
                textBox3.Text = order.PESEL;
            }
            var doc = SQLAdm.GetStaff(a.First().Id_Doctor);

            textBox4.Text = doc.First().Name.ToString();                        //lekarz

            textBox7.Text = a.First().Date_Appointment.ToString();              //data
            textBox6.Text = SQLRec.translateRolePL(a.First().State.ToString()); //stan
            string time = a.First().Date_Appointment.TimeOfDay.ToString();
        }