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


C# db_SeguimientoProtocolo_r2Entities类代码示例

本文整理汇总了C#中db_SeguimientoProtocolo_r2Entities的典型用法代码示例。如果您正苦于以下问题:C# db_SeguimientoProtocolo_r2Entities类的具体用法?C# db_SeguimientoProtocolo_r2Entities怎么用?C# db_SeguimientoProtocolo_r2Entities使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


db_SeguimientoProtocolo_r2Entities类属于命名空间,在下文中一共展示了db_SeguimientoProtocolo_r2Entities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConfirmationUpload

 public bool ConfirmationUpload(List<CiTrackingUploadConfirmationModel> items)
 {
     bool x = false;
     using (var entity=new db_SeguimientoProtocolo_r2Entities())
     {
         foreach (var row in items)
         {
             try
             {
                 CI_TRACKING result = null;
                 result = (from i in entity.CI_TRACKING
                           where i.IdTracking == row.IdTracking
                           select i).First();
                 if (result != null)
                 {
                     result.IsModified = false;
                     result.ServerLastModifiedDate = row.SLMD;
                 }
             }
             catch (Exception ex)
             {
                 AppBitacoraRepository.Insert(new AppBitacoraModel() { Fecha = DateTime.Now, Metodo = ex.StackTrace, Mensaje = ex.Message });
             }
         }
         entity.SaveChanges();
     }
     return x;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:28,代码来源:CiTrakingRepository.cs

示例2: DeleteCondPro

        // Delete.
        public void DeleteCondPro(IEnumerable<Model.CondProModel> condpros)
        {
            using (var entity = new db_SeguimientoProtocolo_r2Entities())
            {
                foreach (Model.CondProModel p in condpros)
                {
                    CAT_CONDPRO result = null;
                    try
                    {
                        result = (from o in entity.CAT_CONDPRO
                                   where o.IdCondicion == p.IdCondicion
                                   select o).First();
                    }
                    catch (Exception)
                    {

                        throw;
                    }

                    if (result != null)
                    {
                        result.IsActive = false;
                        result.IsModified = true;
                        result.LastModifiedDate = new UNID().getNewUNID();
                    }

                }
                entity.SaveChanges();
                _SyncRepository.UpdateSyn(entity);
            }
        }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:32,代码来源:CondProRepository.cs

示例3: DeletePuntoMedicion

        // Delete.
        public void DeletePuntoMedicion(IEnumerable<Model.PuntoMedicionModel> puntomedicions)
        {
            using (var entity = new db_SeguimientoProtocolo_r2Entities())
            {
                foreach (Model.PuntoMedicionModel p in puntomedicions)
                {
                    CAT_PUNTO_MEDICION result = null;
                    try
                    {
                        result = (from o in entity.CAT_PUNTO_MEDICION
                                   where o.IdPuntoMedicion == p.IdPuntoMedicion
                                   select o).First();
                    }
                    catch (Exception)
                    {

                        throw;
                    }

                    if (result != null)
                    {
                        result.IsActive = false;
                        result.IsModified = true;
                        result.LastModifiedDate = new UNID().getNewUNID();
                    }
                }
                entity.SaveChanges();
                _SyncRepository.UpdateSyn(entity);
            }
        }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:31,代码来源:PuntoMedicionRepository.cs

示例4: InsertTracking

 public bool InsertTracking(TrackingModel tracking)
 {
     bool x = false;
     using (var entity =new db_SeguimientoProtocolo_r2Entities())
     {
         try
         {
             entity.CI_TRACKING.AddObject(new CI_TRACKING()
             {
                 IdTracking=tracking.IdTracking,
                 Accion=tracking.Accion,
                 Valor=tracking.Valor,
                 Ip=tracking.Ip,
                 Equipo=tracking.Equipo,
                 Ubicacion=tracking.Ubicacion,
                 IdUsuario=tracking.IdUsuario ,
                 IsModified=tracking.IsModified,
                 LastModifiedDate=tracking.LastModifiedDate,
                 ServerLastModifiedDate=tracking.ServerLastModifiedDate,
                 IdPuntoMedicion=tracking.IdPuntoMedicion,
                 FechaNumerica=tracking.FechaNumerica
             });
             entity.SaveChanges();
             _SyncRepository.UpdateIsModifiedData(ID_SYNCTABLE);
         }
         catch (Exception)
         {
             x = false;
         }
     }
     return x;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:32,代码来源:TrackingRepository.cs

示例5: DeleteEstPuntoMed

        // Delete.
        public void DeleteEstPuntoMed(IEnumerable<Model.EstPuntoMedModel> estpuntomeds)
        {
            using (var entity = new db_SeguimientoProtocolo_r2Entities())
            {
                foreach (Model.EstPuntoMedModel p in estpuntomeds)
                {
                    REL_EST_PUNTOMED result = null;
                    try
                    {
                        result = (from o in entity.REL_EST_PUNTOMED
                                   where o.IdEstPuntoMed == p.IdEstPuntoMed
                                   select o).First();
                    }
                    catch (Exception)
                    {

                        throw;
                    }

                    if (result != null)
                    {
                        result.IsActive = false;
                        result.IsModified = true;
                        result.LastModifiedDate = new UNID().getNewUNID();
                    }

                }
                entity.SaveChanges();
                _SyncRepository.UpdateSyn(entity);
            }
        }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:32,代码来源:EstPuntoMedRepository.cs

示例6: GetIsModified

 public ObservableCollection<PuntoMedicionMaxMinModel> GetIsModified()
 {
     ObservableCollection<PuntoMedicionMaxMinModel> result = new ObservableCollection<PuntoMedicionMaxMinModel>();
     try
     {
         using (var entity = new db_SeguimientoProtocolo_r2Entities())
             (from res in entity.CAT_PUNTO_MEDICION_MAX_MIN
              where res.IsModified == true
              select res).ToList().ForEach(row =>
              {
                  result.Add(new PuntoMedicionMaxMinModel()
                  {
                      IdPuntoMedicionMaxMin = row.IdPuntoMedicionMaxMin,
                      IdPuntoMedicion = row.IdPuntoMedicion,
                      Max = row.Max,
                      Min = row.Min,
                      ServerLastModifiedDate = row.ServerLastModifiedDate,
                      LastModifiedDate = row.LastModifiedDate,
                  });
              });
     }
     catch (Exception)
     {
         result = null;
     }
     return result;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:27,代码来源:CatPuntoMedicionMaxMinRepository.cs

示例7: GetEstructuraDependenciaADD

        // Read ADD.
        public Model.EstructuraDependenciaModel GetEstructuraDependenciaADD(Model.EstructuraDependenciaModel estructuradependencia)
        {
            using (var entity = new db_SeguimientoProtocolo_r2Entities())
            {
                if (estructuradependencia != null)
                {
                    //Validar si el elemento ya existe
                    REL_ESTRUCTURA_DEPENDENCIA result = null;
                    try
                    {
                        result = (from o in entity.REL_ESTRUCTURA_DEPENDENCIA
                                  where
                                  o.CAT_DEPENDENCIA.IdDependencia == estructuradependencia.DEPENDENCIA.IdDependencia && o.IsActive == true &&
                                  o.CAT_ESTRUCTURA.IdEstructura == estructuradependencia.ESTRUCTURA.IdEstructura && o.IsActive == true
                                  select o).First();
                    }
                    catch (Exception ex)
                    {
                        ;
                    }

                    if (result == null)
                    {
                        estructuradependencia = null;
                    }

                }
            }
            return estructuradependencia;
        }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:31,代码来源:EstructuraDependenciaRepository.cs

示例8: GetIsModified

 public ObservableCollection<EstPuntoMedModel> GetIsModified()
 {
     ObservableCollection<EstPuntoMedModel> result = new ObservableCollection<EstPuntoMedModel>();
     try
     {
         using (var entity = new db_SeguimientoProtocolo_r2Entities())
             (from res in entity.REL_EST_PUNTOMED
              where res.IsModified == true
              select res).ToList().ForEach(row =>
              {
                  result.Add(new EstPuntoMedModel()
                  {
                      IdEstPuntoMed = row.IdEstPuntoMed,
                      IdEstructura = row.IdEstructura,
                      IdPuntoMedicion = row.IdPuntoMedicion,
                      IsActive = row.IsActive,
                      IsModified = row.IsModified,
                      LastModifiedDate = row.LastModifiedDate,
                      ServerLastModifiedDate = row.ServerLastModifiedDate
                  });
              });
     }
     catch (Exception)
     {
         result = null;
     }
     return result;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:28,代码来源:RelEstPuntoMedRepository.cs

示例9: GetIsModified

 public ObservableCollection<UnidadMedidaModel> GetIsModified()
 {
     ObservableCollection<UnidadMedidaModel> result = new ObservableCollection<UnidadMedidaModel>();
     try
     {
         using (var entity = new db_SeguimientoProtocolo_r2Entities())
             (from res in entity.CAT_UNIDAD_MEDIDA
              where res.IsModified == true
              select res).ToList().ForEach(row =>
              {
                  result.Add(new UnidadMedidaModel()
                  {
                      IdUnidadMedida = row.IdUnidadMedida,
                      UnidadMedidaName = row.UnidadMedidaName,
                      UnidadMedidaShort = row.UnidadMedidaShort,
                      IsActive = row.IsActive,
                      IsModified = row.IsModified,
                      LastModifiedDate = row.LastModifiedDate,
                      ServerLastModifiedDate = row.ServerLastModifiedDate
                  });
              });
     }
     catch (Exception)
     {
         result = null;
     }
     return result;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:28,代码来源:CatUnidadMedidaRepository.cs

示例10: GetConsideracions

 // Read All.
 public IEnumerable<Model.ConsideracionModel> GetConsideracions(Model.CondProModel CondPro)
 {
     ObservableCollection<Model.ConsideracionModel> Consideracions = new ObservableCollection<Model.ConsideracionModel>();
     using (var entity = new db_SeguimientoProtocolo_r2Entities())
     {
         try
         {
             (from o in entity.CAT_CONSIDERACION
              where o.IdCondicion == CondPro.IdCondicion && o.IsActive == true
              select o).ToList().ForEach(p =>
              {
                  Consideracions.Add(new Model.ConsideracionModel()
                  {
                      IdConsideracion = p.IdConsideracion,
                      ConsideracionName = p.ConsideracionName,
                      ConsideracionDesc = p.ConsideracionDesc,
                      IsActive = p.IsActive,
                      IsModified = p.IsModified,
                      LastModifiedDate = p.LastModifiedDate
                  });
              });
         }
         catch (Exception)
         {
             ;
         }
     }
     return Consideracions;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:30,代码来源:ConsideracionRepository.cs

示例11: GetDependenciaADD

        // Read ADD.
        public Model.DependenciaModel GetDependenciaADD(Model.DependenciaModel dependencia)
        {
            using (var entity = new db_SeguimientoProtocolo_r2Entities())
            {
                if (dependencia != null)
                {
                    //Validar si el elemento ya existe
                    CAT_DEPENDENCIA result = null;
                    try
                    {
                        result = (from o in entity.CAT_DEPENDENCIA
                                  where
                                  o.IdDependencia == dependencia.IdDependencia && o.IsActive == true ||
                                  o.DependenciaName == dependencia.DependenciaName && o.IsActive == true
                                  select o).First();
                    }
                    catch (Exception ex)
                    {
                        ;
                    }

                    if (result == null)
                    {
                        dependencia = null;
                    }

                }
            }
            return dependencia;
        }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:31,代码来源:DependenciaRepository.cs

示例12: GetIsModified

 public ObservableCollection<SistemaModel> GetIsModified()
 {
     ObservableCollection<SistemaModel> result = new ObservableCollection<SistemaModel>();
     try
     {
         using (var entity = new db_SeguimientoProtocolo_r2Entities())
             (from res in entity.CAT_SISTEMA
              where res.IsModified == true
              select res).ToList().ForEach(row =>
              {
                  result.Add(new SistemaModel()
                  {
                      IdSistema = row.IdSistema,
                      SistemaName = row.SistemaName,
                      IsActive = row.IsActive,
                      IsModified = row.IsModified,
                      LastModifiedDate = row.LastModifiedDate,
                      ServerLastModifiedDate = row.ServerLastModifiedDate
                  });
              });
     }
     catch (Exception)
     {
         result = null;
     }
     return result;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:27,代码来源:CatSistemaRepository.cs

示例13: GetIsModified

 public ObservableCollection<TipoPuntoMedicionModel> GetIsModified()
 {
     ObservableCollection<TipoPuntoMedicionModel> result = new ObservableCollection<TipoPuntoMedicionModel>();
     try
     {
         using (var entity = new db_SeguimientoProtocolo_r2Entities())
             (from res in entity.CAT_TIPO_PUNTO_MEDICION
              where res.IsModified == true
              select res).ToList().ForEach(row =>
              {
                  result.Add(new TipoPuntoMedicionModel()
                  {
                      IdTipoPuntoMedicion = row.IdTipoPuntoMedicion,
                      TipoPuntoMedicionName = row.TipoPuntoMedicionName,
                      IsActive = row.IsActive,
                      IsModified = row.IsModified,
                      LastModifiedDate = row.LastModifiedDate,
                      ServerLastModifiedDate = row.ServerLastModifiedDate
                  });
              });
     }
     catch (Exception)
     {
         result = null;
     }
     return result;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:27,代码来源:CatTipoPuntoMedicionRepository.cs

示例14: GetIsModified

 public List<TrackingModel> GetIsModified()
 {
     List<TrackingModel> result = new List<TrackingModel>();
     try
     {
         using (var entity = new db_SeguimientoProtocolo_r2Entities())
             (from res in entity.CI_TRACKING
              where res.IsModified == true
              select res).ToList().ForEach(row =>
              {
                  result.Add(new TrackingModel()
                  {
                      IdTracking = row.IdTracking,
                      Accion = row.Accion,
                      Valor = row.Valor,
                      Ip = row.Ip,
                      Equipo = row.Equipo,
                      Ubicacion = row.Ubicacion,
                      IdUsuario = row.IdUsuario,
                      ServerLastModifiedDate = row.ServerLastModifiedDate,
                      LastModifiedDate = row.LastModifiedDate,
                      IsModified = row.IsModified,
                      IdPuntoMedicion=row.IdPuntoMedicion,
                      FechaNumerica=row.FechaNumerica
                  });
              });
     }
     catch (Exception)
     {
         result = null;
     }
     return result;
 }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:33,代码来源:CiTrakingRepository.cs

示例15: GetCondicions

        public ObservableCollection<CondProModel> GetCondicions()
        {
            ObservableCollection<CondProModel> items = new ObservableCollection<CondProModel>();
            try
            {
                using(var entity=new db_SeguimientoProtocolo_r2Entities())
                {
                    (from res in entity.CAT_CONDPRO
                     where res.IsActive == true
                     select res).ToList().ForEach(row => {
                         items.Add(new CondProModel()
                         {
                             IdCondicion = row.IdCondicion,
                             CondicionName = row.CondicionName,
                             PathCodicion = row.PathCodicion
                         });
                     });
                }
            }
            catch (Exception ex)
            {

            }

            return items;
        }
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:26,代码来源:CatCondProRepository.cs


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