Exemplo n.º 1
0
        //入学体检套餐
        public void Realize()
        {
            HealthCheckItem hea = new HealthCheckItem();

            hea.Price       = 50;
            hea.Name        = "肝功能";
            hea.Description = "用于检查肝功能";
            item.Add(hea);
            items.Add(hea);
            HealthCheckItem hea1 = new HealthCheckItem();

            hea1.Price       = 5;
            hea1.Name        = "身高";
            hea1.Description = "用于检查身高";
            item.Add(hea1);
            items.Add(hea1);
            HealthCheckItem hea2 = new HealthCheckItem();

            hea2.Price       = 5;
            hea2.Name        = "体重";
            hea2.Description = "用于检查体重";
            item.Add(hea2);
            items.Add(hea2);
            HealthCheckItem hea3 = new HealthCheckItem();

            hea3.Price       = 30;
            hea3.Name        = "B超";
            hea3.Description = "用于检查B超";
            item.Add(hea3);
            items.Add(hea3);
            HealthCheckItem hea111 = new HealthCheckItem();

            hea111.Price       = 50;
            hea111.Name        = "视力";
            hea111.Description = "用于检查视力";
            item.Add(hea111);
            items.Add(hea111);
            HealthCheckItem hea1121 = new HealthCheckItem();

            hea1121.Price       = 50;
            hea1121.Name        = "心电图";
            hea1121.Description = "用于检查心电图";
            item.Add(hea1121);
            items.Add(hea1121);
        }
Exemplo n.º 2
0
        //套餐列表
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string xia = comboBox1.Text;

            if (xia == "请选择")
            {
                this.dataGridView1.DataSource = new BindingList <HealthCheckItem>();
                label5.Text = "";
                label7.Text = "";
                return;
            }
            else
            {
                this.dataGridView1.DataSource = new BindingList <HealthCheckItem>();
            }
            //设置套餐名
            label5.Text = this.comboBox1.Text;
            CalcPrice();
            HealthCheckItem health = new HealthCheckItem();

            this.dataGridView1.DataSource = new BindingList <HealthCheckItem>(item);
        }
Exemplo n.º 3
0
 public void Bick()
 {
     comboBox1.Items.Add("请选择");
     comboBox2.Items.Add("请选择");
     list1 = new HealthCheckItem("身高", "检查身高多少", "5");
     list2 = new HealthCheckItem("体重", "检查体重多少", "5");
     list3 = new HealthCheckItem("视力", "检查视力多少", "10");
     list4 = new HealthCheckItem("听力", "检查听力多少", "5");
     list5 = new HealthCheckItem("肝功能", "检查肝功能多少", "60");
     list6 = new HealthCheckItem("B超", "检查B超多少", "60");
     list7 = new HealthCheckItem("心电图", "检查心电图多少", "50");
     items.Add(list1);
     items.Add(list2);
     items.Add(list3);
     items.Add(list4);
     items.Add(list5);
     items.Add(list6);
     items.Add(list7);
     foreach (HealthCheckItem item in items)
     {
         comboBox1.Items.Add(item.Nameee);
     }
     //学生人学体检
     All.Add(list1);
     All.Add(list2);
     All.Add(list3);
     healthCheckset = new HealthCheckSet("入学检测", All);
     ite.Add(healthCheckset);
     //       CalcPrice();
     comboBox2.Items.Add(healthCheckset.Namee);
     if (comboBox1.Text.Trim() == "请选择")
     {
         dataGridView1.DataSource = new BindingList <HealthCheckItem>();
     }
     //this.bntName1.Enabled = false;
 }