| | |
| | | updateliaotian.Problemtype = liaotian.Problemtype; |
| | | updateliaotian.Shiyongfatiao = liaotian.Shiyongfatiao; |
| | | updateliaotian.ChushuStatus = liaotian.ChushuStatus; |
| | | updateliaotian.Shenheer = liaotian.Shenheer; |
| | | updateliaotian.Shenhetime = liaotian.Shenhetime; |
| | | } |
| | | |
| | | _context.SaveChanges(); |
| | |
| | | Problemtype = a.Problemtype, |
| | | Shiyongfatiao = a.Shiyongfatiao, |
| | | ChushuStatus= a.ChushuStatus, |
| | | Shenheer = a.Shenheer, |
| | | Shenhetime = a.Shenhetime, |
| | | } |
| | | ) |
| | | .Distinct() .OrderByDescending(x => x.Modifytime).ToList(); |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | public ResultEntity saveSysUpdatetime(SysUpdatetime sysUpdatetime) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | try |
| | | { |
| | | |
| | | |
| | | if (String.IsNullOrEmpty(sysUpdatetime.Id)) |
| | | { |
| | | sysUpdatetime.Id = Guid.NewGuid().ToString(); |
| | | _context.SysUpdatetimes.Add(sysUpdatetime); |
| | | } |
| | | else |
| | | { |
| | | var updateliaotian = _context.SysUpdatetimes.Find(sysUpdatetime.Id); |
| | | updateliaotian.Updatename = sysUpdatetime.Updatename; |
| | | updateliaotian.Updatetime = sysUpdatetime.Updatetime; |
| | | |
| | | } |
| | | |
| | | _context.SaveChanges(); |
| | | resultEntity.ReturnID = sysUpdatetime.Id; |
| | | resultEntity.Result = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "保存失败,请联系管理员"; |
| | | |
| | | } |
| | | return resultEntity; |
| | | } |
| | | |
| | | public SysUpdatetime GetSysUpdatetime(string updatename) |
| | | { |
| | | |
| | | var entity = _context.SysUpdatetimes.Where(x=>x.Updatename == updatename).FirstOrDefault(); |
| | | |
| | | return entity; |
| | | } |
| | | } |
| | | } |