示例#1
0
        public async Task <ActionResult> AddQues(int id)
        {
            try
            {
                var vmQuestions = await _apiHandler.GetQuetionsBySimTestId(id);

                return(View(vmQuestions));
            }
            catch
            {
                Session.Message = new Message()
                {
                    CssClassName = "alert-error", Title = "Error!", Messages = "Operation Failed."
                };
                return(View());
            }
        }
示例#2
0
        public async Task <IActionResult> Test(int id)
        {
            try
            {
                var vmQuestions = await _apiHandler.GetQuetionsBySimTestId(id);

                return(View(vmQuestions));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Session.Message = new Message()
                {
                    CssClassName = "alert-error", Title = "Error!", Messages = "Operation Failed."
                };
                return(View());
            }
        }