Пример #1
0
        protected void addColleagueToInterview(object sender, RoutedEventArgs e)
        {
            Button            btn   = sender as Button;
            ModelErtesitendok items = btn.DataContext as ModelErtesitendok;

            Interview.Insert(items.id);
            choose_editlist.ItemsSource       = Interview.Data_ProjektErtesitendokKapcsolt();
            ertesitendok_editlist.ItemsSource = Interview.Data_InterjuErtesitendokKapcsolt();
        }
Пример #2
0
 public IActionResult Post(Interview interview)
 {
     try
     {
         interview.Insert();
         return(Ok("success"));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
 }
Пример #3
0
        private void m_btn_Submit_Click(object sender, EventArgs e)
        {
            TimeSlot timeSlot = (TimeSlot)m_cb_TimeSlots.SelectedItem;

            Person person = new Person().FromID(Context.Person);

            Candidate candidate = null;

            if (person.IsCandidate())
            {
                candidate = person.GetCandidate();
            }
            else
            {
                MessageBox.Show("You cannot sign up for interviews as you are not a registerd candidate.");
                Dispose();
                return;
            }

            Interviewer interviewer = GetAvailableInterviewer(timeSlot);
            Table       table       = GetAvailableTable(timeSlot);

            Interview i = new Interview();

            i.JobFairID   = Context.JobFair;
            i.CandidateID = candidate.ID;
            i.TimeSlotID  = timeSlot.ID;
            i.TableID     = table.ID;

            i.Insert();

            i.AddInterviewer(interviewer);

            MessageBox.Show("Your interview with " + m_lbl_CompanyName.Text + " at " + timeSlot.StartTime + " has been registered.");
            Dispose();
        }