public int InsertIntoLeaveEntity(LeaveInService l) { LeaveMessage lm = new LeaveMessage(); lm.IsRead = 0; lm.State = 0; lm.TimeStamp = DateTime.Now.Ticks; lm.UserId = l.UserId; lm.SendUserId = l.SendUserId; lm.ExamineOrExamineResult = l.ExamineOrExamineresult; lm.LeaveId = l.LeaveId; context.LeaveMessages.Add(lm); context.SaveChanges(); return(lm.Id); }
public int InsertIntoLeaveEntity(LeaveInService l) { LeaveMessage lm = new LeaveMessage(); lm.IsRead = 0; lm.State = 0; lm.TimeStamp = DateTime.Now.Ticks; lm.UserId = l.UserId; lm.SendUserId = l.SendUserId; lm.ExamineOrExamineResult = l.ExamineOrExamineresult; lm.LeaveId = l.LeaveId; context.LeaveMessages.Add(lm); context.SaveChanges(); return lm.Id; }