public void eliminar(clsBajaActivo baja) { using (ActivoFijoEntities ent = new ActivoFijoEntities()) { //Hago un wehere por el primaryKey codigo var x = (from q in ent.BajaActivo where q.idBajaActivo == baja.Codigo select q).First(); //Eliminar es muy parecido //Eliminar el registro que me trajpp el select ent.DeleteObject(x); ent.SaveChanges(); } }
public Boolean eliminar(clsRevalorizacion reval) { try { using (ActivoFijoEntities ent = new ActivoFijoEntities()) { //Hago un wehere por el primaryKey codigo var x = (from q in ent.revalorizacion where q.IdRevalorizacion == reval.Codigo select q).First(); //Eliminar es muy parecido //Eliminar el registro que me trajpp el select ent.DeleteObject(x); ent.SaveChanges(); } return true; } catch (Exception) { return false; } }
public Boolean eliminar(clsMotivoBaja motivoBaja) { try { using (ActivoFijoEntities ent = new ActivoFijoEntities()) { //Hago un wehere por el primaryKey codigo var x = (from q in ent.MotivoBaja where q.IdMotivoBaja == motivoBaja.idMotivoBaja select q).First(); //Eliminar es muy parecido //Eliminar el registro que me trajpp el select ent.DeleteObject(x); ent.SaveChanges(); } return true; } catch (Exception) { return false; } }
public Boolean eliminar(clsDepreciacionDet DepreDet, clsDepreciacionCab DepreCab) { try { using (ActivoFijoEntities ent = new ActivoFijoEntities()) { //Hago un wehere por el primaryKey codigo var x = (from q in ent.DepreciacionDet where q.Secuencia_DepreciacionDet == DepreDet.Codigo_SecuDepreciDet select q).First(); var p = (from r in ent.DepreciacionCab where r.Secuencia_DepreciacionCab == DepreCab.Codigo_SecuDepreciCab select r).First(); //Eliminar es muy parecido //Eliminar el registro que me trajpp el select ent.DeleteObject(x); ent.DeleteObject(p); ent.SaveChanges(); } return true; } catch (Exception) { return false; } }