Пример #1
0
        private void buttonUploadAbstract_Click(object sender, EventArgs e)
        {
            if (textBoxAbstract.Text == "")
            {
                MessageBox.Show("Please select a file to upload");
            }
            else
            {
                if (dataGridViewProposals.Rows.Count != 0)
                {
                    MetaInformation mt = new MetaInformation(controller.getProposal(Int32.Parse(dataGridViewProposals.Rows[0].Cells[0].Value.ToString())), false, textBoxAbstract.Text);
                    mt.Show();
                }
                else
                {
                    MetaInformation mt = new MetaInformation(null, false, textBoxAbstract.Text);
                    mt.Show();
                }
            }

            dataGridViewProposals.DataSource = controller.ProposalsAuthoredByUser(loggedUser.UserId);
        }
Пример #2
0
        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);
            }
        }