public static bool AddAppointment(Appointment meeting)
        {
            try
            {
                Connect();
                cmd = new OracleCommand();
                cmd.Connection = con;
                cmd.CommandText =
                    "Insert into TAFSPRAAK(CLIENT, VOLUNTEER, DATUMTIJD, LOCATIE) VALUES (:NewCLIENT, :NewVOLUNTEER, :NewDATUMTIJD, :NewLOCATIE)";

                cmd.Parameters.Add("NewCLIENT", OracleDbType.Int32).Value = meeting.Client.UserID;
                cmd.Parameters.Add("NewVOLUNTEER", OracleDbType.Int32).Value = meeting.Volunteer.UserID;
                cmd.Parameters.Add("NewDATUMTIJD", OracleDbType.Varchar2).Value = meeting.DateString;
                cmd.Parameters.Add("NewLOCATIE", OracleDbType.Varchar2).Value = meeting.Location;

                cmd.ExecuteNonQuery();
                return true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return false;
            }
            finally
            {
                Disconnect();
            }
        }
Ejemplo n.º 2
0
        public Form_Meeting(Appointment meeting)
        {
            InitializeComponent();

            label1.Text = meeting.Client.Name;
            lbl_VolunName.Text = "Geholpen door: " + meeting.Volunteer.Name;
            dtp_Date.Value = meeting.Date;
            tbox_Location.Text = meeting.Location;

            dtp_Date.Enabled = false;
            tbox_Location.Enabled = false;
            btn_AddMeeting.Visible = false;
        }
Ejemplo n.º 3
0
 // TODO: NOT CORRECT
 public bool AddMeeting(Client client, Volunteer volunteer, DateTime date, string location)
 {
     Appointment meeting = new Appointment(client, volunteer, date, location);
     return false; ;
 }
Ejemplo n.º 4
0
        // TODO: NOT CORRECT
        public bool AddMeeting(Client client, Volunteer volunteer, DateTime date, string location)
        {
            Appointment meeting = new Appointment(client, volunteer, date, location);

            return(false);;
        }