public MetaInformation(Proposal proposal, bool fullPaper, string paperLink) { InitializeComponent(); controller = ApplicationFactory.getPhaseOneController(); this.proposal = proposal; this.fullPaper = fullPaper; this.paperLink = paperLink; loadAuthors(); if (this.proposal != null) { textBoxName.Text = proposal.Title; textBoxKeywords.Text = proposal.Description; foreach (User us in proposal.Authors) { for (int i = 0; i < comboBoxAuthors.Items.Count; i++) { if (us.UserId == ((User)comboBoxAuthors.Items[i]).UserId) { comboBoxAuthors.SetItemChecked(i, true); } } } } else { textBoxName.Text = ""; textBoxKeywords.Text = ""; dateTimePickerAnPublicare.Value = DateTime.Now; } }
public AuthorMain(Form parentForm, User loggedUser) { this.controller = ApplicationFactory.getPhaseOneController(); this.loggedUser = loggedUser; this.proposal = controller.getProposalByUser(loggedUser.UserId); this.parentForm = parentForm; InitializeComponent(); }
public UserAccount(Form parentForm, User loggedUser) { controller = ApplicationFactory.getPhaseOneController(); this.loggedUser = loggedUser; this.parentForm = parentForm; InitializeComponent(); dataGridViewProposals.DataSource = controller.ProposalsAuthoredByUser(loggedUser.UserId); dataGridViewProposals.Columns[2].Visible = false; dataGridViewProposals.Columns[7].Visible = false; buttonUpdate.Size = new System.Drawing.Size(633, 34); buttonUpdate.Location = new System.Drawing.Point(36, 280); if (controller.GetUserRoles(loggedUser).Select(role => role.Slug).Contains("chair")) { buttonNextPhase.Visible = true; buttonUpdate.Size = new System.Drawing.Size(321, 34); buttonUpdate.Location = new System.Drawing.Point(36, 280); } }