diff --git a/.vs/JobFairApp/v15/.suo b/.vs/JobFairApp/v15/.suo new file mode 100644 index 0000000..2f72a99 Binary files /dev/null and b/.vs/JobFairApp/v15/.suo differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index 427fa93..f71febc 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -2,7 +2,9 @@ "ExpandedNodes": [ "", "\\JobFairApp", - "\\JobFairApp\\JobFairApp" + "\\JobFairApp\\JobFairApp", + "\\JobFairApp\\JobFairApp\\Classes", + "\\JobFairApp\\JobFairApp\\Forms" ], "SelectedNode": "\\JobFairApp\\JobFairApp.sln", "PreviewInSolutionExplorer": false diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index e886493..e9da610 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/JobFairApp/.vs/JobFairApp/v15/.suo b/JobFairApp/.vs/JobFairApp/v15/.suo index c2007d9..e06fda7 100644 Binary files a/JobFairApp/.vs/JobFairApp/v15/.suo and b/JobFairApp/.vs/JobFairApp/v15/.suo differ diff --git a/JobFairApp/.vs/JobFairApp/v15/sqlite3/storage.ide b/JobFairApp/.vs/JobFairApp/v15/sqlite3/storage.ide index 8d56e5d..78b72d1 100644 Binary files a/JobFairApp/.vs/JobFairApp/v15/sqlite3/storage.ide and b/JobFairApp/.vs/JobFairApp/v15/sqlite3/storage.ide differ diff --git a/JobFairApp/JobFairApp/Classes/Company.cs b/JobFairApp/JobFairApp/Classes/Company.cs new file mode 100644 index 0000000..cdd9961 --- /dev/null +++ b/JobFairApp/JobFairApp/Classes/Company.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data.SqlClient; +using System.Data.Sql; +using System.Data; + +namespace JobFairApp.Classes +{ + class Company : ISQLObject + { + public int ID = MySQLUtils.NullID; + public String name; + public String email; + public String phone; + public String description; + + + + public Company FromID(int ID) + { + String query = "SELECT * FROM Companies WHERE ID = \"" + ID + "\""; + + SqlConnection connection = new SqlConnection(MySQLUtils.ConnectionString); + + connection.Open(); + + SqlCommand cmd = new SqlCommand(); + cmd.CommandText = query; + cmd.CommandType = CommandType.Text; + cmd.Connection = connection; + + SqlDataReader reader = cmd.ExecuteReader(); + connection.Close(); + + return FromDataReader(reader); + } + public Company FromDataReader(SqlDataReader reader) + { + ID = reader.GetInt32(reader.GetOrdinal("ID")); + name = reader.GetString(reader.GetOrdinal("Name")); + description = reader.GetString(reader.GetOrdinal("Description")); + phone = reader.GetString(reader.GetOrdinal("Phone")); + email = reader.GetString(reader.GetOrdinal("Email")); + + reader.Read();//advance reader because it may have other records + + return this; + } + + public Company FromDataRow(DataRow row) + { + ID = (int)row["ID"]; + name = (String)row["Name"]; + email = (String)row["Email"]; + phone = (String)row["Phone"]; + description = (String)row["Description"]; + + + return this; + } + + public int Insert() + { + String statement; + if (ID == -1) + { + statement = "INSERT INTO Venues (Name, Description, Phone, Email ) VALUES" + + "(" + + "'" + name + "'," + + "'" + description + "'," + + "'" + phone + " ', " + + " ' " + email + "')"; + } + else + { + statement = "UPDATE People SET " + + "Name = '" + name + "'" + + "Description = '" + description + "'" + + "Phone = '" + phone + "'" + + "Email = '" + email + "'"; + } + + SqlConnection connection = new SqlConnection(MySQLUtils.ConnectionString); + + connection.Open(); + + SqlCommand command = new SqlCommand(); + command.CommandText = statement; + command.CommandType = CommandType.Text; + command.Connection = connection; + int retValue = command.ExecuteNonQuery(); + + connection.Close(); + + return retValue; + } + + public int Set() + { + if (ID == MySQLUtils.NullID) return 0; + + String statement; + statement = "UPDATE People SET " + + "Name = '" + name + "'" + + " Description = '" + description + "'" + + " Phone = '" + phone + "'"+ + " Email = '" + email + "'"; + + SqlConnection connection = new SqlConnection(MySQLUtils.ConnectionString); + + connection.Open(); + + SqlCommand command = new SqlCommand(); + command.CommandText = statement; + command.CommandType = CommandType.Text; + + int retValue = command.ExecuteNonQuery(); + + connection.Close(); + + return retValue; + } + } +} diff --git a/JobFairApp/JobFairApp/Forms/AddCompanyForm.Designer.cs b/JobFairApp/JobFairApp/Forms/AddCompanyForm.Designer.cs new file mode 100644 index 0000000..a2c2874 --- /dev/null +++ b/JobFairApp/JobFairApp/Forms/AddCompanyForm.Designer.cs @@ -0,0 +1,149 @@ +namespace JobFairApp.Forms +{ + partial class AddCompanyForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(35, 52); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(82, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Company Name"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(82, 75); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(32, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Email"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(82, 104); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(38, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Phone"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(123, 49); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(100, 20); + this.textBox1.TabIndex = 3; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(123, 75); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(100, 20); + this.textBox2.TabIndex = 4; + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(123, 101); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(100, 20); + this.textBox3.TabIndex = 5; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(92, 18); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(77, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Company Form"; + // + // richTextBox1 + // + this.richTextBox1.Location = new System.Drawing.Point(123, 127); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(100, 96); + this.richTextBox1.TabIndex = 7; + this.richTextBox1.Text = ""; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(57, 140); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(60, 13); + this.label5.TabIndex = 8; + this.label5.Text = "Description"; + // + // AddCompanyForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(284, 261); + this.Controls.Add(this.label5); + this.Controls.Add(this.richTextBox1); + this.Controls.Add(this.label4); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "AddCompanyForm"; + this.Text = "AddCompanyForm"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/JobFairApp/JobFairApp/Forms/AddCompanyForm.cs b/JobFairApp/JobFairApp/Forms/AddCompanyForm.cs new file mode 100644 index 0000000..0aea6ad --- /dev/null +++ b/JobFairApp/JobFairApp/Forms/AddCompanyForm.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JobFairApp.Forms +{ + public partial class AddCompanyForm : Form + { + public AddCompanyForm() + { + InitializeComponent(); + } + } +} diff --git a/JobFairApp/JobFairApp/Forms/AddCompanyForm.resx b/JobFairApp/JobFairApp/Forms/AddCompanyForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JobFairApp/JobFairApp/Forms/AddCompanyForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JobFairApp/JobFairApp/Forms/CompanyProfile.Designer.cs b/JobFairApp/JobFairApp/Forms/CompanyProfile.Designer.cs new file mode 100644 index 0000000..3f3bd53 --- /dev/null +++ b/JobFairApp/JobFairApp/Forms/CompanyProfile.Designer.cs @@ -0,0 +1,120 @@ +namespace JobFairApp.Forms +{ + partial class CompanyProfile + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // richTextBox1 + // + this.richTextBox1.Location = new System.Drawing.Point(179, 98); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(171, 190); + this.richTextBox1.TabIndex = 0; + this.richTextBox1.Text = ""; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(121, 27); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(91, 24); + this.label1.TabIndex = 1; + this.label1.Text = "Company"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 127); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(38, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Phone"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(12, 153); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(32, 13); + this.label3.TabIndex = 3; + this.label3.Text = "Email"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(89, 127); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(35, 13); + this.label4.TabIndex = 4; + this.label4.Text = "label4"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(89, 153); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(35, 13); + this.label5.TabIndex = 5; + this.label5.Text = "label5"; + // + // CompanyProfile + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(362, 300); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.richTextBox1); + this.Name = "CompanyProfile"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/JobFairApp/JobFairApp/Forms/CompanyProfile.cs b/JobFairApp/JobFairApp/Forms/CompanyProfile.cs new file mode 100644 index 0000000..6732dd6 --- /dev/null +++ b/JobFairApp/JobFairApp/Forms/CompanyProfile.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JobFairApp.Forms +{ + public partial class CompanyProfile : Form + { + public CompanyProfile() + { + InitializeComponent(); + } + } +} diff --git a/JobFairApp/JobFairApp/Forms/CompanyProfile.resx b/JobFairApp/JobFairApp/Forms/CompanyProfile.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JobFairApp/JobFairApp/Forms/CompanyProfile.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JobFairApp/JobFairApp/JobFairApp.csproj b/JobFairApp/JobFairApp/JobFairApp.csproj index 249a891..19a12a0 100644 --- a/JobFairApp/JobFairApp/JobFairApp.csproj +++ b/JobFairApp/JobFairApp/JobFairApp.csproj @@ -46,6 +46,7 @@ + @@ -61,6 +62,12 @@ Form1.cs + + Form + + + AddCompanyForm.cs + Form @@ -85,6 +92,12 @@ CreateVenue.cs + + Form + + + CompanyProfile.cs + UserControl @@ -102,6 +115,12 @@ Form1.cs + + AddCompanyForm.cs + + + CompanyProfile.cs + CreateCandidate.cs diff --git a/JobFairApp/JobFairApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/JobFairApp/JobFairApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 28179ed..3a6631b 100644 Binary files a/JobFairApp/JobFairApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/JobFairApp/JobFairApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/JobFairApp/JobFairApp/obj/Debug/JobFairApp.csproj.CoreCompileInputs.cache b/JobFairApp/JobFairApp/obj/Debug/JobFairApp.csproj.CoreCompileInputs.cache index 2e99fe7..f9924d0 100644 --- a/JobFairApp/JobFairApp/obj/Debug/JobFairApp.csproj.CoreCompileInputs.cache +++ b/JobFairApp/JobFairApp/obj/Debug/JobFairApp.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -77518104bc0c2c06c79f16f5cb1b609e3a7a91ae +ff8d99fc08b86584d0d44c12db9250a7c0dbbd48 diff --git a/JobFairApp/JobFairApp/obj/Release/JobFairApp.csproj.CoreCompileInputs.cache b/JobFairApp/JobFairApp/obj/Release/JobFairApp.csproj.CoreCompileInputs.cache index 710f29d..34e55b9 100644 --- a/JobFairApp/JobFairApp/obj/Release/JobFairApp.csproj.CoreCompileInputs.cache +++ b/JobFairApp/JobFairApp/obj/Release/JobFairApp.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -77518104bc0c2c06c79f16f5cb1b609e3a7a91ae +ff8d99fc08b86584d0d44c12db9250a7c0dbbd48