예제 #1
0
        private void PhieuKham_Load(object sender, EventArgs e)
        {
            button7.Hide();
            TrangThaiBanDau();
            Phieukhamctrl pk = new Phieukhamctrl();

            pk.LoadDatagridview(dataGridView1, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
            LoadDataGridViewFormat();
            LoadThongTinBenhNhan();
            LoadBacSi();
        }
예제 #2
0
        private void button6_Click(object sender, EventArgs e)
        {
            string MaBS = "";

            if (comboBox1.Text.Trim() != "")
            {
                MaBS = XemMaBacSi(comboBox1.Text.Trim());
            }
            switch (state)
            {
            case 1:
            {
                Phieukhamctrl pk = new Phieukhamctrl();
                if (textBox1.Text.Trim() == "")
                {
                    MessageBox.Show("Phải có tên bệnh nhân mới thực hiện thêm được!");
                }
                else
                {
                    pk.ThemPhieuKham(dataGridView1, clsThongTinChung.MaBenhNhan, MaBS, checkBox1.Checked.ToString(), checkBox2.Checked.ToString(), checkBox3.Checked.ToString(), checkBox4.Checked.ToString(), checkBox5.Checked.ToString(), checkBox6.Checked.ToString(), checkBox7.Checked.ToString(), checkBox8.Checked.ToString(), checkBox9.Checked.ToString(), checkBox10.Checked.ToString(), checkBox11.Checked.ToString(), checkBox12.Checked.ToString(), checkBox13.Checked.ToString(), DateTime.Now.ToString(), "");
                }

                break;
            }

            case 2:
            {
                Phieukhamctrl pk = new Phieukhamctrl();
                pk.SuaPhieuKham(dataGridView1, this.dataGridView1.CurrentRow.Cells[0].Value.ToString(), clsThongTinChung.MaBenhNhan, MaBS, checkBox1.Checked.ToString(), checkBox2.Checked.ToString(), checkBox3.Checked.ToString(), checkBox4.Checked.ToString(), checkBox5.Checked.ToString(), checkBox6.Checked.ToString(), checkBox7.Checked.ToString(), checkBox8.Checked.ToString(), checkBox9.Checked.ToString(), checkBox10.Checked.ToString(), checkBox11.Checked.ToString(), checkBox12.Checked.ToString(), checkBox13.Checked.ToString(), DateTime.Now.ToString(), "");
                break;
            }

            case 3:
            {
                Phieukhamctrl pk = new Phieukhamctrl();
                pk.XoaPhieuKham(dataGridView1, this.dataGridView1.CurrentRow.Cells[0].Value.ToString(), clsThongTinChung.MaBenhNhan, MaBS, checkBox1.Checked.ToString(), checkBox2.Checked.ToString(), checkBox3.Checked.ToString(), checkBox4.Checked.ToString(), checkBox5.Checked.ToString(), checkBox6.Checked.ToString(), checkBox7.Checked.ToString(), checkBox8.Checked.ToString(), checkBox9.Checked.ToString(), checkBox10.Checked.ToString(), checkBox11.Checked.ToString(), checkBox12.Checked.ToString(), checkBox13.Checked.ToString(), DateTime.Now.ToString(), "");
                break;
            }
            }
            TrangThaiBanDau();
        }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Phieukhamctrl pk = new Phieukhamctrl();

            pk.LoadDatagridview_TimKiem(dataGridView1, textBox3.Text.Trim(), textBox1.Text.Trim(), comboBox1.Text.Trim(), checkBox1.Checked.ToString(), checkBox2.Checked.ToString(), checkBox3.Checked.ToString(), checkBox4.Checked.ToString(), checkBox5.Checked.ToString(), checkBox6.Checked.ToString(), checkBox7.Checked.ToString(), checkBox8.Checked.ToString(), checkBox9.Checked.ToString(), checkBox10.Checked.ToString(), checkBox11.Checked.ToString(), checkBox12.Checked.ToString(), checkBox13.Checked.ToString(), "", "");
        }