private void EditBut_Click(object sender, RoutedEventArgs e) { Transaction transaction = (Transaction)(sender as Button).Tag; CommentWindow commentWindow = new CommentWindow(transaction, transaction.Comment, transaction.Parent.GetMainWindow()); commentWindow.ShowDialog(); }
private void Details() { CommentWindow cw = new CommentWindow(); cw.DataContext = this; cw.Show(); }
private void btn_addComment_Click(object sender, RoutedEventArgs e) { CommentWindow commentWindow = new CommentWindow(); if (commentWindow.ShowDialog() == true) { taskContract.AddComment(commentWindow.CurrentText, (this.DataContext as Task).ID, GlobalSettings.CurrentUser.ID); UpdateComment((this.DataContext as Task).ID); } }
// коментарии void btnComment_Click(object sender, RoutedEventArgs e) { var btn = sender as Button; if (btn == null || !(btn.Tag is Project)) { return; } var win = new CommentWindow((Project)btn.Tag) { Owner = Window.GetWindow(this) }; win.ShowDialog(); }
private void Update() { DateTime oldDate = Entity.Date; string oldContent = Entity.Content; Entity.Date = Date; Entity.Content = Content; UpdateCommand.RaiseCanExecuteChanged(); if (!_apiRequester.Update(Entity, "comment/" + Id)) { Entity.Date = oldDate; Entity.Content = oldContent; } CommentWindow commentWindow = App.Current.Windows.OfType <CommentWindow>().FirstOrDefault(); commentWindow.Close(); //cw.Close(); }
private void commentButton_Click(object sender, RoutedEventArgs e) { CommentWindow commentWnd = new CommentWindow(this.currentAppItem.Id); commentWnd.ShowDialog(); }
private void Comments(object sender, RoutedEventArgs e) { CommentWindow window = new CommentWindow(); window.ShowDialog(); }