예제 #1
0
 public string SendData(string username, string sessionname, string joints, string jointPoints, DateTime dt)
 {
     using (UTBodyDataEntities db = new UTBodyDataEntities())
     {
         db.uspInsertBodyData(username, sessionname, joints, jointPoints, dt);
     }
     return("hi");
 }
예제 #2
0
        public List <string> GetSessions(string username)
        {
            List <string> temp = null;

            using (UTBodyDataEntities db = new UTBodyDataEntities())
            {
                temp = db.uspGetSessionsByUserName(username).ToList <string>();

                // List<BodyDataObject> temp = db.uspGetBodyData();
            }
            return(temp);
        }
예제 #3
0
        public List <string> GetPatients()
        {
            List <string> temp = null;

            using (UTBodyDataEntities db = new UTBodyDataEntities())
            {
                temp = db.uspGetPatients().ToList <string>();

                // List<BodyDataObject> temp = db.uspGetBodyData();
            }
            return(temp);
        }
예제 #4
0
        public List <BodyDataObject> GetData(int value)
        {
            List <BodyDataObject> temp = null;

            using (UTBodyDataEntities db = new UTBodyDataEntities())
            {
                temp = db.BodyDatas.Select(x => new BodyDataObject()
                {
                    UserName = x.UserName, SessionName = x.SessionName, Joints = x.Joints, JointPoints = x.JointPoints, TimeStamp = (System.DateTime)x.timestamp
                }).ToList();

                // List<BodyDataObject> temp = db.uspGetBodyData();
            }
            return(temp);
        }
예제 #5
0
        public List <uspGetBodyDataByUserNameAndSessionName_Result> GetBodyData(string username, string sessionname)
        {
            List <uspGetBodyDataByUserNameAndSessionName_Result> temp = null;

            // List<uspGetBodyDataByUserNameAndSessionName_Result> temp = null;
            using (UTBodyDataEntities db = new UTBodyDataEntities())
            {
                temp = db.uspGetBodyDataByUserNameAndSessionName(username, sessionname).ToList <uspGetBodyDataByUserNameAndSessionName_Result>();
                //var t = db.BodyDatas.Select(x => new BodyDataObject() { UserName = x.UserName, SessionName = x.SessionName, Joints = x.Joints, JointPoints = x.JointPoints, TimeStamp = DateTime.Now }).ToList();

                //foreach(BodyDataObject bd in t)
                //{
                //    if(bd.UserName == "Cadarrius Mcglown" & bd.SessionName == "testsession")
                //        Debug.WriteLine(bd.UserName + " " + bd.SessionName);
                //}

                //temp = db.BodyDatas.Where(x => x.UserName == username & x.SessionName == sessionname).Select(x => new BodyDataObject() { UserName = x.UserName, SessionName = x.SessionName, Joints = x.Joints, JointPoints = x.JointPoints, TimeStamp = DateTime.Now }).ToList();
                //temp = db.BodyDatas.Where(x => x.UserName == username & x.SessionName == sessionname).Select(x => new BodyDataObject() { UserName = x.UserName, SessionName = x.SessionName, Joints = x.Joints, JointPoints = x.JointPoints, TimeStamp = DateTime.Now }).ToList();
                //temp = db.uspGetBodyDataByUserNameAndSessionName(username, sessionname).ToList<uspGetBodyDataByUserNameAndSessionName_Result>();
            }
            return(temp);
        }