public void TestDeleteMedication()
        {
            var medication =
                AdministratorController.AddOrUpdateMedication(0, "medication", "manufacturer", "a,b,c", 10, 10);

            AdministratorController.DeleteMedication(medication.Id);

            Assert.Throws <InvalidOperationException>(() => AdministratorController.GetMedication(medication.Id));
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (lastMedicationId != -1)
            {
                AdministratorController.DeleteMedication(Convert.ToInt32(textBox4.Text));
                lastMedicationId = -1;

                RefreshTab1List();
                RefreshTab1Fields();
            }
        }