예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DrugsEntity          selectedDrug = (DrugsEntity)comboBox1.SelectedItem;
            WarehouseItemsEntity entity       = new WarehouseItemsEntity
            {
                Quantity = Convert.ToInt32(textBox1.Text),
                DrugID   = selectedDrug.ID
            };

            ApplicationLogic.Insert(ApplicationLogic.Tables.Warehouse, entity);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            WarehouseItemsEntity selectedItem = (WarehouseItemsEntity)comboBox1.SelectedItem;

            ApplicationLogic.Delete(ApplicationLogic.Tables.Warehouse, selectedItem.ID);
        }