예제 #1
0
        /// <summary>
        /// Adds gesture data into database
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="projectName"></param>
        /// <param name="gestureName"></param>
        /// <param name="gestureData"></param>
        public string AddGestureData(string userName, string projectName, string gestureName, string gestureData)
        {
            User user = GetUser(userName);
            UserProject project = GetUserProject(projectName, user.Id);

            var existing = _database.Gestures.Where(g => g.ProjectId == project.Id && g.GestureName == gestureName);

            if (existing.Count() > 0)
                gestureName = gestureName + DateTime.Now.Ticks;

            Gesture nGesture = new Gesture() { ProjectId = project.Id, UserId = user.Id, GestureName = gestureName, Data = gestureData };

            _database.Gestures.InsertOnSubmit(nGesture);
            _database.SubmitChanges();

            return gestureName;
        }
예제 #2
0
        public void AddGestureData(int userId, int projectId, string gestureName, string gestureData)
        {
            // Create new object
            Gesture g = new Gesture()
            {
                ProjectId = projectId,
                UserId = userId,
                GestureName = gestureName,
                Data = gestureData,
            };

            // Save in database
            _database.Gestures.InsertOnSubmit(g);
            _database.SubmitChanges();

            // Update Activity Log
            UpdateUserActivity(userId, string.Format("Adding Gesture Data| project Id:{0}, gesture name: {1}", projectId, gestureName));
        }
예제 #3
0
		private void detach_Gestures(Gesture entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
예제 #4
0
		private void attach_Gestures(Gesture entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
예제 #5
0
 partial void DeleteGesture(Gesture instance);
예제 #6
0
 partial void UpdateGesture(Gesture instance);
예제 #7
0
 partial void InsertGesture(Gesture instance);