public static ProjectNote Create() { var project = TestProject.Create(); var projectNote = ProjectNote.CreateNewBlank(project); projectNote.Note = MakeTestProjectNoteString(); projectNote.CreateDate = DateTime.Now; return(projectNote); }
public static ProjectNote Create(DatabaseEntities dbContext) { var project = TestProject.Create(dbContext); var projectNote = ProjectNote.CreateNewBlank(project); projectNote.Note = MakeTestProjectNoteString(); projectNote.CreateDate = DateTime.Now; dbContext.ProjectNotes.Add(projectNote); return(projectNote); }
public ActionResult New(ProjectPrimaryKey projectPrimaryKey, EditNoteViewModel viewModel) { if (!ModelState.IsValid) { return(ViewEdit(viewModel)); } var project = projectPrimaryKey.EntityObject; var projectNote = ProjectNote.CreateNewBlank(project); viewModel.UpdateModel(projectNote, CurrentFirmaSession); HttpRequestStorage.DatabaseEntities.AllProjectNotes.Add(projectNote); return(new ModalDialogFormJsonResult()); }