public string saveMedicine(Medicine aMedicine)
        {
            if (aGateway.IsMedicineNameExists(aMedicine))
            {
                return "Medicine Name is Already Exists";
            }
            else if(aGateway.saveMedicine(aMedicine) > 0)
            {
                return "Medicine Saved Successfully.";
            }

            else
            {
                return "Medicine not saved.";
            }
        }
        public bool IsMedicineNameExists(Medicine aMedicine)
        {
            SqlConnection connection=new SqlConnection(connectionString);
            string query = "SELECT * FROM tbl_Medicine WHERE MedicineName='" + aMedicine.MedicineName + "'";
            SqlCommand command=new SqlCommand(query,connection);
            bool isMedicineNameExists = false;

            connection.Open();
            SqlDataReader reader = command.ExecuteReader();
            while (reader.Read())
            {
                isMedicineNameExists = true;
            }
            reader.Close();
            connection.Close();

            return isMedicineNameExists;
        }
        public int saveMedicine(Medicine aMedicine)
        {
            SqlConnection connection = new SqlConnection(connectionString);
            string query = "insert into tbl_Medicine values('"+aMedicine.MedicineName+"')";
            SqlCommand command = new SqlCommand(query,connection);
            connection.Open();
            int rowAffected = command.ExecuteNonQuery();
            connection.Close();

            return rowAffected;
        }
        public List<Medicine> LoadAllMedicine()
        {
            SqlConnection connection = new SqlConnection(connectionString);
            string query = "SELECT * FROM tbl_Medicine";
            SqlCommand command = new SqlCommand(query, connection);
            List<Medicine> medicineList=new List<Medicine>();

            connection.Open();
            SqlDataReader reader = command.ExecuteReader();
            int serial = 1;
            while (reader.Read())
            {
                Medicine aMedicine=new Medicine();

                aMedicine.ID = serial;

                aMedicine.MedicineName = reader["MedicineName"].ToString();

                medicineList.Add(aMedicine);
                serial++;
            }
            reader.Close();
            connection.Close();

            return medicineList;
        }