Exemplo 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 }));
            }
        }
Exemplo 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 }));
     }
 }
Exemplo n.º 3
0
        public ActionResult Update(Guid id)
        {
            var httpNotify = new HttpNotifyRep().GetByID(id);

            return(View(httpNotify));
        }