using DBUtility;
using Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
namespace WebAPI.Controllers.工资管理.工资单
{
public class Pay_PayMentBillController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
public const string ModName = "2202"; //单据类型
public const string ModCaption = "工资单"; //单据名称
public const string ModRightName = "Pay_PayMentBill";
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_PayMentBill oBill = new DAL.ClsPay_PayMentBill();
public DAL.ClsPay_PayMentBill BillOld = new DAL.ClsPay_PayMentBill();
#region 工资单列表
///
/// 获取工资单列表信息
///
///
[Route("Pay_PayMentBillController/GetPay_PayMentBillList_Json")]
[HttpGet]
public object GetPay_PayMentBillList_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_PayMentBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_Pay_PayMentBillList");
List