Exemple #1
0
        private Note convertNote(NOTE note)
        {
            // find parent element
            ElementView parentElement = null;
            foreach (RequestView request in this.requestList.Data) {
                foreach (ElementView element in request.ElementList)
                    if (element.ID == note.ELEMENT_ID)
                        parentElement = element;
            }

            if (parentElement == null)
                throw new NullReferenceException("Unable to find the parent element of the note: " + note.NOTE_TEXT);

            UserMgr userMgr = new UserMgr(MainFactory.getUserSvc());
            return new Note(note, userMgr.getUser(note.UPDATED_BY_ID), parentElement);
        }
Exemple #2
0
		private void detach_NOTEs(NOTE entity)
		{
			this.SendPropertyChanging();
			entity.EMPLOYEE = null;
		}
Exemple #3
0
 public NOTE saveNote(Note note)
 {
     try {
         using (ConsoleDataContext db = (ConsoleDataContext)MainFactory.getDb("Console", false)) {
             NOTE newNote = new NOTE {
                 ELEMENT_ID = note.Parent.ID,
                 NOTE_DATE = note.Date,
                 NOTE_TEXT = note.Text,
                 UPDATED_BY_ID = note.UpdatedBy.EmployeeID
             };
             db.NOTEs.InsertOnSubmit(newNote);
             db.SubmitChanges();
             return newNote;
         }
     } catch (Exception se) {
         throw new Exception("Unable to add a new note due to " + se.Message);
     }
 }
Exemple #4
0
		private void attach_NOTEs(NOTE entity)
		{
			this.SendPropertyChanging();
			entity.EMPLOYEE = this;
		}
Exemple #5
0
 partial void DeleteNOTE(NOTE instance);
Exemple #6
0
 partial void UpdateNOTE(NOTE instance);
Exemple #7
0
 partial void InsertNOTE(NOTE instance);
Exemple #8
0
		private void attach_NOTEs(NOTE entity)
		{
			this.SendPropertyChanging();
			entity.ELEMENT = this;
		}