示例#1
0
 public JsonResult GetSalary(int id, float value, string employeeType)
 {
     if (id > 0)
     {
         EmployeeType.TryParse(employeeType, out EmployeeType type);
         var res    = employeeFactory.CalculateSalary(type);
         var result = res.calculateSalary(id, value);
         return(Json(result));
     }
     else
     {
         return(Json(""));
     }
 }