using DBUtility;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
public class Gy_ShiftsController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
const string ModCaption = "班次";
public const string ModRightName = "Gy_Shifts";
public const string ModRightNameAdd = ModRightName + "_Add"; //新增
public const string ModRightNameEdit = ModRightName + "_Edit"; //编辑
public const string ModRightNameCheck = ModRightName + "_Check"; //审核
public const string ModRightNameClose = ModRightName + "_Stop"; //禁用
public const string ModRightNameDelete = ModRightName + "_Delete"; //删除
public DataSet ds = new DataSet();
private json objJsonResult = new json();
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
DAL.ClsGy_Shifts_Ctl oBill = new DAL.ClsGy_Shifts_Ctl();
DAL.ClsGy_Shifts_View oBillHlp = new DAL.ClsGy_Shifts_View();
#region 班次列表
///
/// 获取班次列表信息
///
///
[Route("Gy_ShiftsController/GetGy_ShiftsList_Json")]
[HttpGet]
public object GetGy_ShiftsList_Json(string sWhere, string HMaker, string OperationType)
{
try
{
//判断权限
if (OperationType == "1")
{
//判断权限
if (!DBUtility.ClsPub.Security_Log(ModRightName, 3, false, HMaker))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "您没有该模块权限,请与管理员联系!";
objJsonResult.data = null;
return objJsonResult;
}
}
//返回列表信息
ds = oCn.RunProcReturn("select * from h_v_Gy_ShiftsList where " + sWhere + " order by " + ModCaption + "代码" , "h_v_Gy_ShiftsList");
List