123456789101112131415161718192021222324252627282930313233343536 |
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.EntityFrameworkCore;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using wispro.sp.entity;
- namespace wispro.sp.api.Controllers
- {
- [Route("api/[controller]/[action]")]
- [ApiController]
- public class AppealController : ControllerBase
- {
- spDbContext Context;
- public AppealController(spDbContext context)
- {
- Context = context;
- }
- public List<AppealType> GetAppealTypes()
- {
- return Context.AppealTypes.ToList();
- }
- public List<InputField> GetInputField(int appealTypeId,int state)
- {
- return Context.InputFields
- .Where<InputField>(ip => ip.AppealTypeId == appealTypeId && ip.AppealState == state)
- .Include(p=>p.SelectValues)
- .ToList();
- }
- }
- }
|