Exemple #1
0
 public void mtdGuardar()
 {
     try
     {
         using (var db = new conModelo())
         {
             if (this.CALid_calificacion > 0)
             {
                 db.Entry(this).State = EntityState.Modified;
             }
             else
             {
                 db.Entry(this).State = EntityState.Added;
             }
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public void mtdGuardarCotizacionRespuesta()
 {
     try
     {
         using (var db = new conModelo())
         {
             if (this.CTRid_cotizacionRespuesta > 0)
             {
                 db.Entry(this).State = EntityState.Modified;
             }
             else
             {
                 db.Entry(this).State = EntityState.Added;
             }
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public void mtdGuardar()
 {
     try
     {
         using (var db = new conModelo())
         {
             if (this.PDSid_pedidoServicio > 0)
             {
                 db.Entry(this).State = EntityState.Modified;
             }
             else
             {
                 db.Entry(this).State = EntityState.Added;
             }
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #4
0
 public void mtdGuardar()
 {
     try
     {
         using (var db = new conModelo())
         {
             if (this.FOPid_foroPregunta > 0)
             {
                 db.Entry(this).State = EntityState.Modified;
             }
             else
             {
                 db.Entry(this).State = EntityState.Added;
             }
             db.SaveChanges();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 //metodo eliminar
 public void mtdEliminar()
 {
     try
     {
         using (var db = new conModelo())
         {
             db.Entry(this).State = EntityState.Deleted;
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }