protected void Page_Load(object sender, EventArgs e) { string tjType = Request["type"]; string tjRegion = Request["region"]; string tjHeadId = Request["singleHeadId"]; string tjuserName = Request["userName"]; string tjtime = Request["time"]; string defaultWhere = ""; if (tjRegion != "null" && tjRegion != "" && tjRegion != null) { if (defaultWhere == "") { defaultWhere += "regionName='" + tjRegion + "'"; } else { defaultWhere += " and regionName='" + tjRegion + "'"; } } if (tjHeadId != "null" && tjHeadId != "" && tjHeadId != null) { if (defaultWhere == "") { defaultWhere += "singleHeadId='" + tjHeadId + "'"; } else { defaultWhere += " and singleHeadId='" + tjHeadId + "'"; } } if (tjuserName != "null" && tjuserName != "" && tjuserName != null) { if (defaultWhere == "") { defaultWhere += "userName='******'"; } else { defaultWhere += " and userName='******'"; } } if (tjtime != "null" && tjtime != "" && tjtime != null) { if (defaultWhere == "") { string[] sArray = tjtime.Split('至'); string startTime = sArray[0]; string endTime = sArray[1]; defaultWhere += "time BETWEEN '" + startTime + "' and '" + endTime + "'"; } else { string[] sArray = tjtime.Split('至'); string startTime = sArray[0]; string endTime = sArray[1]; defaultWhere += " and time BETWEEN '" + startTime + "' and '" + endTime + "'"; } } int type = 0; if (tjType == "CK") { type = 0; title = "接收组织"; } if (tjType == "RK") { type = 1; title = "入库来源"; } if (tjType == "TH") { type = 2; title = "接收组织"; } User user = (User)Session["user"]; string userId = user.UserId; DataSet ds = roleBll.selectRole(userId); string roleName = ds.Tables[0].Rows[0]["roleName"].ToString(); DataSet dataSet = warehousingBll.getKinds(type, defaultWhere); sjNum = dataSet.Tables[0].Rows[0]["pz"].ToString(); sbNum = dataSet.Tables[0].Rows[0]["sl"].ToString(); total = dataSet.Tables[0].Rows[0]["my"].ToString(); real = dataSet.Tables[0].Rows[0]["sy"].ToString(); //string time = "2018-10-10"; int region = user.ReginId.RegionId; if (roleName == "超级管理员") { isAdmin = true; } //getData(); //获取供应商 dsSupplier = bookbll.selectSupplier(); //获取组织 dsRegion = regionBll.select(); //获取制单员 dsUser = bookbll.selectZdy(); //获取来源组织/收货组织 dsSource = bookbll.selectSource(); string op = Request["op"]; if (op == "paging") { getData(); } }