本文整理汇总了C#中datos.RecursosHumanos.RecursosHumanosEntities.DeleteObject方法的典型用法代码示例。如果您正苦于以下问题:C# RecursosHumanosEntities.DeleteObject方法的具体用法?C# RecursosHumanosEntities.DeleteObject怎么用?C# RecursosHumanosEntities.DeleteObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datos.RecursosHumanos.RecursosHumanosEntities
的用法示例。
在下文中一共展示了RecursosHumanosEntities.DeleteObject方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Eliminar
public Boolean Eliminar(clsNominaCab nomc)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.NominaCab where q.NumNomina == nomc .NumNomina select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例2: Eliminar
public Boolean Eliminar(clsPersona pe)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Persona where q.Identificacion == pe.Identificacion select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例3: Eliminar
public Boolean Eliminar(clsAcademico acad)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Academico where q.IdPersona == acad.IdPersona select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例4: Eliminar
public Boolean Eliminar(clsTrabajoDiarioCab tdrc)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.TrabajoDiarioCab where q.NumTrabajo == tdrc.NumTrabajo select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例5: Eliminar
public Boolean Eliminar(clsAnticipoCabecera ac)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.AnticipoCab where q.NumAnticipo == ac.NumAnticipo select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例6: Eliminar
public Boolean Eliminar(clsDepartamento dep)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Departamento where q.IdDepartamento == dep.IdDepartamento select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例7: Eliminar
public Boolean Eliminar(clsUniversidad un)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Universidad where q.IdUniversidad == un.IdUniversidad select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例8: Eliminar
public Boolean Eliminar(clsTitulo ti)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Titulo where q.IdTitulo == ti.IdTitulo select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例9: Eliminar
public Boolean Eliminar(clsMaternidad ma)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Maternidad where q.NumMaternidad == ma.NumMaternidad select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}
示例10: Eliminar
public Boolean Eliminar(clsContrato cont)
{
try
{
using (RecursosHumanosEntities ent = new RecursosHumanosEntities())
{
var x = (from q in ent.Contrato where q.NumContrato == cont.NumContrato select q).First();
ent.DeleteObject(x);
ent.SaveChanges();
}
return true;
}
catch (Exception)
{
return false;
}
}