Ejemplo n.º 1
0
 public IEnumerable <ProjectFile> GetProjectFileList()
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.FindAll <ProjectFile>());
     }
 }
Ejemplo n.º 2
0
 public void AddVlaueProjectInfo(ValueProjectInfo role)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Insert <ValueProjectInfo>(role);
     }
 }
Ejemplo n.º 3
0
 public void UpdateVlaueProjectInfo(ValueProjectInfo role)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Update <ValueProjectInfo>(role);
     }
 }
Ejemplo n.º 4
0
 public IList <DeviceStateModel> GetStateList()
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.FindAll <DeviceStateModel>());
     }
 }
Ejemplo n.º 5
0
 public IEnumerable <ValueProjectInfo> GetVlaueProjectInfoList()
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.FindAll <ValueProjectInfo>());
     }
 }
Ejemplo n.º 6
0
 public ValueProjectInfo GetVlaueProjectInfo(int id)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.ValueProjectInfo.Where(c => c.ID == id).SingleOrDefault());
     }
 }
Ejemplo n.º 7
0
 public void UpdateProjectFile(ProjectFile role)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Update <ProjectFile>(role);
     }
 }
Ejemplo n.º 8
0
 public void AddProjectFile(ProjectFile role)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Insert <ProjectFile>(role);
     }
 }
Ejemplo n.º 9
0
 public void InsertState(DeviceStateModel state)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Insert <DeviceStateModel>(state);
     }
 }
Ejemplo n.º 10
0
 public DeviceStateModel Select(int id)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.DeviceState.Where(u => u.ID == id).SingleOrDefault());
     }
 }
Ejemplo n.º 11
0
 public ProjectFile GetProjectFile(int id)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.ProjectFile.Where(c => c.ID == id).SingleOrDefault());
     }
 }
Ejemplo n.º 12
0
 public void UpdateConsultBasicInfo(ConsultBasicInfo role)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Update <ConsultBasicInfo>(role);
     }
 }
Ejemplo n.º 13
0
 public void AddConsultBasicInfo(ConsultBasicInfo role)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Insert <ConsultBasicInfo>(role);
     }
 }
Ejemplo n.º 14
0
 public IEnumerable <ConsultBasicInfo> GetConsultBasicInfoList()
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.FindAll <ConsultBasicInfo>());
     }
 }
Ejemplo n.º 15
0
 public ConsultBasicInfo GetConsultBasicInfo(int id)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         return(dbContext.ConsultBasicInfo.Where(c => c.ID == id).SingleOrDefault());
     }
 }
Ejemplo n.º 16
0
 public void UpDateState(DeviceStateModel state)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.Update <DeviceStateModel>(state);
     }
 }
Ejemplo n.º 17
0
 public void DeleteConsultBasicInfo(List <int> ids)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.ConsultBasicInfo.Where(u => ids.Contains(u.ID)).ToList().ForEach(a => { dbContext.ConsultBasicInfo.Remove(a); });
         dbContext.SaveChanges();
     }
 }
Ejemplo n.º 18
0
 public void DeleteState(List <int> ids)
 {
     using (var dbContext = new DKLManagerDbContext())
     {
         dbContext.DeviceState.Where(u => ids.Contains(u.ID)).ToList().ForEach(a => { dbContext.DeviceState.Remove(a); });
         dbContext.SaveChanges();
     }
 }