Exemplo n.º 1
0
        private void refresh()
        {
            listView1.Items.Clear();
            var res = SQLRec.GetPatientsList(textBox1.Text, textBox2.Text, textBox3.Text);

            foreach (var order in res)
            {
                ListViewItem lvi = new ListViewItem(order.Name.ToString());
                lvi.SubItems.Add(order.Surname);
                lvi.SubItems.Add(order.PESEL);
                listView1.Items.Add(lvi);
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            listView1.Items.Clear();
            var res = SQLRec.GetPatientsList(textBox1.Text, textBox2.Text, textBox3.Text);

            foreach (var order in res)
            {
                ListViewItem lvi = new ListViewItem(order.Name.ToString());
                lvi.SubItems.Add(order.Surname);
                lvi.SubItems.Add(order.PESEL);
                listView1.Items.Add(lvi);
            }
        }
Exemplo n.º 3
0
        public Reg()
        {
            InitializeComponent();
            listView1.Items.Clear();
            var res = SQLRec.GetPatientsList("", "", "");

            foreach (var order in res)
            {
                ListViewItem lvi = new ListViewItem(order.Name.ToString());
                lvi.SubItems.Add(order.Surname);
                lvi.SubItems.Add(order.PESEL);
                listView1.Items.Add(lvi);
            }
            listView1.FullRowSelect = true;
            listView1.GridLines     = true;
        }
Exemplo n.º 4
0
        private void button4_Click(object sender, EventArgs e)//show
        {
            if (listView1.SelectedItems.Count > 0)
            {
                ListViewItem item = listView1.SelectedItems[0];


                var res = SQLRec.GetPatientsList(item.SubItems[0].Text.TrimEnd(), item.SubItems[1].Text.TrimEnd(), item.SubItems[2].Text.TrimEnd());
                foreach (var x in res)
                {
                    WindowPanel.Controls.Add(new VisitViewercs(x.Id_Patient, connector));
                    WindowPanel.Visible = true;
                    WindowPanel.Dock    = DockStyle.Fill;
                    WindowPanel.BringToFront();
                }
            }
        }
Exemplo n.º 5
0
        private void button3_Click(object sender, EventArgs e)//visit registarion
        {
            if (listView1.SelectedItems.Count > 0)
            {
                ListViewItem item = listView1.SelectedItems[0];


                var res = SQLRec.GetPatientsList(item.SubItems[0].Text.TrimEnd(), item.SubItems[1].Text.TrimEnd(), item.SubItems[2].Text.TrimEnd());
                foreach (var x in res)
                {
                    WindowPanel.Controls.Add(new VisitRegistration(x.Id_Patient, connector, whoami));
                    WindowPanel.Visible = true;
                    WindowPanel.Dock    = DockStyle.Fill;
                    WindowPanel.BringToFront();
                }
            }
            else
            {
                MessageBox.Show("Nie wybrano pacjenta");
            }
        }