| | |
| | | string HProcID = item["HProcID"].ToString();//工序ID |
| | | string HUserID = item["用户代码"].ToString();//用户代码 |
| | | string czymc = item["用户名称"].ToString();//用户名称 |
| | | string HNumber = item["工序代码"].ToString();//供应商代码 |
| | | string HName = item["工序名称"].ToString();//供应商名称 |
| | | string HNumber = item["工序代码"].ToString();//工序代码 |
| | | string HName = item["工序名称"].ToString();//工序名称 |
| | | |
| | | var ds = oCN.RunProcReturn("select * from Gy_UserByProcess where HProcID='" + HProcID + "'and HUserID='" + HUserID + "'", "Gy_UserByProcess"); |
| | | |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 用户关联工序列表查询 |
| | | [Route("Xt_User/UserProcesslist")] |
| | | [HttpGet] |
| | | public object UserProcesslist(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | |
| | | string sql1 = "select * from h_v_Gy_UserProcess where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by 用户代码 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_UserProcess"); |
| | | |
| | | //添加列名 |
| | | 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 |
| | | } |
| | | } |