コード例 #1
0
        public Boolean Update(Dependent current)
        {
            IPayrollRepository repo = GetRepository();

            Dependent original = repo.GetDependentById(current.Id);

            if (original != null)
            {
                current.RelationshipId = original.RelationshipId;

                return(repo.Update(current, original));
            }

            return(false);
        }
コード例 #2
0
        // PUT api/Employee
        public Boolean Update(Employee current)
        {
            IPayrollRepository repo = GetRepository();

            Employee original = repo.GetEmployeeById(current.Id);

            if (original != null)
            {
                current.BenefitPlanId = original.BenefitPlanId;
                current.MonthlyGross  = original.MonthlyGross;
                current.PayCycleId    = original.PayCycleId;

                return(repo.Update(current, original));
            }

            return(false);
        }
コード例 #3
0
 public void Update(IPayrollModel model)
 {
     ValidateModelDataAnnotations(model);
     repository.Update(model);
 }