Esempio n. 1
0
        public ActionResult Update(int id, enContest enContest_)
        {
            var objENContest = new enContest()
            {
                ID = id
            };
            var objBLContest = new blContest(objENContest);

            try
            {
                objBLContest.Read();
            }
            catch
            {
                RedirectToAction("error", "misc");
            }

            enContest_.InsertedOn = objENContest.InsertedOn;
            objBLContest          = new blContest(enContest_);
            try
            {
                objBLContest.Update();
            }
            catch
            {
                RedirectToAction("error", "misc");
            }
            return(RedirectToAction("List"));
        }
Esempio n. 2
0
        public ActionResult Update(int id)
        {
            var objENContest = new enContest()
            {
                ID = id
            };
            var objBLContest = new blContest(objENContest);
            List <enContest> listOfContests = new List <enContest>();

            try
            {
                objBLContest.Read();
            }
            catch
            {
                RedirectToAction("error", "misc");
            }
            return(View("create", objENContest));
        }