Exemplo n.º 1
0
 private void btnActualizar_Click(object sender, RoutedEventArgs e)
 {
     Snippet selected = lstSnippets.SelectedItem as Snippet;
     SnippetEventArgs args = new SnippetEventArgs
     {
         Result = selected
     };
     Actualizar(this, args);
     Refresh();
 }
Exemplo n.º 2
0
 private void btnActualizar_Click(object sender, SnippetEventArgs args)
 {
     Snippet result = args.Result;
     grdContainer.Children.Clear();
     SnippetEdit edition = new SnippetEdit()
     {
         Snippet = result,
         Way = EditingWay.UPDATING
     };
     grdContainer.Children.Add(edition);
     edition.Confirmed += new EventHandler<SnippetEventArgs>(update_Confirmed);
 }
Exemplo n.º 3
0
 private void btnCommand_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     SnippetEventArgs args = new SnippetEventArgs
     {
         Result = new Snippet
         {
             ID = Snippet.ID,
             Nombre = txtName.Text,
             Descripcion = txtDescription.Text
         }
     };
     Confirmed(this, args);
 }
Exemplo n.º 4
0
 private void btnVer_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     Snippet selected = lstSnippets.SelectedItem as Snippet;
     SnippetEventArgs args = new SnippetEventArgs
     {
         Result = selected
     };
     Ver(this, args);
     Refresh();
 }
Exemplo n.º 5
0
 void update_Confirmed(object sender, SnippetEventArgs args)
 {
     Snippet result = args.Result;
     context.Update(result);
     Refresh();
 }
Exemplo n.º 6
0
 void edition_Confirmed(object sender, SnippetEventArgs args)
 {
     Snippet result = args.Result;
     int r = context.Insert(result);
     MessageBox.Show("Se guardo el registro " + r);
 }
Exemplo n.º 7
0
 private void btnVer_Click(object sender, SnippetEventArgs args)
 {
     Snippet result = args.Result;
     grdContainer.Children.Clear();
     SnippetView view = new SnippetView()
     {
         Snippet = result,
     };
     grdContainer.Children.Add(view);
 }
Exemplo n.º 8
0
 private void btnEliminar_Click(object sender, SnippetEventArgs args)
 {
     Snippet result = args.Result;
     context.Delete(result);
     Refresh();
 }