Esempio n. 1
0
        public ActionResult Index(Guid id)
        {
            var httpMessage = HttpMessageBLL.GetByID(id);
            var httpNotify  = new HttpNotifyRep().GetHttpNotify(httpMessage.AppID, httpMessage.Method);

            if (httpNotify != null)
            {
                return(RedirectToAction("Update", new { id = httpNotify.ID }));
            }
            else
            {
                return(RedirectToAction("Add", new { id = httpMessage.ID }));
            }
        }
Esempio n. 2
0
 public ActionResult Update(HttpNotifyAddUpdate model)
 {
     try
     {
         var entity = new HttpNotifyRep().GetByID(model.ID);
         if (model.Names == null || model.Names.Length == 0)
         {
             new HttpNotifyRep().Delete(entity);
         }
         else
         {
             entity = model.ToEntity(entity);
             new HttpNotifyRep().Update(entity);
         }
         return(Json(new { err = "", result = true }));
     }
     catch (Exception ex)
     {
         return(Json(new { err = ex.Message, result = false }));
     }
 }
Esempio n. 3
0
        public ActionResult Update(Guid id)
        {
            var httpNotify = new HttpNotifyRep().GetByID(id);

            return(View(httpNotify));
        }