예제 #1
0
        public ActionResult CreateSalary(string Code = "", string EmployeeCode = "", float BasicSalary = 0, bool Active = true, string Description = "")
        {
            var salary = salaryRepository.GetByCode(Code) == null ? new OnPointSport.Core.Domain.Salary() : salaryRepository.GetByCode(Code);

            salary.Code         = salary.Id == 0 ? GetCode() : Code;
            salary.EmployeeCode = EmployeeCode;
            salary.BasicSalary  = BasicSalary;
            salary.Active       = Active;
            salary.Description  = Description;

            salaryRepository.Save(salary);
            return(Json(JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public SalaryInfo GetByCode(string salaryCode)
        {
            SalaryEntity salaryEntity = _salaryRepository.GetByCode(salaryCode);

            return(Map(salaryEntity));
        }