| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥ç¨é¡¹ç® 䏿¨(é¶æ®µæ±æ¥)-页颿¾ç¤º |
| | | [Route("PM_ProjectBill/set_ProjectReport")] |
| | | [HttpGet] |
| | | public object ProjectBill_ProjectReport(string HInterID, string HProjectStageID, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | List<DataTable> tables = new List<DataTable>(); |
| | | //æ¥çæé |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //è·åè¡¨å¤´ä¿¡æ¯ |
| | | string sql = "exec h_p_PM_ProjectBill_setProjectReport " + HInterID + "," + HProjectStageID; |
| | | ds = oCN.RunProcReturn(sql, "h_p_PM_ProjectBill_setProjectReport"); |
| | | tables.Add(ds.Tables[0]); |
| | | tables.Add(ds.Tables[1]); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "对åºé¡¹ç®é¶æ®µä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[1].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 = tables; |
| | | 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("PM_ProjectBill/set_WorkTaskReport")] |
| | | [HttpGet] |
| | | public object ProjectBill_WorkTaskReport(string HInterID, string HProjectStageID, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | List<DataTable> tables = new List<DataTable>(); |
| | | //æ¥çæé |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //è·åè¡¨å¤´ä¿¡æ¯ |
| | | string sql = "exec h_p_PM_ProjectBill_setWorkTaskReport " + HInterID + "," + HProjectStageID; |
| | | ds = oCN.RunProcReturn(sql, "h_p_PM_ProjectBill_setWorkTaskReport"); |
| | | tables.Add(ds.Tables[0]); |
| | | tables.Add(ds.Tables[1]); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[1].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 = tables; |
| | | 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 |
| | | } |
| | | } |