1
duhe
2024-10-25 1882724680a814ac569318cd4998c3d4ffcc4560
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_ProcPriceRequestBillController.cs
@@ -82,6 +82,61 @@
        }
        #endregion
        #region å®šé¢ç”³è¯·å•列表分页列表
        [Route("Pay_ProcPriceRequestBillController/page")]
        [HttpGet]
        public json Pay_ProcPriceRequestBillPage(string sWhere, string user, int page, int size)
        {
            DataSet ds;
            json res = new json();
            try
            {
                List<object> columnNameList = new List<object>();
                //判断权限
                if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "您没有该模块权限,请与管理员联系!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn("exec h_p_Pay_ProcPriceRequestBillList " + page + "," + size + ",''", "h_p_Pay_ProcPriceRequestBillList");
                }
                else
                {
                    ds = oCn.RunProcReturn("exec h_p_Pay_ProcPriceRequestBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Pay_ProcPriceRequestBillList");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                res.code = CodeConstant.SUCCEED;
                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                res.Message = "Sucess!";
                res.list = columnNameList;
                res.data = ds.Tables[0];
                return res;
            }
            catch (Exception e)
            {
                res.code = CodeConstant.FAIL;
                res.count = CountConstant.FAIL;
                res.Message = "Exception!" + e.ToString();
                res.data = null;
                return res;
            }
        }
        #endregion
        #region å®šé¢ç”³è¯·å•删除
        /// <summary>
        /// åˆ é™¤å®šé¢ç”³è¯·å•