protected void MailBoxGridView_SelectionChanged(object sender, EventArgs e) { if (MailBoxGridView.Selection.Count > 0) { if (Session["UserFullName"] != null) { List <object> fieldValues = MailBoxGridView.GetSelectedFieldValues(new string[] { "redirectto" }); Response.Redirect(fieldValues[0].ToString() + "&TabType=MailBox"); } } }
public void FillMailBoxGrid() { string MBXList = ""; DataTable dt = new DataTable(); dt = VSWebBL.ExchangeBAL.Ins.GetMailBoxStatus(); Session["MailBoxGridList"] = dt; //MBXList.Text = "0"; MBXList = "0"; if (dt != null && dt.Rows.Count > 0) { //MBXList.Text = dt.Rows.Count.ToString(); MBXList = dt.Rows.Count.ToString(); } MailBoxGridView.DataSource = dt; MailBoxGridView.DataBind(); //7/18/2014 NS added //9/15/14 WS modified due to not all servers marked as Mailbox have a database on them, which is what the above query searches for DataRow rolerow = srvroles.Rows.Add(); rolerow["Role"] = "MBX"; rolerow["RoleCount"] = VSWebBL.ExchangeBAL.Ins.GetMailboxRoleCount(); }
public void FillMailBoxGridfromSession() { DataTable DataServers = new DataTable(); try { if (Session["MailBoxGridList"] != null && Session["MailBoxGridList"] != "") { DataServers = Session["MailBoxGridList"] as DataTable; } if (DataServers.Rows.Count > 0) { DataServers.PrimaryKey = new DataColumn[] { DataServers.Columns["ServerName"] }; //MBXList.Text = DataServers.Rows.Count.ToString(); } MailBoxGridView.DataSource = DataServers; MailBoxGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }