public void CrearObjeto(objeto sender, FocusEventArgs e) { var objeto = new Picker(); objeto.ItemsSource = lista; ejercicio.Children.Add(objeto); }
public IHttpActionResult borrarObjeto([FromBody]objeto objeto) { ObjetoLN objetoLN = FabricaIoC.Container.Resolver<ObjetoLN>(); return Json(objetoLN.lfBorrar(objeto), new JsonSerializerSettings() { PreserveReferencesHandling = PreserveReferencesHandling.Objects, Formatting = Formatting.Indented }); }//Fin del método borrarPersona.
public void borrar(objeto objeto) { DbContextTransaction dbTransaccion = SS_Contexto.Database.BeginTransaction(); try { SS_Contexto.objeto.Remove(objeto); SS_Contexto.SaveChanges(); dbTransaccion.Commit(); } catch (Exception ex) { dbTransaccion.Rollback(); throw new Exception(ex.ToString()); }//Fin del try-catch. }
public void actualizar(objeto objeto) { DbContextTransaction dbTransaccion = SS_Contexto.Database.BeginTransaction(); try { var entity = SS_Contexto.objeto.Find(objeto.idObjeto); SS_Contexto.Entry(entity).CurrentValues.SetValues(objeto); SS_Contexto.SaveChanges(); dbTransaccion.Commit(); } catch (Exception ex) { dbTransaccion.Rollback(); throw new Exception(ex.ToString()); }//Fin del try-catch. }
public Respuesta <objeto> lfInsertar(objeto objeto) { Respuesta <objeto> respuesta = new Respuesta <objeto>(); try { DominioObjeto.insertar(objeto); respuesta.resultado = 1; } catch (Exception ex) { respuesta.bnlIndicadorTransaccion = false; respuesta.valorRetorno = null; respuesta.strOrigen = ex.ToString(); respuesta.resultado = 0; } //Fin del try-catch. return(respuesta); } //fin del insertar