Esempio n. 1
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());
        }
Esempio n. 2
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));
        }