diff --git a/.idea/.idea.C969Project/.idea/sqldialects.xml b/.idea/.idea.C969Project/.idea/sqldialects.xml
deleted file mode 100644
index b7ed9fe..0000000
--- a/.idea/.idea.C969Project/.idea/sqldialects.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/C969Project/AddOrUpdateAppointmentForm.Designer.cs b/C969Project/AddOrUpdateAppointmentForm.Designer.cs
index f2f39b2..db1409b 100644
--- a/C969Project/AddOrUpdateAppointmentForm.Designer.cs
+++ b/C969Project/AddOrUpdateAppointmentForm.Designer.cs
@@ -31,11 +31,313 @@ partial class AddOrUpdateAppointmentForm
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
- this.Text = "AddOrUpdateAppointmentForm";
+ cancelButton = new System.Windows.Forms.Button();
+ saveButton = new System.Windows.Forms.Button();
+ label1 = new System.Windows.Forms.Label();
+ label2 = new System.Windows.Forms.Label();
+ textBox1 = new System.Windows.Forms.TextBox();
+ descriptionTextBox = new System.Windows.Forms.TextBox();
+ label3 = new System.Windows.Forms.Label();
+ locationTextBox = new System.Windows.Forms.TextBox();
+ label4 = new System.Windows.Forms.Label();
+ contactTextBox = new System.Windows.Forms.TextBox();
+ label5 = new System.Windows.Forms.Label();
+ textBox2 = new System.Windows.Forms.TextBox();
+ urlTextBox = new System.Windows.Forms.Label();
+ label6 = new System.Windows.Forms.Label();
+ typeComboBox = new System.Windows.Forms.ComboBox();
+ customerComboBox = new System.Windows.Forms.ComboBox();
+ customerLabel = new System.Windows.Forms.Label();
+ startPickerDate = new System.Windows.Forms.DateTimePicker();
+ label7 = new System.Windows.Forms.Label();
+ label8 = new System.Windows.Forms.Label();
+ endPickerDate = new System.Windows.Forms.DateTimePicker();
+ startPickerTime = new System.Windows.Forms.DateTimePicker();
+ endPickerTime = new System.Windows.Forms.DateTimePicker();
+ SuspendLayout();
+ //
+ // cancelButton
+ //
+ cancelButton.Location = new System.Drawing.Point(856, 761);
+ cancelButton.Name = "cancelButton";
+ cancelButton.Size = new System.Drawing.Size(75, 23);
+ cancelButton.TabIndex = 0;
+ cancelButton.Text = "Cancel";
+ cancelButton.UseVisualStyleBackColor = true;
+ //
+ // saveButton
+ //
+ saveButton.Location = new System.Drawing.Point(775, 761);
+ saveButton.Name = "saveButton";
+ saveButton.Size = new System.Drawing.Size(75, 23);
+ saveButton.TabIndex = 1;
+ saveButton.Text = "Save";
+ saveButton.UseVisualStyleBackColor = true;
+ //
+ // label1
+ //
+ label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label1.Location = new System.Drawing.Point(12, 9);
+ label1.Name = "label1";
+ label1.Size = new System.Drawing.Size(159, 23);
+ label1.TabIndex = 2;
+ label1.Text = "Update Appointment";
+ //
+ // label2
+ //
+ label2.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label2.Location = new System.Drawing.Point(12, 69);
+ label2.Name = "label2";
+ label2.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label2.Size = new System.Drawing.Size(100, 23);
+ label2.TabIndex = 3;
+ label2.Text = "Title";
+ label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // textBox1
+ //
+ textBox1.Location = new System.Drawing.Point(12, 95);
+ textBox1.Name = "textBox1";
+ textBox1.Size = new System.Drawing.Size(520, 23);
+ textBox1.TabIndex = 4;
+ //
+ // descriptionTextBox
+ //
+ descriptionTextBox.Location = new System.Drawing.Point(12, 147);
+ descriptionTextBox.Multiline = true;
+ descriptionTextBox.Name = "descriptionTextBox";
+ descriptionTextBox.Size = new System.Drawing.Size(520, 100);
+ descriptionTextBox.TabIndex = 6;
+ //
+ // label3
+ //
+ label3.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label3.Location = new System.Drawing.Point(12, 121);
+ label3.Name = "label3";
+ label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label3.Size = new System.Drawing.Size(100, 23);
+ label3.TabIndex = 5;
+ label3.Text = "Description";
+ label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // locationTextBox
+ //
+ locationTextBox.Location = new System.Drawing.Point(12, 276);
+ locationTextBox.Name = "locationTextBox";
+ locationTextBox.Size = new System.Drawing.Size(520, 23);
+ locationTextBox.TabIndex = 8;
+ //
+ // label4
+ //
+ label4.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label4.Location = new System.Drawing.Point(12, 250);
+ label4.Name = "label4";
+ label4.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label4.Size = new System.Drawing.Size(100, 23);
+ label4.TabIndex = 7;
+ label4.Text = "Location";
+ label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // contactTextBox
+ //
+ contactTextBox.Location = new System.Drawing.Point(12, 328);
+ contactTextBox.Name = "contactTextBox";
+ contactTextBox.Size = new System.Drawing.Size(520, 23);
+ contactTextBox.TabIndex = 10;
+ //
+ // label5
+ //
+ label5.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label5.Location = new System.Drawing.Point(12, 302);
+ label5.Name = "label5";
+ label5.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label5.Size = new System.Drawing.Size(100, 23);
+ label5.TabIndex = 9;
+ label5.Text = "Contact";
+ label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // textBox2
+ //
+ textBox2.Location = new System.Drawing.Point(12, 380);
+ textBox2.Name = "textBox2";
+ textBox2.Size = new System.Drawing.Size(520, 23);
+ textBox2.TabIndex = 12;
+ //
+ // urlTextBox
+ //
+ urlTextBox.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ urlTextBox.Location = new System.Drawing.Point(12, 354);
+ urlTextBox.Name = "urlTextBox";
+ urlTextBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ urlTextBox.Size = new System.Drawing.Size(100, 23);
+ urlTextBox.TabIndex = 11;
+ urlTextBox.Text = "Url";
+ urlTextBox.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label6
+ //
+ label6.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label6.Location = new System.Drawing.Point(12, 406);
+ label6.Name = "label6";
+ label6.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label6.Size = new System.Drawing.Size(100, 23);
+ label6.TabIndex = 13;
+ label6.Text = "Type";
+ label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // typeComboBox
+ //
+ typeComboBox.FormattingEnabled = true;
+ typeComboBox.Location = new System.Drawing.Point(12, 432);
+ typeComboBox.Name = "typeComboBox";
+ typeComboBox.Size = new System.Drawing.Size(324, 23);
+ typeComboBox.TabIndex = 14;
+ //
+ // customerComboBox
+ //
+ customerComboBox.FormattingEnabled = true;
+ customerComboBox.Location = new System.Drawing.Point(12, 484);
+ customerComboBox.Name = "customerComboBox";
+ customerComboBox.Size = new System.Drawing.Size(324, 23);
+ customerComboBox.TabIndex = 16;
+ //
+ // customerLabel
+ //
+ customerLabel.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ customerLabel.Location = new System.Drawing.Point(12, 458);
+ customerLabel.Name = "customerLabel";
+ customerLabel.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ customerLabel.Size = new System.Drawing.Size(100, 23);
+ customerLabel.TabIndex = 15;
+ customerLabel.Text = "Customer";
+ customerLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // startPickerDate
+ //
+ startPickerDate.CustomFormat = "dddd MMMM dd @ hh:mm tt";
+ startPickerDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
+ startPickerDate.Location = new System.Drawing.Point(12, 536);
+ startPickerDate.Name = "startPickerDate";
+ startPickerDate.Size = new System.Drawing.Size(159, 23);
+ startPickerDate.TabIndex = 17;
+ //
+ // label7
+ //
+ label7.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label7.Location = new System.Drawing.Point(12, 510);
+ label7.Name = "label7";
+ label7.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label7.Size = new System.Drawing.Size(100, 23);
+ label7.TabIndex = 18;
+ label7.Text = "Start Time";
+ label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label8
+ //
+ label8.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, ((System.Drawing.FontStyle)(System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)), System.Drawing.GraphicsUnit.Point, ((byte)0));
+ label8.Location = new System.Drawing.Point(12, 562);
+ label8.Name = "label8";
+ label8.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ label8.Size = new System.Drawing.Size(100, 23);
+ label8.TabIndex = 20;
+ label8.Text = "End Time";
+ label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // endPickerDate
+ //
+ endPickerDate.CustomFormat = "dddd MMMM dd @ hh:mm tt";
+ endPickerDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
+ endPickerDate.Location = new System.Drawing.Point(12, 588);
+ endPickerDate.Name = "endPickerDate";
+ endPickerDate.Size = new System.Drawing.Size(159, 23);
+ endPickerDate.TabIndex = 19;
+ //
+ // startPickerTime
+ //
+ startPickerTime.CustomFormat = "dddd MMMM dd @ hh:mm tt";
+ startPickerTime.Format = System.Windows.Forms.DateTimePickerFormat.Time;
+ startPickerTime.Location = new System.Drawing.Point(177, 536);
+ startPickerTime.Name = "startPickerTime";
+ startPickerTime.ShowUpDown = true;
+ startPickerTime.Size = new System.Drawing.Size(159, 23);
+ startPickerTime.TabIndex = 21;
+ //
+ // endPickerTime
+ //
+ endPickerTime.CustomFormat = "dddd MMMM dd @ hh:mm tt";
+ endPickerTime.Format = System.Windows.Forms.DateTimePickerFormat.Time;
+ endPickerTime.Location = new System.Drawing.Point(177, 588);
+ endPickerTime.Name = "endPickerTime";
+ endPickerTime.ShowUpDown = true;
+ endPickerTime.Size = new System.Drawing.Size(159, 23);
+ endPickerTime.TabIndex = 22;
+ //
+ // AddOrUpdateAppointmentForm
+ //
+ AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ ClientSize = new System.Drawing.Size(943, 796);
+ Controls.Add(endPickerTime);
+ Controls.Add(startPickerTime);
+ Controls.Add(label8);
+ Controls.Add(endPickerDate);
+ Controls.Add(label7);
+ Controls.Add(startPickerDate);
+ Controls.Add(customerComboBox);
+ Controls.Add(customerLabel);
+ Controls.Add(typeComboBox);
+ Controls.Add(label6);
+ Controls.Add(textBox2);
+ Controls.Add(urlTextBox);
+ Controls.Add(contactTextBox);
+ Controls.Add(label5);
+ Controls.Add(locationTextBox);
+ Controls.Add(label4);
+ Controls.Add(descriptionTextBox);
+ Controls.Add(label3);
+ Controls.Add(textBox1);
+ Controls.Add(label2);
+ Controls.Add(label1);
+ Controls.Add(saveButton);
+ Controls.Add(cancelButton);
+ Text = "Update Appointment";
+ ResumeLayout(false);
+ PerformLayout();
}
+ private System.Windows.Forms.DateTimePicker startPickerDate;
+ private System.Windows.Forms.DateTimePicker endPickerDate;
+
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private System.Windows.Forms.DateTimePicker dateTimePicker2;
+
+ private System.Windows.Forms.ComboBox customerComboBox;
+ private System.Windows.Forms.Label customerLabel;
+ private System.Windows.Forms.DateTimePicker startPickerTime;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.DateTimePicker endPickerTime;
+
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.ComboBox typeComboBox;
+
+ private System.Windows.Forms.TextBox locationTextBox;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox contactTextBox;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.Label urlTextBox;
+
+ private System.Windows.Forms.TextBox descriptionTextBox;
+ private System.Windows.Forms.Label label3;
+
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox textBox1;
+
+ private System.Windows.Forms.Label label1;
+
+ private System.Windows.Forms.Button cancelButton;
+ private System.Windows.Forms.Button saveButton;
+
#endregion
}
\ No newline at end of file
diff --git a/C969Project/AppointmentsForm.Designer.cs b/C969Project/AppointmentsForm.Designer.cs
index 3a7d909..429cf67 100644
--- a/C969Project/AppointmentsForm.Designer.cs
+++ b/C969Project/AppointmentsForm.Designer.cs
@@ -78,6 +78,7 @@ partial class AppointmentsForm
//
// deleteButton
//
+ deleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right));
deleteButton.Location = new System.Drawing.Point(676, 540);
deleteButton.Name = "deleteButton";
deleteButton.Size = new System.Drawing.Size(75, 23);
@@ -87,6 +88,7 @@ partial class AppointmentsForm
//
// showAllButton
//
+ showAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right));
showAllButton.Location = new System.Drawing.Point(773, 185);
showAllButton.Name = "showAllButton";
showAllButton.Size = new System.Drawing.Size(227, 23);
diff --git a/C969Project/AppointmentsForm.cs b/C969Project/AppointmentsForm.cs
index ca5a9df..fa8d7ca 100644
--- a/C969Project/AppointmentsForm.cs
+++ b/C969Project/AppointmentsForm.cs
@@ -6,6 +6,7 @@ namespace C969Project;
public partial class AppointmentsForm : Form
{
private List _appointments = new();
+ private AddOrUpdateAppointmentForm _addOrUpdateAppointmentForm = new();
public AppointmentsForm()
{
@@ -16,6 +17,18 @@ public partial class AppointmentsForm : Form
calendar.DateSelected += ShowAppointmentsFromSelectedDay;
showAllButton.Click += UpdateAppointmentsList;
deleteButton.Click += DeleteButtonOnClick;
+ addButton.Click += AddButtonOnClick;
+ modifyButton.Click += ModifyButtonOnClick;
+ }
+
+ private void ModifyButtonOnClick(object? sender, EventArgs e)
+ {
+ _addOrUpdateAppointmentForm.ShowDialog();
+ }
+
+ private void AddButtonOnClick(object? sender, EventArgs e)
+ {
+ _addOrUpdateAppointmentForm.ShowDialog();
}
private void DeleteButtonOnClick(object? sender, EventArgs e)