예제 #1
0
 private void AgregarCoparticipe()
 {
     try
     {
         if (SelectedCoparticipe == null)//AGREGAR
         {
             LstCoparticipe.Add(new COPARTICIPE()
             {
                 PATERNO = PaternoCoparticipe,
                 MATERNO = MaternoCoparticipe,
                 NOMBRE  = NombreCoparticipe,
             });
         }
         else//EDITAR
         {
             SelectedCoparticipe.PATERNO = PaternoCoparticipe;
             SelectedCoparticipe.MATERNO = MaternoCoparticipe;
             SelectedCoparticipe.NOMBRE  = NombreCoparticipe;
             LstCoparticipe = new ObservableCollection <COPARTICIPE>(LstCoparticipe);
         }
         LimpiarCoparticipe();
     }
     catch (Exception ex)
     {
         StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al agregar coparticipe", ex);
     }
 }
예제 #2
0
 private void EliminarCoparticipe()
 {
     try
     {
         if (SelectedCoparticipe != null)
         {
             LstCoparticipe.Remove(SelectedCoparticipe);
             LimpiarCoparticipe();
             LstAlias = new ObservableCollection <COPARTICIPE_ALIAS>();
             LstApodo = new ObservableCollection <COPARTICIPE_APODO>();
         }
     }
     catch (Exception ex)
     {
         StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al eliminar coparticipe", ex);
     }
 }