Exemple #1
0
 public ProjectController(ProjectFacade prFac, IssueFacade iFac, CommentFacade cFac, PersonFacade pFac)
 {
     projectFacade = prFac;
     issueFacade   = iFac;
     commentFacade = cFac;
     personFacade  = pFac;
 }
Exemple #2
0
 public CommentsController(TeamCommunicationDbContext context)
 {
     _context     = context;
     this.factory = new DbContextFactory();
     repo         = new CommentRepository(factory);
     query        = new GetCommentsQuery(factory.CreateDbContext);
     facade       = new CommentFacade(repo, query);
 }
Exemple #3
0
 public IssueController(IssueFacade issueFacade, ProjectFacade projectFacade, CommentFacade commentFacade, PersonFacade personFacade, NotificationFacade notificationFacade)
 {
     this.issueFacade        = issueFacade;
     this.projectFacade      = projectFacade;
     this.commentFacade      = commentFacade;
     this.personFacade       = personFacade;
     this.notificationFacade = notificationFacade;
 }
Exemple #4
0
    public PartialViewResult _Submit(CommentViewModel model)
    {
        CommentFacade.SaveComment(comment);
        List <CommentModel> comments = CommentFacade.GetAllCommentsOnIsbn(comment.ISBN_No);

        ViewBag.ISBN_No = comment.ISBN_No;
        return(PartialView("_GetForSession", model));
    }
Exemple #5
0
    public PartialViewResult _GetForSession(string isbnNo)
    {
        ViewBag.ISBN_No = isbnNo;
        var model = new CommentViewModel
        {
            CommentModels = CommentFacade.GetAllCommentsOnIsbn(isbnNo);
        };

        return(PartialView("_GetForSession", model));
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            UserFacade    userFacade    = new UserFacade();
            PostFacade    postFacade    = new PostFacade();
            AlbumFacade   albumFacade   = new AlbumFacade();
            CommentFacade commentFacade = new CommentFacade();

            User    user    = userFacade.GetUsers();
            Posts   post    = postFacade.GetPosts();
            Albums  album   = albumFacade.GetAlbums();
            Comment comment = commentFacade.GetComments();

            lblUserName.Text     = user.Name;
            lblTitlePost.Text    = post.Title;
            lblBodyPost.Text     = post.Body;
            lblTitleAlbum.Text   = album.Title;
            lblNameComment.Text  = comment.Name;
            lblEmailComment.Text = comment.Email;
            lblBodyComment.Text  = comment.Body;
        }