本文整理汇总了C#中db_SeguimientoProtocolo_r2Entities类的典型用法代码示例。如果您正苦于以下问题:C# db_SeguimientoProtocolo_r2Entities类的具体用法?C# db_SeguimientoProtocolo_r2Entities怎么用?C# db_SeguimientoProtocolo_r2Entities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
db_SeguimientoProtocolo_r2Entities类属于命名空间,在下文中一共展示了db_SeguimientoProtocolo_r2Entities类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: GetPuntoMedicionsMaxMin
public IEnumerable<Model.PuntoMedicionMaxMinModel> GetPuntoMedicionsMaxMin()
{
ObservableCollection<Model.PuntoMedicionMaxMinModel> PuntoMedicionMaxMin = new ObservableCollection<Model.PuntoMedicionMaxMinModel>();
using (var entity = new db_SeguimientoProtocolo_r2Entities())
{
try
{
(from o in entity.CAT_PUNTO_MEDICION_MAX_MIN
select o).ToList().ForEach(p =>
{
PuntoMedicionMaxMin.Add(new Model.PuntoMedicionMaxMinModel()
{
IdPuntoMedicion = p.IdPuntoMedicion,
IdPuntoMedicionMaxMin =p.IdPuntoMedicionMaxMin,
Max =p.Max,
Min=p.Min
});
});
}
catch (Exception)
{
;
}
}
return PuntoMedicionMaxMin;
}
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:26,代码来源:PuntoMedicionMaxMinRepository.cs
示例17: GetIsModified
public ObservableCollection<CondProModel> GetIsModified()
{
ObservableCollection<CondProModel> result = new ObservableCollection<CondProModel>();
try
{
using (var entity = new db_SeguimientoProtocolo_r2Entities())
(from res in entity.CAT_CONDPRO
where res.IsModified == true
select res).ToList().ForEach(row =>
{
result.Add(new CondProModel()
{
IdCondicion = row.IdCondicion,
CondicionName = row.CondicionName,
PathCodicion = row.PathCodicion,
IsActive = row.IsActive,
IsModified = row.IsModified,
LastModifiedDate = row.LastModifiedDate,
ServerLastModifiedDate = row.ServerLastModifiedDate
});
});
}
catch (Exception)
{
result = null;
}
return result;
}
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:28,代码来源:CatCondProRepository.cs
示例18: GetIsModified
public ObservableCollection<OperacionEstructuraModel> GetIsModified()
{
ObservableCollection<OperacionEstructuraModel> result = new ObservableCollection<OperacionEstructuraModel>();
try
{
using (var entity = new db_SeguimientoProtocolo_r2Entities())
(from res in entity.CAT_OPERACION_ESTRUCTURA
where res.IsModified == true
select res).ToList().ForEach(row =>
{
result.Add(new OperacionEstructuraModel()
{
IdOperacionEstructura = row.IdOperacionEstructura,
IdCondicion = row.IdCondicion,
IdEstructura = row.IdEstructura,
OperacionEstrucuturaName = row.OperacionEstrucuturaName,
IsActive = row.IsActive,
IsModified = row.IsModified,
LastModifiedDate = row.LastModifiedDate,
ServerLastModifiedDate = row.ServerLastModifiedDate
});
});
}
catch (Exception)
{
result = null;
}
return result;
}
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:29,代码来源:CatOperacionEstructuraRepository.cs
示例19: DeleteEstructuraDependencia
// Delete.
public void DeleteEstructuraDependencia(IEnumerable<Model.EstructuraDependenciaModel> estructuradependencias)
{
using (var entity = new db_SeguimientoProtocolo_r2Entities())
{
foreach (Model.EstructuraDependenciaModel p in estructuradependencias)
{
REL_ESTRUCTURA_DEPENDENCIA result = null;
try
{
result = (from o in entity.REL_ESTRUCTURA_DEPENDENCIA
where o.IdEstructuraDependencia == p.IdEstructuraDependencia
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,代码来源:EstructuraDependenciaRepository.cs
示例20: GetMenu
public IEnumerable<Model.MenuModel> GetMenu()
{
ObservableCollection<Model.MenuModel> Menu = new ObservableCollection<Model.MenuModel>();
using (var entity = new db_SeguimientoProtocolo_r2Entities())
{
try
{
(from o in entity.APP_MENU
where o.IsActive == true
select o).ToList().ForEach(p =>
{
Menu.Add(new Model.MenuModel()
{
IdMenu = p.IdMenu,
MenuName = p.MenuName,
IsLeaf = p.IsLeaf,
IsActive = p.IsActive,
IsModified = p.IsModified,
LastModifiedDate = p.LastModifiedDate
});
});
}
catch (Exception)
{
;
}
}
return Menu;
}
开发者ID:slytsal,项目名称:wpfsistemalluviasv2,代码行数:29,代码来源:MenuRepository.cs
注:本文中的db_SeguimientoProtocolo_r2Entities类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论