Esempio n. 1
0
        private void FillMobileDevicesGridfromSession()
        {
            try
            {
                DataTable DCTaskSettingsDataTable = new DataTable();
                if ((Session["MobileDevicesDT"] != null))
                {
                    DCTaskSettingsDataTable = (DataTable)Session["MobileDevicesDT"];                    //VSWebBL.ConfiguratorBL.DominoPropertiesBL.Ins.GetAllData();
                    if (DCTaskSettingsDataTable.Rows.Count > 0)
                    {
                        NetworkDevicesGridView.DataSource = DCTaskSettingsDataTable;
                        NetworkDevicesGridView.DataBind();
                    }
                }

                DataTable DTThreshold = new DataTable();
                if ((Session["MobUserThGrid"] != null))
                {
                    DTThreshold = (DataTable)Session["MobUserThGrid"];                    //VSWebBL.ConfiguratorBL.DominoPropertiesBL.Ins.GetAllData();
                    if (DTThreshold.Rows.Count > 0)
                    {
                        MobUserThGrid.DataSource = DTThreshold;
                        MobUserThGrid.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }
Esempio n. 2
0
 protected void StatusListPopupMenu_ItemClick(object source, DevExpress.Web.MenuItemEventArgs e)
 {
     if (e.Item.Name == "Suspend")
     {
         if (NetworkDevicesGridView.FocusedRowIndex > -1)
         {
             myRow = NetworkDevicesGridView.GetDataRow(NetworkDevicesGridView.FocusedRowIndex);
             Session["MyDeviceId"]          = myRow["DeviceID"];
             SuspendPopupControl.HeaderText = "Sync Duration";
             //ASPxLabel9.Text = myRow["Name"].ToString();
             SuspendPopupControl.ShowOnPageLoad = true;
         }
     }
 }
Esempio n. 3
0
        private void FillMobileDevicesGrid()
        {
            try
            {
                DataTable dt = VSWebBL.ConfiguratorBL.MobileUsersBL.Ins.SetGrid();
                NetworkDevicesGridView.DataSource = dt;
                Session["MobileDevicesDT"]        = dt;
                NetworkDevicesGridView.DataBind();

                DataTable dt1 = VSWebBL.ConfiguratorBL.MobileUsersBL.Ins.SetThresholdGrid();
                MobUserThGrid.DataSource = dt1;
                Session["MobUserThGrid"] = dt1;
                MobUserThGrid.DataBind();
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }
Esempio n. 4
0
        private void FillNetworkDevicesGrid()
        {
            try
            {
                DataTable DSTaskSettingsDataTable = new DataTable();

                DSTaskSettingsDataTable = VSWebBL.ConfiguratorBL.NetworkDevicesBL.Ins.GetAllData();
                if (DSTaskSettingsDataTable.Rows.Count > 0)
                {
                    if (Session["RestrictedServers"] != "" && Session["RestrictedServers"] != null)
                    {
                        List <int> ServerID   = new List <int>();
                        List <int> LocationID = new List <int>();
                        DataTable  resServers = (DataTable)Session["RestrictedServers"];
                        foreach (DataRow resser in resServers.Rows)
                        {
                            foreach (DataRow Windowsrow in DSTaskSettingsDataTable.Rows)
                            {
                                if (resser["serverid"].ToString() == Windowsrow["ID"].ToString())
                                {
                                    ServerID.Add(DSTaskSettingsDataTable.Rows.IndexOf(Windowsrow));
                                }
                                if (resser["locationID"].ToString() == Windowsrow["locationid"].ToString())
                                {
                                    LocationID.Add(Convert.ToInt32(Windowsrow["locationid"].ToString()));
                                    //LocationID.Add(DSTaskSettingsDataTable.Rows.IndexOf(Windowsrow));
                                }
                            }
                        }
                        foreach (int Id in ServerID)
                        {
                            DSTaskSettingsDataTable.Rows[Id].Delete();
                        }
                        DSTaskSettingsDataTable.AcceptChanges();

                        //foreach (int Lid in LocationID)
                        //{
                        //    DSTaskSettingsDataTable.Rows[Lid].Delete();
                        //}
                        foreach (int lid in LocationID)
                        {
                            DataRow[] row = DSTaskSettingsDataTable.Select("locationid=" + lid + "");
                            for (int i = 0; i < row.Count(); i++)
                            {
                                DSTaskSettingsDataTable.Rows.Remove(row[i]);
                                DSTaskSettingsDataTable.AcceptChanges();
                            }
                        }
                        DSTaskSettingsDataTable.AcceptChanges();
                    }
                }
                Session["NetworkDevices"]         = DSTaskSettingsDataTable;
                NetworkDevicesGridView.DataSource = DSTaskSettingsDataTable;
                NetworkDevicesGridView.DataBind();
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }