/// <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; }
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)); }
private void detach_Gestures(Gesture entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_Gestures(Gesture entity) { this.SendPropertyChanging(); entity.User = this; }
partial void DeleteGesture(Gesture instance);
partial void UpdateGesture(Gesture instance);
partial void InsertGesture(Gesture instance);