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_OutApplyBillController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
public const string ModName = "2221"; //单据类型
public const string ModCaption = "请假申请单"; //单据名称
public const string ModRightName = "Pay_OutApplyBill";
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_OutApplyBill oBill = new DAL.ClsPay_OutApplyBill();
public DAL.ClsPay_OutApplyBill BillOld = new DAL.ClsPay_OutApplyBill();
#region 请假申请单列表
///
/// 获取请假申请单列表信息
///
///
[Route("Pay_OutApplyBillController/GetPay_OutApplyBillList_Json")]
[HttpGet]
public object GetPay_OutApplyBillList_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_OutApplyBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_Pay_OutApplyBillList");
List