Exemplo n.º 1
0
 partial void DeleteSeatHistory(SeatHistory instance);
Exemplo n.º 2
0
 partial void UpdateSeatHistory(SeatHistory instance);
Exemplo n.º 3
0
 partial void InsertSeatHistory(SeatHistory instance);
Exemplo n.º 4
0
 public mSeat SeatUpdateByuser(mSeat upseat, int userId)
 {
     Seat seat = seat_repo.Get(d => d.id == upseat.Id);
     upseat.ToDb(seat);
     var seathistory = seathist_repo.GetMulti(d => d.seatName == seat.name && d.endTime == null);
     foreach (SeatHistory item in seathistory) {
         item.endTime = DateTime.Now;
     }
     SeatHistory seathist = new SeatHistory {
         seatName = seat.name,
         startTime = DateTime.Now,
         userName = user_repo.Get(d => d.id == userId).name,
         cache = seat.cache
     };
     seathist_repo.Add(seathist);
     SubmitChanges();
     return new mSeat(seat);
 }
Exemplo n.º 5
0
 public SeatHistory ToDb(SeatHistory upseathis)
 {
     if (!string.IsNullOrEmpty(Cache)) upseathis.cache = Cache;
     upseathis.seatName = SeatName;
     upseathis.userName = UserName;
     if (StartTime.HasValue) upseathis.startTime = StartTime.Value;
     if (EndTime.HasValue) upseathis.endTime = EndTime.Value;
     return upseathis;
 }
Exemplo n.º 6
0
 public mSeatHistory(SeatHistory s)
 {
     Id = s.id;
     SeatName = s.seatName;
     Cache = s.cache;
     StartTime = s.startTime;
     EndTime = s.endTime;
     UserName = s.userName;
 }