Ejemplo n.º 1
0
            public static ProjectNote Create()
            {
                var project     = TestProject.Create();
                var projectNote = ProjectNote.CreateNewBlank(project);

                projectNote.Note       = MakeTestProjectNoteString();
                projectNote.CreateDate = DateTime.Now;
                return(projectNote);
            }
Ejemplo n.º 2
0
            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);
            }
Ejemplo n.º 3
0
        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());
        }