CalMonthController.cs 647 B

123456789101112131415161718192021222324252627
  1. using Microsoft.AspNetCore.Http;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Threading.Tasks;
  7. using wispro.sp.entity;
  8. namespace wispro.sp.api.Controllers
  9. {
  10. [Route("api/[controller]/[action]")]
  11. [ApiController]
  12. public class CalMonthController : ControllerBase
  13. {
  14. spDbContext Context;
  15. public CalMonthController(spDbContext context)
  16. {
  17. Context = context;
  18. }
  19. public CalMonth GetHandlingMonth()
  20. {
  21. return Context.CalMonths.Where<CalMonth>(c => c.Status != 4).FirstOrDefault();
  22. }
  23. }
  24. }