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; namespace WebAPI.Controllers { //采购退料单 public class Kf_POStockInBackBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; #region 采购退料单列表 [Route("Kf_POStockInBackBill/Get_POStockInBackBillList")] [HttpGet] public object Get_POStockInBackBillList(string sWhere,string user) { try { //判断是否有查询权限 if (!DBUtility.ClsPub.Security_Log("Cg_PurchaseReturnBill_Query", 1,false,user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查询权限!"; objJsonResult.data = null; return objJsonResult; } ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBackBillList " + sWhere + " order by 日期 desc", "h_v_Kf_POStockInBackBillList"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "返回记录成功!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception ex) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有返回任何记录!" + ex.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion } }