1234567891011121314151617181920212223242526272829303132333435363738 |
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- 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]
- [Authorize]
- public class CalMonthController : ControllerBase
- {
- spDbContext Context;
- public CalMonthController(spDbContext context)
- {
- Context = context;
- }
- public CalMonth GetHandlingMonth()
- {
- CalMonth calMonth= Context.CalMonths.Where<CalMonth>(c => c.Status != 4).FirstOrDefault();
- if(calMonth== null)
- {
- return null;
- }
- else
- {
- return calMonth;
- }
- }
- }
- }
|