public void Delete(int idConvenio) { using (cooperativaEntities bd = new cooperativaEntities()) { DataTable dtFacturas = new DataTable(); FacturasImplement oFacturasImplement = new FacturasImplement(); var listar = (from f in bd.facturas where f.id_convenio == idConvenio select f).ToList(); Commons oCommons = new Commons(); dtFacturas = oCommons.convertToTable(listar); foreach (DataRow dr in dtFacturas.Rows) { int idFactura = int.Parse(dr["id_factura"].ToString()); facturas oFacturas = new facturas(); oFacturas = oFacturasImplement.Get(idFactura); oFacturas.id_convenio = 0; oFacturasImplement.Update(oFacturas); } var regis = (from p in bd.convenios where p.id_convenio == idConvenio select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idCaja) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.cod_cajas where p.id_caja == idCaja select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idConceptoParticular) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.conceptos_particulares where p.id_concepto_particular == idConceptoParticular select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idMoratoria) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.moratorias where p.idmoratorias == idMoratoria select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idProcesoJudicial) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.proceso_judicial where p.id_proceso_judicial == idProcesoJudicial select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idDetallesMoratoria) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.detalles_moratoria where p.iddetalles_moratoria == idDetallesMoratoria select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idAccion) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.acciones where p.id_accion == idAccion select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void Delete(int idTerminal) { using (cooperativaEntities bd = new cooperativaEntities()) { var regis = (from p in bd.seg_terminales where p.id_terminal == idTerminal select p).Single(); bd.DeleteObject(regis); bd.SaveChanges(); } }
public void DeleteByIdMoratoria(int idMoratoria) { using (cooperativaEntities bd = new cooperativaEntities()) { var lista = (from p in bd.detalles_moratoria where p.idmoratoria == idMoratoria select p).ToList(); foreach (detalles_moratoria d in lista) { bd.DeleteObject(d); bd.SaveChanges(); } } }
public void DeleteByIdMoratoria(int idMoratoria) { using (cooperativaEntities bd = new cooperativaEntities()) { var lista = (from p in bd.detalles_moratoria where p.idmoratoria == idMoratoria select p).ToList(); foreach(detalles_moratoria d in lista) { bd.DeleteObject(d); bd.SaveChanges(); } } }