DBPOLLDemo.Controllers.answerHistoryController.Delete C# (CSharp) Method

Delete() public method

public Delete ( int aid, int ahid ) : System.Web.Mvc.ActionResult
aid int
ahid int
return System.Web.Mvc.ActionResult
        public ActionResult Delete(int aid, int ahid)
        {
            if (Session["uid"] == null || Session["uid"].ToString().Equals(""))
            {
                return RedirectToAction("Index", "Home");
            }
            if ((int)Session["user_type"] < User_Type.POLL_MASTER)
            {
                return RedirectToAction("Invalid", "Home");
            }

            new answerHistoryModel(ahid).deleteAnswerHistory();

            answerModel a = new answerModel();
            a = a.getAnswer(aid);
            return RedirectToAction("Index", "answerHistory", new { id = a.answerid, name = a.answer });
        }
answerHistoryController