Exemplo n.º 1
0
        public static SalaryAllowanceModel Create(SalaryAllowanceModel model)
        {
            var entity = new sal_SalaryAllowance();

            model.FillEntity(ref entity);
            return(new SalaryAllowanceModel(sal_SalaryAllowanceServices.Create(entity)));
        }
Exemplo n.º 2
0
        public static SalaryAllowanceModel Update(SalaryAllowanceModel model)
        {
            var entity = sal_SalaryAllowanceServices.GetById(model.Id);

            if (entity == null)
            {
                return(null);
            }
            model.EditedDate = DateTime.Now;
            model.FillEntity(ref entity);
            return(new SalaryAllowanceModel(sal_SalaryAllowanceServices.Update(entity)));
        }