Esempio n. 1
0
        public SectionDetails(int confid, ClientController ctrl, AddSections form, SectionDTO section)
        {
            this.sectionToUpdate = section;
            this.ctrl            = ctrl;
            conferenceId         = confid;
            this.form            = form;
            InitializeComponent();

            dateTimePickerStart.Format       = DateTimePickerFormat.Custom;
            dateTimePickerStart.CustomFormat = "MM/dd/yyyy hh:mm tt";

            dateTimePickerEnd.Format       = DateTimePickerFormat.Custom;
            dateTimePickerEnd.CustomFormat = "MM/dd/yyyy hh:mm tt";

            loadCombo();
            loadData();
        }
Esempio n. 2
0
        //private void reloadProposals(IEnumerable<ProposalDTO> items)
        //{
        //    proposals.Clear();
        //        foreach (var item in items)
        //        {
        //            DataRow c = proposals.NewRow();
        //            c["Title"] = item.Title;
        //            c["Subject"] = item.Subject;
        //            c["Abstract"] = item.Abstract;
        //            c["Full Paper"] = item.FullPaper;
        //            c["Key Words"] = item.Keywords;
        //            proposals.Rows.Add(c);
        //        }
        //    GridViewProposals.DataSource = proposals;
        //}

        private void buttonSections_Click(object sender, EventArgs e)
        {
            if (GridViewConferinte.SelectedRows.Count == 0)
            {
                MessageBox.Show("Please select a conference.");
                return;
            }
            var selectedRow = GridViewConferinte.SelectedRows[0];
            var conf        = ctrl.FindConference(selectedRow.Cells[2].Value.ToString(), selectedRow.Cells[3].Value.ToString());

            if (DateTime.Parse(conf.FullPaperDeadline).CompareTo(DateTime.Now) >= 0)
            {
                MessageBox.Show("There is still time for uploading proposals.");
                return;
            }
            if (DateTime.Parse(conf.StartDate).CompareTo(DateTime.Now) <= 0)
            {
                MessageBox.Show("You can't modify a conference which has already started.");
                return;
            }
            AddSections window = new AddSections(conf, ctrl);

            window.Show();
        }