Ejemplo n.º 1
0
        public ActionResult Detail(int match_id)
        {
            var match_dao = new match_dao();
            var model     = match_dao.Get_By_Id(match_id);

            ViewBag.ListGoal    = new match_goal_dao().ListGoal_ByMatchID(match_id);
            ViewBag.TopViewPost = new content_dao().ListTopViewContent_By_Category(0, 3);
            ViewBag.MatchName   = match_dao.GetMatchName_ByMatchID(match_id);

            //advertisement
            var ad_dao = new ads_dao();

            ViewBag.Advertisement_300x250 = ad_dao.GetAdvertisement_By_Type("300x250");

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Create(int match_id = 0)
        {
            //Check Match in Season
            //Default value = 0 if not exits
            var match_dao    = new match_dao();
            var result_macth = match_dao.CheckMatch(match_id);

            match_id = result_macth == true ? match_id : 0;

            ViewBag.MatchName      = match_dao.GetMatchName_ByMatchID(match_id);
            ViewBag.CurrentMatchID = match_id;

            //Setting list for dropdownlist
            SetListGoalType();
            SetListFootballer(match_id);
            return(View());
        }
Ejemplo n.º 3
0
        public ActionResult Edit(int id)
        {
            var result_macth = false;

            var model = new match_goal_dao().Get_By_Id(id);

            //Check Match in Season
            //Default value = 0 if not exits
            var match_dao = new match_dao();

            if (model != null)
            {
                result_macth = match_dao.CheckMatch(model.match_id);
                SetListGoalType(model.goal_type_id);
                SetListFootballer(model.match_id, model.footballer_id);
            }
            var match_id = result_macth == true ? model.match_id : 0;

            ViewBag.MatchName      = match_dao.GetMatchName_ByMatchID(match_id);
            ViewBag.CurrentMatchID = match_id;
            return(View(model));
        }