Example #1
0
        public ActionResult WorkplaceDetails(int qid, int quationid)
        {
            List <options> Options     = new List <options>();
            int            selectedOpt = 0;
            int            wid         = 0;
            string         username    = "";
            string         quation     = "";

            if (Session["UserID"] != null)
            {
                wid      = Convert.ToInt32(Session["UserID"]);
                username = Session["userName"].ToString();
            }
            using (var ibisaRepository = new IBISARepository())
            {
                Options     = ibisaRepository.getOptions(qid);
                selectedOpt = ibisaRepository.GetSelectedOption(wid, quationid);
                quation     = ibisaRepository.getquation(qid);
            }

            WatcherQA wQa = new WatcherQA();

            wQa.QuationId      = quationid;
            wQa.options        = Options;
            wQa.watcherId      = wid;
            wQa.selectedOption = selectedOpt;
            wQa.QName          = quation;
            wQa.iddirId        = qid;
            ViewBag.userName   = username;
            return(View(wQa));
        }