基本信息
源码名称:北大青鸟ACCP 7.0 S2体检套餐管理系统(入门级)
源码大小:0.06M
文件格式:.rar
开发语言:C#
更新时间:2019-03-12
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TiJianManager
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
       
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            NewMethod();
            
           
           
        }

        private void NewMethod()
        {
            this.dataGridView1.AutoGenerateColumns = false;
            if (this.comboBox1.SelectedIndex == 0)
            {
                this.dataGridView1.DataSource = null;
                this.label5.Text = "";
                this.label7.Text = "";
                return;
            }

            this.label5.Text = this.comboBox1.Text;
            List<TaoCanItems> list = TaoCan_Manager.FindItems(this.comboBox1.Text);
            this.dataGridView1.DataSource = new BindingList<TaoCanItems>(list);
            TaoCan tc = new TaoCan();
            foreach (TaoCanItems item in list)
            {
                tc.canPrice = item.itemPrice   tc.canPrice;
            }
            this.label7.Text = tc.canPrice.ToString();
        }

       

        private void button3_Click(object sender, EventArgs e)
        {
            if(this.dataGridView1.RowCount==0)
            {
                MessageBox.Show("没有数据无需删除");
                return;
            }
            MessageBox.Show(TaoCan_Manager.deleteItem(this.comboBox1.Text,this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString()));
          NewMethod();
        }
       
        private void button1_Click(object sender, EventArgs e)
        {
         string result =  TaoCan_Manager.AddTaoCao(this.textBox1.Text);
         if (result == "已存在该套餐")
            {
                MessageBox.Show("已存在该套餐");
                return;
            }
            MessageBox.Show("添加成功");
            this.comboBox1.Items.Add(this.textBox1.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if(this.comboBox1.SelectedIndex==0)
            {
                MessageBox.Show("请选择一个套餐");
                return;
            }
            TaoCanItems ietmes = Items_Manager.AllItem(this.comboBox2.Text);
          MessageBox.Show( TaoCan_Manager.addItem(this.comboBox1.Text, ietmes));
           NewMethod();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.comboBox1.Items.Add("请选择");
            this.comboBox1.SelectedIndex = 0;
           List<string> list = TaoCan_Manager.FindAll();
           foreach (string item in list)
           {
               this.comboBox1.Items.Add(item);
           }

           List<string> itemList = Items_Manager.FindAllItems();
           foreach (string item in itemList)
           {
               this.comboBox2.Items.Add(item);
               this.comboBox2.SelectedIndex = 0;
           }
        }
    }
}