private void DoBusOrgSearch(string searchString) { bool activeOnly = false; string[] args = searchString.Split('~'); if (args.Length > 1 && args[1] == "A") { activeOnly = true; } totalRowCount = 0; orgList = SQMModelMgr.SearchBusOrgList(entities, SessionManager.SessionContext.ActiveCompany().COMPANY_ID, args[0], activeOnly); gvBusOrgList.DataSource = orgList; gvBusOrgList.DataBind(); SetGridViewDisplay(gvBusOrgList, lblBusOrgListEmpty, divGVScroll, 20, (totalRowCount += gvBusOrgList.Rows.Count)); }
protected void SelectCompany(decimal companyID) { if (companyID > 0) { newLocation = new BusinessLocation(); newLocation.Company = (COMPANY)SQMModelMgr.LookupCompany(companyID); lblSelBusOrg.Text = lblSelPlant.Text = ""; if (staticShowHeader) { uclItemHdr.DisplayCompanyData(newLocation.Company, SQMModelMgr.PersonCount(companyID)); } uclCompanyList.BindOrgListRepeater(SQMModelMgr.SearchBusOrgList(new PSsqmEntities(), companyID, "", false).OrderBy(l => l.BUS_ORG_ID).ToList()); if (OnCompanyChange != null) { OnCompanyChange(newLocation); } } else { pnlSelectCompany.Visible = false; } }