|
|
@@ -77,22 +77,23 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
DataTable dt = OtherMySqlConn.dtable("SELECT Id FROM Users WHERE RealName like '%" + UserIdRealName + "%'");
|
|
|
var Count = dt.Rows.Count;
|
|
|
- int times = 0;
|
|
|
+ // int times = 0;
|
|
|
string UserIds = "";
|
|
|
foreach (DataRow item in dt.Rows)
|
|
|
{
|
|
|
- times++;
|
|
|
- if (times == Count)
|
|
|
- {
|
|
|
- UserIds += item["Id"].ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- UserIds += item["Id"].ToString() + ",";
|
|
|
- }
|
|
|
+ // times++;
|
|
|
+ // if (times == Count)
|
|
|
+ // {
|
|
|
+ // UserIds += item["Id"].ToString();
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // UserIds += item["Id"].ToString() + ",";
|
|
|
+ // }
|
|
|
+ UserIds += item["Id"].ToString() + ",";
|
|
|
}
|
|
|
// condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
|
|
|
- condition += " and UserId in (" + UserIds + ")";
|
|
|
+ condition += " and UserId in (" + UserIds.TrimEnd(',') + ")";
|
|
|
}
|
|
|
//仓库管理员真实姓名
|
|
|
|
|
|
@@ -100,22 +101,23 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
DataTable dts = OtherMySqlConn.dtable("SELECT Id FROM Users WHERE RealName like '%" + ManageUserIdRealName + "%'");
|
|
|
var Counts = dts.Rows.Count;
|
|
|
- int time = 1;
|
|
|
+ // int time = 1;
|
|
|
string UserIdss = "";
|
|
|
foreach (DataRow items in dts.Rows)
|
|
|
{
|
|
|
- time++;
|
|
|
- if (time == Counts)
|
|
|
- {
|
|
|
- UserIdss += items["Id"].ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- UserIdss += items["Id"].ToString() + ",";
|
|
|
- }
|
|
|
+ // time++;
|
|
|
+ // if (time == Counts)
|
|
|
+ // {
|
|
|
+ // UserIdss += items["Id"].ToString();
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // UserIdss += items["Id"].ToString() + ",";
|
|
|
+ // }
|
|
|
+ UserIdss += items["Id"].ToString() + ",";
|
|
|
}
|
|
|
// condition += " and ManageUserId in (select ManageUserId from UserForRealName where RealName='" + ManageUserIdRealName + "')";
|
|
|
- condition += " and UserId in (" + UserIdss + ")";
|
|
|
+ condition += " and UserId in (" + UserIdss.TrimEnd(',') + ")";
|
|
|
}
|
|
|
//仓库管理员手机号
|
|
|
if (!string.IsNullOrEmpty(ManageUserIdMobile))
|