예제 #1
0
파일: GeneralForm.cs 프로젝트: Mr3JZ/theta7
        private void buttonViewDetails_Click(object sender, EventArgs e)
        {
            string            name    = dataGridViewAllConferences.CurrentRow.Cells[0].Value.ToString();
            string            edition = dataGridViewAllConferences.CurrentRow.Cells[1].Value.ToString();
            string            city    = dataGridViewAllConferences.CurrentRow.Cells[2].Value.ToString();
            Conference        conf    = ctrl.getConference(name, edition, city);
            string            rank    = ctrl.getMyRank(name, edition, city);
            ConferenceDetails cf      = new ConferenceDetails(ctrl, conf, rank);

            cf.Show();
        }
예제 #2
0
파일: GeneralForm.cs 프로젝트: Mr3JZ/theta7
        private void buttonViewDetailsMy_Click(object sender, EventArgs e)
        {
            /*
             * string name = dataGridViewMyConferences.CurrentRow.Cells[0].ToString();
             * string edition = dataGridViewMyConferences.CurrentRow.Cells[1].ToString();
             * string city = dataGridViewMyConferences.CurrentRow.Cells[2].ToString();
             * Conference conf = ctrl.getConference(name, edition, city);
             */
            int               confId = ((Conference)dataGridViewMyConferences.CurrentRow.DataBoundItem).Id;
            Conference        conf   = ctrl.getConferenceById(confId);
            string            rank   = ctrl.getMyRank(confId);
            ConferenceDetails cf     = new ConferenceDetails(ctrl, conf, rank);

            cf.Show();
        }
예제 #3
0
 private void buttonRegisterConference_Click(object sender, EventArgs e)
 {
     try
     {
         int nrTickets = (int)numericUpDownPaidSum.Value;
         //Only listeners have to pay->so he has to be normalUser
         Participant p = new Participant(ctrl.getCurrentUser(), conf.Id, false, false, false, true);
         double      x = conf.AdmissionPrice * nrTickets;
         if (MessageBox.Show("Price to pay: " + x.ToString() + "$", "Price", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
         {
             ctrl.addPayment(p, nrTickets, conf);
             ConferenceDetails cf = new ConferenceDetails(ctrl, conf, "NormalUser");
             cf.Show();
             this.Close();
         }
     }catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }