| | |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region æ£è¡¥é¡¹ç®è´¹ç¨å_è´¹ç¨æ¨ªåæ¾ç¤º è·åæ£è¡¥é¡¹ç® |
| | | [Route("Pay_DuSubsidyItemBill_KS/getInitGrid_KS")] |
| | | [HttpGet] |
| | | public object getInitGrid_KS() |
| | | { |
| | | try |
| | | { |
| | | //è·åæªç¦ç¨çæ£è¡¥é¡¹ç® |
| | | string sql = "select * from Gy_DuSubsidyItem where HStopFlag = 0"; |
| | | ds = oCN.RunProcReturn(sql, "Gy_DuSubsidyItem"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¾å°ç¸å
³æ£è¡¥é¡¹ç®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å¤çæ£è¡¥é¡¹ç® |
| | | List<object> columnNameList = new List<object>(); |
| | | for(int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | string field = ds.Tables[0].Rows[i]["HItemID"].ToString(); |
| | | string title = ds.Tables[0].Rows[i]["HName"].ToString(); |
| | | string dataType = "decimal(18,2)"; |
| | | string ColmString = "{\"field\":\"" + field + "\",\"title\":\"" + title + "\",\"dataType\":\"" + dataType + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | 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 |
| | | } |
| | | } |