示例#1
0
 public ContentResult AddAction(Disagreement disagreement)
 {
     disagreement.IdUser = User.Identity.GetId();
     return(new ContentResult()
     {
         Content = JsonHelper.GetJsonString(BLLDisagreements.AddDisagreement(disagreement)), ContentType = "application/json"
     });
     // return new JsonResult() { Data = BLLDisagreements.AddDisagreement(disagreement), JsonRequestBehavior = JsonRequestBehavior.AllowGet };
 }
示例#2
0
        public ContentResult AddDemandDisagreement(string disagreement, int idEvent, int?idDisagreement)
        {
            Disagreement d = new Disagreement();

            d.DisagreementOnDate        = false;
            d.DisagreementOnDescription = true;
            d.DisagreementOnPiece       = false;
            d.IdUser  = User.Identity.GetId();
            d.Comment = disagreement;
            d.IdEvent = idEvent;
            if (idDisagreement != null)
            {
                d.Id = idDisagreement.Value;
            }

            return(new ContentResult()
            {
                Content = JsonHelper.GetJsonString(BLLDisagreements.AddDisagreement(d)), ContentType = "application/json"
            });
        }