private void BtnCreate_Click(object sender, EventArgs e) { string name = txtMedicine.Text.Trim(); string price = txtPrice.Text.Trim(); if (name == "" || price == "") { MessageBox.Show("Cells is empty !", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Medicine medicine = new Medicine() { Name = name, Price = price + " Azn" }; _pharmacy.AddMedicines(medicine); RefreshData(); }