예제 #1
0
        private void HyperlinkButton_Copy_Click(object sender, RoutedEventArgs e)
        {
            template = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as NotesTemplateViewModel.NoteTemplate;

            NewNotesTemplate noteDlg = new NewNotesTemplate(template.TemplateID);
            RadWindow        win     = new RadWindow();

            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
            win.Header  = "Copying " + template.TemplateName;
            win.Content = noteDlg;
            win.ShowDialog();
        }
예제 #2
0
        private void HyperlinkButton_AddItem_Click(object sender, RoutedEventArgs e)
        {
            NotesTemplateViewModel.NoteTemplate nt = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as NotesTemplateViewModel.NoteTemplate;
            AddNotesTempateItems noteDlg           = new AddNotesTempateItems(nt.TemplateID.ToString());

            noteDlg.Title = "Add Items to Template -- " + nt.TemplateName;
            RadWindow win = new RadWindow();

            win.Height = 650;
            win.Width  = 900;
            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Header  = "Add Items to Note Template";
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
            win.Content = noteDlg;
            win.ShowDialog();
        }
예제 #3
0
        private void Private_Click(object sender, RoutedEventArgs e)
        {
            CheckBox chk = (CheckBox)sender;

            NotesTemplateViewModel.NoteTemplate ed = ((GridViewCell)((CheckBox)e.OriginalSource).Parent).ParentRow.DataContext as NotesTemplateViewModel.NoteTemplate;
            int isPrivate = 0;

            if ((bool)chk.IsChecked)
            {
                isPrivate    = 1;
                ed.IsPrivate = true;
            }
            else
            {
                isPrivate    = 0;
                ed.IsPrivate = false;
            }

            ((NotesTemplateViewModel)LayoutRoot.DataContext).UpdateNoteTemplateStatus(ed.TemplateID, isPrivate, (App.Current as App).CurrentUserId, "ISPRIVATE");
        }
예제 #4
0
 private void HyperlinkButton_RemoveTemplate_Click(object sender, RoutedEventArgs e)
 {
     template = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as NotesTemplateViewModel.NoteTemplate;
     RadWindow.Confirm("Remove template will deactivate all items configured to this template.\n\nAre you sure you want to remove this template?", new EventHandler <WindowClosedEventArgs>(template_confirm_close));
 }
예제 #5
0
 private void RadGridView2_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
 {
     NotesTemplateViewModel.NoteTemplate ed = (NotesTemplateViewModel.NoteTemplate)e.Cell.DataContext;
     UpdateNoteTemplateName(ed.TemplateID, ed.TemplateName);
 }