Пример #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);