Exemple #1
0
        public ActionResult ProjectConnectionsList(int projectId)
        {
            var Result = new object();
            List <ConnectionModel> connectionList;

            using (ProjectDB projectDB = new ProjectDB())
            {
                connectionList = projectDB.GetConnectionsByProject(projectId);
            }
            Result = new
            {
                aaData = (
                    from connection in connectionList
                    select new
                {
                    Id = connection.Id,
                    ProjectId = connection.ProjectId,
                    ConnectionName = connection.ConnectionName,
                    ProjectName = connection.Project.ProjectName,
                    SID = connection.SID,
                    IpAddress = connection.IpAddress,
                    PortNumber = connection.PortNumber,
                    Action = ""
                }
                    ).ToArray()
            };
            return(Json(Result, JsonRequestBehavior.AllowGet));
        }