Пример #1
0
        public async Task <ActionResult> ManageService(ServiceActionBind serviceActionBind)
        {
            string redirectURI = "ManageService";

            try
            {
                PageActionManager pageActionMage = new PageActionManager();
                OperationStatus   response       = await pageActionMage.ManageService(serviceActionBind, GetUsername);

                if (Convert.ToBoolean(response.StatusCode))
                {
                    ActionMessage(response.Message, MessageType.Success);
                }
                else
                {
                    ActionMessage(response.Message, MessageType.Error);
                }
            }
            catch (Exception ex)
            {
                ProcessException(ex);
                ActionMessage(ex.Message, MessageType.Error);
            }
            redirectURI = nameof(ManageAction);
            return(RedirectToAction(redirectURI));
        }
Пример #2
0
        public async Task <ActionResult> ManageService(string id)
        {
            AddJS("ManageService", "/admin/js/PageAction/ManageService.js");

            ServiceActionBind serviceActionBind = new ServiceActionBind();
            PageActionManager pageAction        = new PageActionManager();
            PageAction        pageAreaObj       = await pageAction.GetPageActionByID(id);

            IList <ServiceAction> serviceActions = await pageAction.GetAllServiceActions();

            serviceActionBind.PageAction        = pageAreaObj;
            serviceActionBind.ServiceActionList = serviceActions;
            return(View(serviceActionBind));
        }