예제 #1
0
        public addDrug()
        {
            InitializeComponent();
            Win32Utility.SetCueText(name, "输入药品名");
            Win32Utility.SetCueText(specification, "选择规格");
            Win32Utility.SetCueText(unit, "选择记录单位");
            Win32Utility.SetCueText(bid, "输入药品进价");
            Win32Utility.SetCueText(price, "输入药品售价");
            Win32Utility.SetCueText(packing, "选择包装数量");
            Win32Utility.SetCueText(approval, "输入批准文号");
            specification.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            unit.DropDownStyle          = System.Windows.Forms.ComboBoxStyle.DropDownList;
            commDao info = new commDao();
            List <Specification> specificationList = info.loadSpecification();

            for (int i = 0; i < specificationList.Count; i++)
            {
                specification.Items.Add(specificationList[i].getName());
            }
            List <Unit> unitList = info.loadUnit();

            for (int i = 0; i < unitList.Count; i++)
            {
                unit.Items.Add(unitList[i].getName());
            }
            List <String> packingList = info.loadPacking();

            for (int i = 0; i < packingList.Count; i++)
            {
                packing.Items.Add(packingList[i]);
            }
        }
예제 #2
0
        public updateDrug(Commodity commodity, int row)
        {
            InitializeComponent();
            this.row           = row;
            id                 = commodity.getId();
            name.Text          = commodity.getName();
            specification.Text = commodity.getSpecification();
            unit.Text          = commodity.getUnit();
            price.Text         = commodity.getPrice();
            bid.Text           = commodity.getBid();
            packing.Text       = commodity.getPacking();
            approval.Text      = commodity.getApproval();
            commDao info = new commDao();
            List <Specification> specificationList = info.loadSpecification();

            for (int i = 0; i < specificationList.Count; i++)
            {
                specification.Items.Add(specificationList[i].getName());
            }
            List <Unit> unitList = info.loadUnit();

            for (int i = 0; i < unitList.Count; i++)
            {
                unit.Items.Add(unitList[i].getName());
            }
            List <String> packingList = info.loadPacking();

            for (int i = 0; i < packingList.Count; i++)
            {
                packing.Items.Add(packingList[i]);
            }
        }