protected void CompareUsersButton_Click(object sender, EventArgs e) { string user1 = ""; string user2 = ""; bool proceed = true; DataTable dt = new DataTable(); if (User1ComboBox.SelectedIndex != -1) { user1 = User1ComboBox.SelectedItem.Text; } else { CompareUsersGrid.ClientVisible = false; errorDiv.Style.Value = "display: block;"; errorDiv.InnerHtml = "You must select User 1 and User 2 in order to perform a comparison." + "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>"; proceed = false; } if (User2ComboBox.SelectedIndex != -1) { user2 = User2ComboBox.SelectedItem.Text; } else { CompareUsersGrid.ClientVisible = false; errorDiv.Style.Value = "display: block;"; errorDiv.InnerHtml = "You must select User 1 and User 2 in order to perform a comparison." + "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>"; proceed = false; } if (user1 != "" && user2 != "" && user1 == user2) { CompareUsersGrid.ClientVisible = false; errorDiv.Style.Value = "display: block;"; errorDiv.InnerHtml = "User 1 and User 2 must be different in order to perform a comparison." + "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>"; proceed = false; } if (proceed) { errorDiv.Style.Value = "display: none;"; dt = VSWebBL.DashboardBL.Office365BL.Ins.GetUserCommonGroups(user1, user2); CompareUsersGrid.ClientVisible = true; Session["CompareUsersGrid"] = dt; CompareUsersGrid.DataSource = dt; CompareUsersGrid.DataBind(); ((GridViewDataColumn)CompareUsersGrid.Columns["Category"]).GroupBy(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillGroupsGrid(); FillUsersComboBox(); } else { FillOffice365GroupsgridFromSession(); if (Session["CompareUsersGrid"] != null) { CompareUsersGrid.DataSource = (DataTable)Session["CompareUsersGrid"]; CompareUsersGrid.DataBind(); } } //16/06/2016 sowmya added for VSPLUS-3039 if (Session["UserPreferences"] != null) { DataTable UserPreferences = (DataTable)Session["UserPreferences"]; foreach (DataRow dr in UserPreferences.Rows) { if (dr[1].ToString() == "Office365Groups|Office365Groupsgrid") { Office365Groupsgrid.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } } } if (Session["UserPreferences"] != null) { DataTable UserPreferences = (DataTable)Session["UserPreferences"]; foreach (DataRow dr in UserPreferences.Rows) { if (dr[1].ToString() == "Office365Groups|CompareUsersGrid") { CompareUsersGrid.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } } } SetGraphForGroups(); }
protected void Page_Load(object sender, EventArgs e) { //1/06/2016 sowmya added for VSPLUS-2934 if (Session["UserPreferences"] != null) { DataTable UserPreferences = (DataTable)Session["UserPreferences"]; foreach (DataRow dr in UserPreferences.Rows) { if (dr[1].ToString() == "ConnectionsHealth|CommunitiesGrid") { CommunitiesGrid.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } } } if (!IsPostBack) { HtmlGenericControl body = (HtmlGenericControl)Master.FindControl("Body1"); body.Attributes.Add("onload", "DoCallback()"); body.Attributes.Add("onResize", "Resized()"); } else { if (Session["CompareUsersGrid"] != null) { CompareUsersGrid.DataSource = (DataTable)Session["CompareUsersGrid"]; CompareUsersGrid.DataBind(); } } FillConnectionsGridView(); if (ConnectionsGridView.VisibleRowCount > 0) { int index = ConnectionsGridView.FocusedRowIndex; ConnectionsGridView.Selection.UnselectAll(); if (index > -1) { //servernamelbldisp.InnerHtml = ""; ID = Convert.ToInt32(ConnectionsGridView.GetRowValues(index, "Id").ToString()); selectedServer = ConnectionsGridView.GetRowValues(index, "ServerName").ToString(); } } FillLibrariesGrid(); FillActivitiesGridView(); FillActivitiesHeader(); FillUsersCombo(); FillBlogsGridView(); FillBookmarksGridView(); FillBookmarkHeader(); FillFilesGridView(); FillForumsGridView(); FillWikisGridView(); FillDailyGridView(); SetGraphForUsersDaily(); SetGraphForTop5Tags(); SetGraphForCommunityTypes(); SetGraphForMostActiveCommunity(); SetGraphForManagers(); SetGraphForPictures(); SetGraphForJobHierarchy(); SetGraphForBlogs(); SetGraphForActivities(); SetGraphForFiles(); SetGraphForForums(); SetGraphForWikis(); SetGraphForBookmarks(); SetGraphForTop5Objects(); SetGraphForTop5MostActiveCommunities(); FillCommunitiesGrid(); SetGraphForLibraries(); }