예제 #1
0
        public ActionResult Form3()
        {
            if (!_utils.IsAuthorized())
            {
                return(_utils.IsAuthorized() ? (ActionResult)View() : RedirectToAction("Index", "Hm"));
            }
            if (!_utils.GetMmSession())
            {
                return(_utils.GetMmSession() ? (ActionResult)View() : RedirectToAction("Dashboard", "Hm"));
            }
            if (!_utils.IsAuthorisedForView())
            {
                return(_utils.IsAuthorisedForView() ? (ActionResult)View() : RedirectToAction("Dashboard", "Hm"));
            }

            ViewBag.sYear = _utils.GetTaxyear();

            var varActionName = RouteData.Values["action"].ToString();

            ViewBag.ActName = varActionName;

            var varForm3 = _formCRepository.FetchFileDetails(Session["LoginId"].ToString(), _utils.GetTaxyear(), Session["AtCode"].ToString());

            ViewBag.DocExists = varForm3 != null;

            TempData["YearValid"] = true;
            TempData["TaxYear"]   = Session["TaxYear"].ToString();

            return(View(varForm3));
        }
예제 #2
0
        public ActionResult Form3()
        {
            if (!_utils.IsAuthorized())
            {
                return(_utils.IsAuthorized() ? (ActionResult)View() : RedirectToAction("Index"));
            }
            if (!_utils.GetMmSession())
            {
                return(_utils.GetMmSession() ? (ActionResult)View() : RedirectToAction("Dashboard"));
            }
            if (!_utils.IsAuthorisedForView())
            {
                return(_utils.IsAuthorisedForView() ? (ActionResult)View() : RedirectToAction("Dashboard"));
            }

            ViewBag.sYear = _utils.GetTaxyear();

            var varActionName = RouteData.Values["action"].ToString();

            ViewBag.ActName = varActionName;

            var varPcis = _formCRepository.FindPcisDocNeeded(Session["LoginId"].ToString(), _utils.GetTaxyear());

            var varForm3 = _formCRepository.FetchFileDetails(Session["LoginId"].ToString(), _utils.GetTaxyear(), Session["AtCode"].ToString());

            var docCount = 0;
            var FormC    = new Form3();

            if (varForm3 != null)
            {
                foreach (var pics in varForm3)
                {
                    docCount           += 1;
                    FormC.PcisDocNeeded = pics.PcisDocNeeded;
                }
            }

            ViewBag.DocCount = docCount;
            ViewBag.NeedDoc  = varPcis;
            //ViewBag.DocExists = varForm3 != null && varForm3.PcisDocId > 0;
            ViewBag.DocExists = varForm3 != null; //changed MJ 05/28/2020 to facilitate multiple uploads;

            TempData["YearValid"] = true;
            TempData["TaxYear"]   = Session["TaxYear"].ToString();

            return(View(varForm3));
        }