|  |  | 
 |  |  |         public DAL.ClsGy_MaterPreventErrMouldBillMain BillOld = new DAL.ClsGy_MaterPreventErrMouldBillMain(); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         #region 产品防错验证清单列表 查询 只显示主表       | 
 |  |  |         [Route("Gy_MaterPreventErrMouldBill/getGy_MaterPreventErrMouldBillMainList_Main")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object getGy_MaterPreventErrMouldBillMainList_Main(string sWhere, string user) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 List<object> columnNameList = new List<object>(); | 
 |  |  |  | 
 |  |  |                 //查看权限 | 
 |  |  |                 if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterPreventErrMouldBillMain_Check", 1, false, user)) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "查询失败!无权限!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn("select * from h_v_Gy_MaterPreventErrMouldBillMainList_Main order by 单据号 desc", "h_v_Gy_MaterPreventErrMouldBillMainList_Main"); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     string sql1 = "select * from  h_v_Gy_MaterPreventErrMouldBillMainList_Main  where 1 = 1 "; | 
 |  |  |                     string sql = sql1 + sWhere + " order by 单据号 desc"; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterPreventErrMouldBillMainList_Main"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //添加列名 | 
 |  |  |                 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列对象的列名 | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 objJsonResult.list = columnNameList; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "Exception!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 产品防错验证清单列表 查询        | 
 |  |  |         [Route("Gy_MaterPreventErrMouldBill/getGy_MaterPreventErrMouldBillMainList")] | 
 |  |  |         [HttpGet] |