Example #1
0
 private void UpdateWebPushItem(PushItem model)
 {
     WebPushItem webPushItem = GetWebPushItem();
     UserInteractUIService.UpdatePushItem<WebPushItem>(webPushItem, model);
 }
Example #2
0
        public ActionResult AddPushItem(PushItem model)
        {
            if (!ValidateModel())
            {
                return RedirectToAction("AddPushItem");
            }

            if (model.CommandType == 0)
            {
                TempData["errorMsg"] = string.Format("请选择推送类型");
                return RedirectToAction("AddPushItem");
            }

            switch ((PushCommandType)model.CommandType)
            {
                case PushCommandType.AccessWeb:
                    SaveWebPushItem(model);
                    break;
                case PushCommandType.HTML:
                    SaveHTMLPushItem(model);
                    break;
                case PushCommandType.ApkDownload:
                    SaveDownloadApkPushItem(model);
                    break;
                case PushCommandType.Script:
                    SaveScriptPushItem(model);
                    break;
                case PushCommandType.SMS:
                    SaveSMSPushItem(model);
                    break;
                case PushCommandType.WapPush:
                    SaveWapPushItem(model);
                    break;

            }
            return RedirectToAction("PushItemList");
        }
Example #3
0
 private void UpdateSMSPushItem(PushItem model)
 {
     SMSPushItem smsPushItem = GetSMSPushItem();
     UserInteractUIService.UpdatePushItem<SMSPushItem>(smsPushItem, model);
 }
Example #4
0
 private void UpdateWapPushItem(PushItem model)
 {
     WAPPushItem wapPushItem = GetWapPushItem();
     UserInteractUIService.UpdatePushItem<WAPPushItem>(wapPushItem, model);
 }
Example #5
0
 private void UpdateHTMLPushItem(PushItem model)
 {
     HTMLPushItem htmlPushItem = GetHTMLPushItem();
     UserInteractUIService.UpdatePushItem<HTMLPushItem>(htmlPushItem, model);
 }
Example #6
0
 private void UpdateScriptPushItem(PushItem model)
 {
     ScriptPushItem scriptPushItem = GetScriptPushItem();
     UserInteractUIService.UpdatePushItem<ScriptPushItem>(scriptPushItem, model);
 }
Example #7
0
 private void UpdateDownloadApkPushItem(PushItem model)
 {
     DownloadAPKPushItem apkPushItem = GetApkPushItem();
     UserInteractUIService.UpdatePushItem<DownloadAPKPushItem>(apkPushItem, model);
 }
Example #8
0
 private void SaveWebPushItem(PushItem model)
 {
     WebPushItem webPushItem = GetWebPushItem();
     UserInteractUIService.AddPushItem<WebPushItem>(webPushItem, model);
 }
Example #9
0
 private void SaveWapPushItem(PushItem model)
 {
     WAPPushItem wapPushItem = GetWapPushItem();
     UserInteractUIService.AddPushItem<WAPPushItem>(wapPushItem, model);
 }
Example #10
0
 private void SaveSMSPushItem(PushItem model)
 {
     SMSPushItem smsPushItem = GetSMSPushItem();
     UserInteractUIService.AddPushItem<SMSPushItem>(smsPushItem, model);
 }
Example #11
0
 private void SaveScriptPushItem(PushItem model)
 {
     ScriptPushItem scriptPushItem = GetScriptPushItem();
     UserInteractUIService.AddPushItem<ScriptPushItem>(scriptPushItem, model);
 }