示例#1
0
        public void DeleteShouldDeleteEntity()
        {
            var input = new DeleteConfirmInput {
                Id = 123
            };

            countryController.Delete(input).ShouldBeJson();
            A.CallTo(() => countryCrudSrv.Delete(input.Id)).MustHaveHappened();
        }
 public ActionResult Delete(DeleteConfirmInput input)
 {
     try
     {
         IUsers.DeleteUser(input.Id);
     }
     catch (Exception ex)
     {
     }
     return(Json(new { Id = input.TextId }));
 }
示例#3
0
        public ActionResult Delete(DeleteConfirmInput input)
        {
            var node = Db.Get<TreeNode>(input.Id);
            DeleteNode(node);

            var result = new
            {
                node.Id,
                ParentId = node.Parent != null ? node.Parent.Id : 0 // we'll refresh the parent to remove collapse button when zero children
            };

            return Json(result);
        }
        public ActionResult Delete(DeleteConfirmInput input)
        {
            var items = ITranslation.GetTranslationByTextID(input.TextId).ToList();

            ITranslationArchive.InsertDeletedRecords(input.TextId);

            //Delete the corresponding range in db
            ITranslation.DeleteRange(input.TextId);

            foreach (var item in items)
            {
                var vote = IVotes.GetVoteByTranslationID(item.Id);
                if (vote != null)
                {
                    IVotes.Delete(int.Parse(vote.Id.ToString()));
                }
            }
            ITranslation_Log.DeleteRange(input.TextId);
            return(Json(new { Id = input.TextId }));
        }
示例#5
0
 public ActionResult Delete(DeleteConfirmInput input)
 {
     service.Delete(input.Id);
     return(Json(new { input.Id }));
 }
 public ActionResult Delete(DeleteConfirmInput input)
 {
     Db.Delete <Restaurant>(input.Id);
     return(Json(new { input.Id }));
 }
 public ActionResult Delete(DeleteConfirmInput input)
 {
     Db.Delete <Dinner>(input.Id);
     return(Json(new { Id = input.Id }));
 }
示例#8
0
 public ActionResult Delete(DeleteConfirmInput input)
 {
     Ilanguages.Delete(input.Id);
     return(Json(new { input.Id }));
 }