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)); }
public SalaryInfo GetByCode(string salaryCode) { SalaryEntity salaryEntity = _salaryRepository.GetByCode(salaryCode); return(Map(salaryEntity)); }