예제 #1
0
        public async Task <ActionResult> SMSProcessorStatus()
        {
            if (!Manager.HasSuperUserRole)
            {
                return(new EmptyResult());
            }
            SendSMS.GetSMSProcessorCondInfo info = await SendSMS.GetSMSProcessorCondAsync();

            DisplayModel model = new DisplayModel()
            {
                Available     = info.Count,
                TestMode      = info.Processor != null ? await info.Processor.IsTestModeAsync() : false,
                ProcessorName = info.Processor != null ? info.Processor.Name : null,
            };

            if (model.Available == 1 && !model.TestMode)
            {
                return(new EmptyResult());
            }
            return(View(model));
        }