示例#1
0
        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);
        }
示例#2
0
        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;
        }