private void View() { if (this.editChild == null) { this.editChild = new BranchEdit(); PageAnimation.back.Children.Add(this.editChild); } Messenger.Default.Send(new ChildMessage() { currentObject = this.currentSelectItem, isEdit = false, action = ActionMenuButton.View, level = "Main" }); PageAnimation.ToBack(); }
public bool UpdateBranch(BranchEdit model) { using (var ctx = new ApplicationDbContext()) { var entity = ctx .Branches .Single(e => e.BranchName == model.BranchName); entity.BranchName = model.BranchName; return(ctx.SaveChanges() == 1); } }