Esempio n. 1
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            //int.Parse(cmbMedicine.SelectedValue.ToString().Substring(0, 4).Trim());

            int id = int.Parse(cmbMedicine.SelectedValue.ToString().Substring(0, 2).Trim());

            pharmacy.DeleteMedicines(id);
            cmbMedicine.DataSource = null;
            cmbMedicine.DataSource = pharmacy.GetMedicines();

            dgv.DataSource = null;
            dgv.DataSource = pharmacy.GetMedicines();
        }