Пример #1
0
        public void EditLeave(LeaveDetail objasp)
        {
            var leave = context.LeaveDetails.Where(x => x.EventId == objasp.EventId).SingleOrDefault();

            leave.StartDate   = objasp.StartDate;
            leave.EndDate     = objasp.EndDate;
            leave.Description = objasp.Description;
            leave.Status      = objasp.Status;
            context.SaveChanges();
        }
Пример #2
0
 public void CreateLeave(LeaveDetail objLeaveDetail)
 {
     context.LeaveDetails.Add(objLeaveDetail);
     context.SaveChanges();
 }