| | |
| | | |
| | | #endregion |
| | | |
| | | #region æçé¡¹ç® æ¥è¯¢ |
| | | /// <summary> |
| | | /// æçé¡¹ç®æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | [Route("PM_ReportController/PM_ProjectBillMYList")] |
| | | [HttpGet] |
| | | public object PM_ProjectBillMYList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("PM_ProjectBillMainMy_Query", 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_PM_ProjectBillMYList order by åæ®å· desc", "h_v_PM_ProjectBillMYList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_PM_ProjectBillMYList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_PM_ProjectBillMYList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | 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 |
| | | |
| | | #endregion |
| | | |