/// <summary> /// Save EmployeeRoleByTypes /// </summary> /// <param name="EmployeeRoleByTypeList"></param> /// <returns></returns> // POST: api/EmployeeRoleByTypeC:\Work\LRP\AngWeb\Controllers\EmployeeRoleByTypeController.cs public IHttpActionResult Post([FromBody] List <EmployeeRoleByType> EmployeeRoleByTypeList, int employeeRoleTypeID) { EmployeeRoleByTypeRepository EmployeeRoleByTypeRepository = new EmployeeRoleByTypeRepository(Convert.ToInt32(Request.Headers.GetValues("CurrentUserID").First())); EmployeeRoleByTypeRepository.SaveEmployeeRoleByTypes(EmployeeRoleByTypeList, employeeRoleTypeID); return(Json(new { count = EmployeeRoleByTypeList.Count.ToString() })); }
/// <summary> /// Get EmployeeRoleByTypes /// </summary> /// <returns></returns> // GET: api/EmployeeRoleByType public IHttpActionResult Get(bool list, int employeeRoleTypeID) { EmployeeRoleByTypeRepository EmployeeRoleByTypeRepository = new EmployeeRoleByTypeRepository(Convert.ToInt32(Request.Headers.GetValues("CurrentUserID").First())); List <BaseList> EmployeeRoleByTypeList = EmployeeRoleByTypeRepository.GetEmployeeRoleByTypesList(employeeRoleTypeID); return(Json(new { EmployeeRoleByTypesList = EmployeeRoleByTypeList })); }