/// <summary>
 /// Create a new Club object.
 /// </summary>
 /// <param name="clubID">Initial value of the ClubID property.</param>
 /// <param name="clubName">Initial value of the ClubName property.</param>
 /// <param name="cityID">Initial value of the CityID property.</param>
 public static Club CreateClub(global::System.Int32 clubID, global::System.String clubName, global::System.Int32 cityID)
 {
     Club club = new Club();
     club.ClubID = clubID;
     club.ClubName = clubName;
     club.CityID = cityID;
     return club;
 }
Example #2
0
        public ActionResult Court(string name,string id)
        {
            var club = new Club();
            if (id != null)
            {
                int clubId = Int32.Parse(id);
                club = repository.GetClub(clubId);

                ViewBag.MapURL = repository.GetClubMapURL(clubId);
                List<Metadata> imageList = repository.GetClubImageURL(clubId);
                for (int i = 0; i < imageList.Count; i++)
                {
                    string viewBagName = "ImageURL" + i.ToString();
                    //string imgPath = "/Images/Club/" + clubId.ToString() + "/" + imageList[i].MetadataValue;
                    ViewData.Add(viewBagName,imageList[i].MetadataValue);
                }
            }
            ViewBag.Title = club.ClubName + ", Badminton Court, " + club.Area + " ," + club.City.CityName;
            ViewBag.MetaDescription = club.ClubName + ", Badminton Court, " + club.Area + " ," + club.City.CityName;
            ViewBag.MetaKeywords = club.ClubName+" , " + "badminton court "+club.Area+" , "+ "badminton court "+club.City.CityName;

            return View(club);
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Clubs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToClubs(Club club)
 {
     base.AddObject("Clubs", club);
 }
Example #4
0
 //public ActionResult DeleteClub(int name)
 //{
 //    repository.DeleteClub(name);
 //    ViewBag.Message = "Club Deleted with ID: " + name + " Successfully"; ;
 //    return View("Message");
 //}
 private ClubViewModel ClubToClubView(Club clubToConvert)
 {
     ClubViewModel viewModel = new ClubViewModel();
     viewModel.Club = clubToConvert;
     viewModel.City = clubToConvert.City.CityName;
     viewModel.State = clubToConvert.City.State.StateName;
     viewModel.Country = clubToConvert.City.State.Country.CountryName;
     return viewModel;
 }