|  |  |  | 
|---|
|  |  |  | using DBUtility; | 
|---|
|  |  |  | using Newtonsoft.Json; | 
|---|
|  |  |  | using Newtonsoft.Json.Linq; | 
|---|
|  |  |  | using System; | 
|---|
|  |  |  | using System.Collections.Generic; | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | List<object> columnNameList = new List<object>(); | 
|---|
|  |  |  | //编辑权限 | 
|---|
|  |  |  | //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldRepairChangeBillList", 1, false, user)) | 
|---|
|  |  |  | //{ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = Get_GG_NoticeBillList(sWhere); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //添加列名 | 
|---|
|  |  |  | 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列对象的列名 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
|---|
|  |  |  | //{ | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = "Sucess!"; | 
|---|
|  |  |  | objJsonResult.data = ds.Tables[0]; | 
|---|
|  |  |  | objJsonResult.list = columnNameList; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | //} | 
|---|
|  |  |  | //else | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static DataSet Get_GG_NoticeBillList(string sWhere) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" + | 
|---|
|  |  |  | " from OA_InformBillMain A inner join  OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere+ "  order by HInterID desc"; | 
|---|
|  |  |  | var sql = "select A.HInterID 主内码,b.HEntryID 子内码,A.HBillNo 单据号,A.HContext 主题,A.HDeptID,D.HName 发送部门, A.HSendMan 发送人, B.HReceiveMan 接收人,A.HLevel 紧急程度,A.HDescription 详细内容,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end 状态, A.HMaker 制单人,A.HMakeDate 制单日期,A.HUpDater 修改人,A.HUpDateDate 修改日期" + | 
|---|
|  |  |  | " from OA_InformBillMain A inner join  OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere+ "  order by 主内码 desc"; | 
|---|
|  |  |  | return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|