protected bool PrepareFilter() { bool filter = false; var qs = new Logic.QueryString(); var querySystem = Request.QueryString["System"]; if (!string.IsNullOrWhiteSpace(querySystem)) { SelectSystem = qs.GetSystemIdString(Server.UrlDecode(querySystem)); if (!string.IsNullOrEmpty(SelectSystem)) { filter = true; } } if (string.IsNullOrWhiteSpace(SelectSystem)) { var queryBranch = Request.QueryString["Branch"]; if (!string.IsNullOrWhiteSpace(queryBranch)) { var sysBranchId = qs.GetSystemBranchIdStrings(queryBranch); if (sysBranchId != null) { SelectSystem = sysBranchId.Item1; SelectLibrary = sysBranchId.Item2; if (!string.IsNullOrEmpty(SelectSystem) || !string.IsNullOrEmpty(SelectLibrary)) { filter = true; } } } } var querySearch = Request.QueryString["Search"]; if (!string.IsNullOrWhiteSpace(querySearch)) { filter = true; if (querySearch.Length > 255) { SearchText.Text = querySearch.Substring(0, 255); } else { SearchText.Text = querySearch; } } return(filter); }
protected bool PrepareFilter() { bool filter = false; var qs = new Logic.QueryString(); var querySystem = Request.QueryString["System"]; if (!string.IsNullOrWhiteSpace(querySystem)) { SelectSystem = qs.GetSystemIdString(Server.UrlDecode(querySystem)); if (!string.IsNullOrEmpty(SelectSystem)) { filter = true; } } if (string.IsNullOrWhiteSpace(SelectSystem)) { var queryBranch = Request.QueryString["Branch"]; if (!string.IsNullOrWhiteSpace(queryBranch)) { var sysBranchId = qs.GetSystemBranchIdStrings(queryBranch); if (sysBranchId != null) { SelectSystem = sysBranchId.Item1; SelectLibrary = sysBranchId.Item2; if (!string.IsNullOrEmpty(SelectSystem) || !string.IsNullOrEmpty(SelectLibrary)) { filter = true; } } } } var querySearch = Request.QueryString["Search"]; if (!string.IsNullOrWhiteSpace(querySearch)) { filter = true; if (querySearch.Length > 255) { SearchText.Text = querySearch.Substring(0, 255); } else { SearchText.Text = querySearch; } } return filter; }