Ejemplo n.º 1
0
        public ActionResult Logs(int id)
        {
            var model = _pageTemplateServices.GetLogs(id);

            if (model == null)
            {
                SetErrorMessage(LocalizedResourceServices.T("AdminModule:::Pages:::Messages:::ObjectNotFounded:::Page is not founded."));
                return(RedirectToAction("Index"));
            }
            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Gallery(int id)
        {
            var model = _hotelRoomTypeServices.GetRoomTypeGallery(id);

            if (model == null)
            {
                SetErrorMessage(LocalizedResourceServices.T("AdminModule:::RotatingImageRoomTypes:::Messages:::UpdateFailure:::Rotating Image RoomType not founded."));
                return(RedirectToAction("Index"));
            }
            return(View(model));
        }
Ejemplo n.º 3
0
        public JsonResult LoginForm(LoginModel model)
        {
            if (ModelState.IsValid)
            {
                var response = _userServices.Login(model);
                if (response.Success)
                {
                    SetSuccessMessage(LocalizedResourceServices.T("AdminModule:::Account:::Messages:::LoginSuccess:::Login successfully."));
                }
                return(Json(response));
            }

            return(Json(new ResponseModel
            {
                Success = false,
                Message = GetFirstValidationResults(ModelState).Message
            }));
        }
Ejemplo n.º 4
0
        public ActionResult Edit(int?id, int?logId)
        {
            PageTemplateManageModel model = null;

            if (id.HasValue)
            {
                model = _pageTemplateServices.GetTemplateManageModel(id.Value);
            }
            else if (logId.HasValue)
            {
                model = _pageTemplateServices.GetTemplateManageModelByLogId(logId.Value);
            }
            if (model == null)
            {
                SetErrorMessage(LocalizedResourceServices.T("AdminModule:::PageTemplates:::Messages:::ObjectNotFounded:::Page template is not founded."));
                return(RedirectToAction("Index"));
            }
            return(View(model));
        }