public static AirtimeBilling.Core.Entities.Note CreateEntity(this Note note) { if (note == null) return null; var entity = new AirtimeBilling.Core.Entities.Note(note.NoteId) { Comment = note.Comment, NoteType = note.Type, EntityId = note.EntityId, NoteDate = note.NoteDate, Username = note.Username }; return entity; }
public void AddNote(object sender, EventArgs e) { var note = new Note() { Comment = Comment.Text, EntityId = EntityId, NoteDate = DateTime.Now, NoteType = EntityType, Username = Users.Current.Username }; NoteService.SaveNote(note); PopulateNotes(); Comment.Text = string.Empty; }