using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
using System.Windows.Forms;
using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
public class Pay_ErrWorkTimesRequestBillController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
public const string ModName = "2231"; //单据类型
public const string ModCaption = "异常工时申请单"; //单据名称
public const string ModRightName = "Pay_ErrWorkTimesRequestBill";
public const string ModRightNameList = ModRightName + "List"; //列表
public const string ModRightNameEdit = ModRightName + "_Edit"; //编辑
public const string ModRightNameCheck = ModRightName + "_Check"; //审核
public const string ModRightNameClose = ModRightName + "_Close"; //关闭
public const string ModRightNameDelete = ModRightName + "_Delete"; //作废
public const string ModRightNameDrop = ModRightName + "_Drop"; //删除
public const string ModRightNameMoney = ModRightName + "_Money"; //金额
public const string ModRightNameQty = ModRightName + "_Qty"; //数量
public DataSet ds = new DataSet();
private json objJsonResult = new json();
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
public DAL.ClsPay_ErrWorkTimesRequestBill oBill = new DAL.ClsPay_ErrWorkTimesRequestBill();
#region 异常工时申请单列表
///
/// 获取异常工时申请单列表信息
///
///
[Route("Pay_ErrWorkTimesRequestBillController/GetPay_ErrWorkTimesRequestBillList_Json")]
[HttpGet]
public object GetPay_ErrWorkTimesRequestBillList_Json(string sWhere, string HMaker)
{
try
{
//判断权限
if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "您没有该模块权限,请与管理员联系!";
objJsonResult.data = null;
return objJsonResult;
}
//返回列表信息
ds = oCn.RunProcReturn("select * from h_v_Pay_ErrWorkTimesRequestBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_Pay_ErrWorkTimesRequestBillList");
List