protected void Page_Load(object sender, EventArgs e) { PageSize = 50000; Path = DataHelper.GetNotEmpty(GetValue(Constants.Webparts.PathFieldName), null); if (Request.IsMobileBrowser()) { PageSize = Convert.ToInt32(DataHelper.GetNotEmpty(GetValue(Constants.Webparts.TeamPageSize), "6")); } //load the first page People = PeopleLoader.Get(Path, 0, PageSize); PeopleRepeater.DataSource = People; PeopleRepeater.DataBind(); }
void PeopleSearchControl_OnSearch() { log.Debug("Binding RadGrid on Search"); PeopleRepeater.DataBind(); }
protected void PeopleRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { int personId = 0; try { personId = Convert.ToInt32(e.CommandArgument); } catch (Exception ex) { log.Error("Error getting object id", ex); } if (personId <= 0) { SystemMessages.DisplaySystemErrorMessage(Resources.People.MessageNotAction); return; } if (e.CommandName.Equals("ViewPerson")) { Session["PERSONID"] = personId.ToString(); Response.Redirect("~/People/PersonDetails.aspx"); } if (e.CommandName == "EditPerson") { Session["PersonId"] = personId.ToString(); Response.Redirect("~/Personas/PeopleForm.aspx"); } if (e.CommandName == "DeletePerson") { try { PeopleBLL.DeletePeople(personId); } catch (Exception ex) { SystemMessages.DisplaySystemErrorMessage(ex.Message); return; } SystemMessages.DisplaySystemMessage(Resources.People.MessageDeletePersonOk); PeopleRepeater.DataBind(); } if (e.CommandName == "ViewOrganization") { Session["SEARCH_PARAMETER"] = "@organizationID " + personId.ToString(); Response.Redirect("~/Organization/ListOrganizations.aspx"); return; } if (e.CommandName == "ViewArea") { Session["OrganizationId"] = personId.ToString(); Response.Redirect("~/Organization/EditOrganization.aspx"); return; } if (e.CommandName == "ViewKPIs") { Session["SEARCH_PARAMETER"] = "@personID " + personId.ToString(); Response.Redirect("~/Kpi/KpiList.aspx"); return; } if (e.CommandName.Equals("SharePerson")) { Session["PERSONID"] = personId.ToString(); Response.Redirect("~/People/SharePerson.aspx"); } }