Exemple #1
0
		UserTask prepareObject(){
			UserTask task = new UserTask ();
			task.taskName = addTaskEntry.Text;
			task.taskDate = dtPicker.Date;
			task.taskTime = DateTime.Today + taskTime.Time;
			return task;
		}
Exemple #2
0
 // update / insert record in database
 public int SaveRecord(UserTask task)
 {
     lock (locker) {
         if (task.taskID != 0) {
             connection.Update (task);
             return task.taskID;
         } else {
             return connection.Insert (task);
         }
     }
 }