Exemplo n.º 1
0
 public void LeaveApproving(Models.LeaveApproval value)
 {
     Models.LeaveApprovalStatus ApprovalStatus = Models.LeaveApprovalStatus.Approved;
     if (value.IsRequireFurtherApproval == true)
     {
         ApprovalStatus = Models.LeaveApprovalStatus.PartiallyApproved;
         Repository.executeINsertOrUpdateSP("UpdateLeaveRequest", new { id = value.id, ApprovalStatus = ApprovalStatus, userid = value.TeacherId, RejectionReason = value.RejectionReason });
     }
     Repository.executeINsertOrUpdateSP("UpdateLeaveRequestForPrincipal", new { id = value.id, ApprovalStatus = ApprovalStatus, userid = value.TeacherId, RejectionReason = value.RejectionReason });
 }
Exemplo n.º 2
0
        public void LeaveRequestSubmission(Models.LeaveApproval value)
        {
            int  TotalDaysLeave           = value.FromDate.Day - value.ToDate.Day;
            bool IsRequireFurtherApproval = false;

            if (TotalDaysLeave > 10)
            {
                IsRequireFurtherApproval = true;
            }
            Repository.executeINsertOrUpdateSP("LeaveRequestMarking", new { studentid = value.StudentId, FromDate = value.FromDate, ToDate = value.ToDate, ApprovalStatus = Models.LeaveApprovalStatus.Pending, IsRequireFurtherApproval = IsRequireFurtherApproval, LeaveReason = value.LeaveReason });
        }
Exemplo n.º 3
0
 // PUT api/values/5
 public void Put(int id, [FromBody] Data value)
 {
     Models.LeaveApproval  leaveapprovalrequest = value.gettingleaveapproval;
     Helpers.LeaveApproval leaveapproval        = new Helpers.LeaveApproval();
     leaveapproval.LeaveApproving(leaveapprovalrequest);
 }
Exemplo n.º 4
0
 // POST api/values
 public void Post([FromBody] Data value)
 {
     Models.LeaveApproval  leaveapprovalrequest = value.gettingleaveapproval;
     Helpers.LeaveApproval leaveapproval        = new Helpers.LeaveApproval();
     leaveapproval.LeaveRequestSubmission(leaveapprovalrequest);
 }