Ejemplo n.º 1
0
 public void filllotussametimegridbysession()
 {
     try
     {
         DataTable sametimebysession = new DataTable();
         if (Session["sametime"] != null && Session["sametime"] != "")
         {
             sametimebysession = (DataTable)Session["sametime"];
         }
         if (sametimebysession.Rows.Count > 0)
         {
             LotusSametimeGridview.DataSource = sametimebysession;
             LotusSametimeGridview.DataBind();
         }
     }
     catch (Exception ex)
     {
         //6/27/2014 NS added for VSPLUS-634
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
         throw ex;
     }
 }
Ejemplo n.º 2
0
        protected void LotusSametimeGridview_SelectionChanged(object sender, EventArgs e)
        {
            if (LotusSametimeGridview.Selection.Count > 0)
            {
                System.Collections.Generic.List <object> Type = LotusSametimeGridview.GetSelectedFieldValues("SID");

                if (Type.Count > 0)
                {
                    string ID = Type[0].ToString();

                    //Mukund: VSPLUS-844, Page redirect on callback
                    try
                    {
                        DevExpress.Web.ASPxWebControl.RedirectOnCallback("SametimeServer.aspx?ID=" + ID + "");
                        Context.ApplicationInstance.CompleteRequest();//Mukund, 05Aug14, VSPLUS-844:Page redirect on callback
                    }
                    catch (Exception ex)
                    {
                        Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                        //throw ex;
                    }
                }
            }
        }
Ejemplo n.º 3
0
        public void filllotussametimegrid()
        {
            try
            {
                DataTable         sametime            = new DataTable();
                LotusSametimeGrid objectlotussametime = new LotusSametimeGrid();
                //sametime = VSWebBL.ConfiguratorBL.SametimeServerBL.Ins.getdata();
                if (Session["UserID"] != null)
                {
                    UserID = Convert.ToInt32(Session["UserID"]);
                }
                sametime = VSWebBL.ConfiguratorBL.SametimeServerBL.Ins.getdataforlotussametimegridbyuser(UserID);

                if (sametime.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 dominorow in sametime.Rows)
                        {
                            foreach (DataRow resser in resServers.Rows)
                            {
                                if (resser["serverid"].ToString() == dominorow["SID"].ToString())
                                {
                                    ServerID.Add(sametime.Rows.IndexOf(dominorow));
                                }
                                if (resser["locationID"].ToString() == dominorow["LocationID"].ToString())
                                {
                                    LocationID.Add(Convert.ToInt32(dominorow["LocationID"].ToString()));
                                    // LocationID.Add(sametime.Rows.IndexOf(dominorow));
                                }
                            }
                        }
                        foreach (int Id in ServerID)
                        {
                            sametime.Rows[Id].Delete();
                        }
                        sametime.AcceptChanges();
                        //foreach (int Lid in LocationID)
                        //{
                        //    sametime.Rows[Lid].Delete();
                        //}
                        foreach (int lid in LocationID)
                        {
                            DataRow[] row = sametime.Select("LocationID=" + lid + "");
                            for (int i = 0; i < row.Count(); i++)
                            {
                                sametime.Rows.Remove(row[i]);
                                sametime.AcceptChanges();
                            }
                        }
                        sametime.AcceptChanges();
                    }
                    Session["sametime"] = sametime;
                    LotusSametimeGridview.DataSource = sametime;
                    LotusSametimeGridview.DataBind();
                }
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally
            {
            }
        }