| | |
| | | } |
| | | 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() + ")"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //sWhere = " and 1=1 "; |
| | | sWhere = " and HCusID in (select hcusid from Gy_UserCustomerRelation Where HUserID = '" + CurUserID + "') "; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |