コード例 #1
0
        public bool update(int?id, ApprovalParam approvalParam)
        {
            var       result   = 0;
            Approvals approval = Get(id);

            approval.approval_status = approvalParam.approval_status;
            result = _context.SaveChanges();
            if (result > 0)
            {
                status = true;
            }
            return(status);
        }
コード例 #2
0
 public bool Insert(ApprovalParam approvalParam)
 {
     if (approvalParam == null)
     {
         Console.WriteLine("Insert Name");
         Console.Read();
     }
     else
     {
         status = _approvalRepository.Insert(approvalParam);
         Console.WriteLine("Success");
     }
     return(status);
 }
コード例 #3
0
        public bool Update(int?Id, ApprovalParam approvalParam)
        {
            var result = 0;
            var get    = Get(Id);

            get.Approval_Status = approvalParam.Approval_Status;
            result = myContext.SaveChanges();
            if (result > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #4
0
        public bool insert(ApprovalParam approvalParam)
        {
            var result = 0;

            approval.employee_id     = approvalParam.employee_id;
            approval.overtime_id     = approvalParam.overtime_id;
            approval.reason          = approvalParam.reason;
            approval.approval_status = approvalParam.approval_status;
            approval.isDelete        = false;
            _context.Approvals1.Add(approval);
            result = _context.SaveChanges();
            if (result > 0)
            {
                status = true;
            }
            return(status);
        }
コード例 #5
0
        public bool Insert(ApprovalParam approvalParam)
        {
            var result   = 0;
            var approval = new Approval();

            approval.Approval_Status = approvalParam.Approval_Status;
            myContext.Approvals.Add(approval);
            result = myContext.SaveChanges();
            if (result > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #6
0
 public bool update(int?id, ApprovalParam approvalParam)
 {
     return(_approvalRepository.update(approvalParam.Id, approvalParam));
 }
コード例 #7
0
 public bool insert(ApprovalParam approvalParam)
 {
     return(_approvalRepository.insert(approvalParam));
 }
コード例 #8
0
 public bool insert(ApprovalParam approvalParam)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
        public async Task <IHttpActionResult> Approve(ApprovalParam model)
        {
            var data = await Task.Run(() => Entities.ApproveRunwayInspectionChecklist(model.date, model.time, model.approved));

            return(Ok(data));
        }
コード例 #10
0
 public bool Update(int?Id, ApprovalParam approvalParam)
 {
     throw new NotImplementedException();
 }