| | |
| | | } |
| | | else |
| | | { |
| | | //string sql = "select * from Gy_UserCustomerRelation where HUserID = '" + CurUserID + "'"; |
| | | //ds = oCN.RunProcReturn(sql, "Gy_UserCustomerRelation"); |
| | | //if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // sWhere = " and 1 = 0"; |
| | | //} |
| | | //else |
| | | //{ |
| | | // sWhere = " and HCusID in ("; |
| | | // for(var i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | // { |
| | | // if (i < ds.Tables[0].Rows.Count - 1) |
| | | // { |
| | | // sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ","; |
| | | // } |
| | | // else |
| | | // { |
| | | // sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ")"; |
| | | // } |
| | | // } |
| | | //} |
| | | string sql = "select * from Gy_UserCustomerRelation where HUserID = '" + CurUserID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "Gy_UserCustomerRelation"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sWhere = " and 1 = 0"; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " and HCusID in ("; |
| | | for (var i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (i < ds.Tables[0].Rows.Count - 1) |
| | | { |
| | | sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ","; |
| | | } |
| | | else |
| | | { |
| | | sWhere += ds.Tables[0].Rows[i]["HCusID"].ToString() + ")"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | sWhere = " and 1=1 "; |
| | | //sWhere = " and 1=1 "; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | List<object> columnNameList1 = new List<object>(); |
| | | List<object> columnNameList2 = new List<object>(); |
| | | List<object> columnNameList3 = new List<object>(); |
| | | List<object> columnNameList4 = new List<object>(); |
| | | |
| | | string sql = "exec h_p_Xs_SeOrderBill_lookdown " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, "h_p_Xs_SeOrderBill_lookdown"); |
| | |
| | | columnNameList3.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | //添加 工序流转卡 列名 |
| | | foreach (DataColumn col in ds.Tables[4].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList4.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | columnNameListSum.Add(columnNameList0); |
| | | columnNameListSum.Add(columnNameList1); |
| | | columnNameListSum.Add(columnNameList2); |
| | | columnNameListSum.Add(columnNameList3); |
| | | columnNameListSum.Add(columnNameList4); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |