当前位置: 首页>>代码示例>>C#>>正文


C# RecursosHumanosEntities.DeleteObject方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:17,代码来源:clsDatosNominaCab.cs

示例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;
     }
 }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:17,代码来源:clsDatosCargoxDepartamento.cs

示例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;
     }
 }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:17,代码来源:clsDatosAcademico.cs

示例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;
     }
 }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:17,代码来源:clsDatosTrabajoDiarioCab.cs

示例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;
     }
 }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:17,代码来源:clsDatosAnticipoCabecera.cs

示例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;
            }
        }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:18,代码来源:clsDatosDepartamento.cs

示例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;
            }
        }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:18,代码来源:clsDatosUniversidad.cs

示例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;
            }
        }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:18,代码来源:clsDatosTitulo.cs

示例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;
            }
        }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:18,代码来源:clsDatosMaternidad.cs

示例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;
     }
 }
开发者ID:Kendry06,项目名称:BaseSistemasIntegrados,代码行数:17,代码来源:clsDatosContrato.cs


注:本文中的datos.RecursosHumanos.RecursosHumanosEntities.DeleteObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。