diff --git a/.vs/PayrollSystem/FileContentIndex/0e14e702-14d6-4a37-badd-c265c9ba97ed.vsidx b/.vs/PayrollSystem/FileContentIndex/0e14e702-14d6-4a37-badd-c265c9ba97ed.vsidx
deleted file mode 100644
index 5b8b01a..0000000
Binary files a/.vs/PayrollSystem/FileContentIndex/0e14e702-14d6-4a37-badd-c265c9ba97ed.vsidx and /dev/null differ
diff --git a/.vs/PayrollSystem/FileContentIndex/490b4072-7d49-4f6f-b86a-0ba42895faa4.vsidx b/.vs/PayrollSystem/FileContentIndex/490b4072-7d49-4f6f-b86a-0ba42895faa4.vsidx
deleted file mode 100644
index e58e72a..0000000
Binary files a/.vs/PayrollSystem/FileContentIndex/490b4072-7d49-4f6f-b86a-0ba42895faa4.vsidx and /dev/null differ
diff --git a/.vs/PayrollSystem/FileContentIndex/549860a6-d296-414a-a66f-292a974fe853.vsidx b/.vs/PayrollSystem/FileContentIndex/549860a6-d296-414a-a66f-292a974fe853.vsidx
deleted file mode 100644
index eaf9027..0000000
Binary files a/.vs/PayrollSystem/FileContentIndex/549860a6-d296-414a-a66f-292a974fe853.vsidx and /dev/null differ
diff --git a/.vs/PayrollSystem/FileContentIndex/6971894b-3abe-4e64-9779-c1d5c8a0a542.vsidx b/.vs/PayrollSystem/FileContentIndex/6971894b-3abe-4e64-9779-c1d5c8a0a542.vsidx
new file mode 100644
index 0000000..300c28b
Binary files /dev/null and b/.vs/PayrollSystem/FileContentIndex/6971894b-3abe-4e64-9779-c1d5c8a0a542.vsidx differ
diff --git a/.vs/PayrollSystem/FileContentIndex/7043ade8-b068-468a-b2d9-e08aa713d85c.vsidx b/.vs/PayrollSystem/FileContentIndex/7043ade8-b068-468a-b2d9-e08aa713d85c.vsidx
deleted file mode 100644
index 0b0aac0..0000000
Binary files a/.vs/PayrollSystem/FileContentIndex/7043ade8-b068-468a-b2d9-e08aa713d85c.vsidx and /dev/null differ
diff --git a/.vs/PayrollSystem/FileContentIndex/7bcce091-433e-460f-9231-9ef278a4ac66.vsidx b/.vs/PayrollSystem/FileContentIndex/7bcce091-433e-460f-9231-9ef278a4ac66.vsidx
new file mode 100644
index 0000000..b4248f3
Binary files /dev/null and b/.vs/PayrollSystem/FileContentIndex/7bcce091-433e-460f-9231-9ef278a4ac66.vsidx differ
diff --git a/.vs/PayrollSystem/FileContentIndex/8d8fc553-a2e3-40be-a3ee-6b2e67936e53.vsidx b/.vs/PayrollSystem/FileContentIndex/8d8fc553-a2e3-40be-a3ee-6b2e67936e53.vsidx
new file mode 100644
index 0000000..2d5b9f4
Binary files /dev/null and b/.vs/PayrollSystem/FileContentIndex/8d8fc553-a2e3-40be-a3ee-6b2e67936e53.vsidx differ
diff --git a/.vs/PayrollSystem/FileContentIndex/daf9380f-7999-48e8-a2a1-fdd0e5d57a7b.vsidx b/.vs/PayrollSystem/FileContentIndex/daf9380f-7999-48e8-a2a1-fdd0e5d57a7b.vsidx
new file mode 100644
index 0000000..deea61b
Binary files /dev/null and b/.vs/PayrollSystem/FileContentIndex/daf9380f-7999-48e8-a2a1-fdd0e5d57a7b.vsidx differ
diff --git a/.vs/PayrollSystem/v17/.suo b/.vs/PayrollSystem/v17/.suo
index 29309a9..89f067a 100644
Binary files a/.vs/PayrollSystem/v17/.suo and b/.vs/PayrollSystem/v17/.suo differ
diff --git a/.vs/PayrollSystem/v17/DocumentLayout.json b/.vs/PayrollSystem/v17/DocumentLayout.json
index bd9cb17..61950bd 100644
--- a/.vs/PayrollSystem/v17/DocumentLayout.json
+++ b/.vs/PayrollSystem/v17/DocumentLayout.json
@@ -2,36 +2,56 @@
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\",
"Documents": [
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_modify_employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_modify_employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_employees.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_employees.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_modify_employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_modify_employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
+ },
{
"AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_dashboard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_dashboard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_dashboard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
- "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_dashboard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
- },
- {
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
- "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
- },
- {
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
- "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
- },
- {
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\payrolldbdataset.xsd||{07AC752B-D2B0-4DCD-AD9C-237BF561A30A}",
- "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\payrolldbdataset.xsd||{07AC752B-D2B0-4DCD-AD9C-237BF561A30A}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\helpers.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\helpers.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|c:\\users\\warlock\\source\\repos\\payrollsystem\\payrollsystem\\form_employees.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_employees.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\payrolldbdataset.xsd||{07AC752B-D2B0-4DCD-AD9C-237BF561A30A}",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\payrolldbdataset.xsd||{07AC752B-D2B0-4DCD-AD9C-237BF561A30A}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\form_dashboard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_dashboard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form_main.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|C:\\Users\\warlock\\source\\repos\\PayrollSystem\\payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F11EDBAB-9CD5-45D6-A949-595713DC63E2}|PayrollSystem\\PayrollSystem.csproj|solutionrelative:payrollsystem\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
@@ -42,24 +62,87 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 0,
+ "SelectedChildIndex": 1,
"Children": [
+ {
+ "$type": "Document",
+ "DocumentIndex": 5,
+ "Title": "Helpers.cs",
+ "DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\Helpers.cs",
+ "RelativeDocumentMoniker": "PayrollSystem\\Helpers.cs",
+ "ToolTip": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\Helpers.cs",
+ "RelativeToolTip": "PayrollSystem\\Helpers.cs",
+ "ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAApAAAA",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2024-08-25T17:37:30.193Z",
+ "EditorCaption": ""
+ },
{
"$type": "Document",
"DocumentIndex": 0,
+ "Title": "form_modify_employee.cs",
+ "DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_modify_employee.cs",
+ "RelativeDocumentMoniker": "PayrollSystem\\form_modify_employee.cs",
+ "ToolTip": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_modify_employee.cs",
+ "RelativeToolTip": "PayrollSystem\\form_modify_employee.cs",
+ "ViewState": "AQIAABEAAAAAAAAAAAAQwCUAAABGAAAA",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2024-08-25T17:31:29.274Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 2,
+ "Title": "form_modify_employee.cs [Design]",
+ "DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_modify_employee.cs",
+ "RelativeDocumentMoniker": "PayrollSystem\\form_modify_employee.cs",
+ "ToolTip": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_modify_employee.cs [Design]",
+ "RelativeToolTip": "PayrollSystem\\form_modify_employee.cs [Design]",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2024-08-25T17:28:33.607Z",
+ "EditorCaption": " [Design]"
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 1,
+ "Title": "form_employees.cs",
+ "DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_employees.cs",
+ "RelativeDocumentMoniker": "PayrollSystem\\form_employees.cs",
+ "ToolTip": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_employees.cs",
+ "RelativeToolTip": "PayrollSystem\\form_employees.cs",
+ "ViewState": "AQIAAEIAAAAAAAAAAAAmwEcAAABKAAAA",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2024-08-25T17:03:13.406Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 6,
+ "Title": "form_employees.cs [Design]",
+ "DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_employees.cs",
+ "RelativeDocumentMoniker": "PayrollSystem\\form_employees.cs",
+ "ToolTip": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_employees.cs [Design]",
+ "RelativeToolTip": "PayrollSystem\\form_employees.cs [Design]",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2024-08-25T17:03:11.483Z",
+ "EditorCaption": " [Design]"
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 3,
"Title": "form_dashboard.cs",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_dashboard.cs",
"RelativeDocumentMoniker": "PayrollSystem\\form_dashboard.cs",
"ToolTip": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_dashboard.cs",
"RelativeToolTip": "PayrollSystem\\form_dashboard.cs",
- "ViewState": "AQIAAAYAAAAAAAAAAAAIwDYAAABFAAAA",
+ "ViewState": "AQIAAAYAAAAAAAAAAAAIwBsAAABKAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-08-25T11:01:49.474Z",
"EditorCaption": ""
},
{
"$type": "Document",
- "DocumentIndex": 5,
+ "DocumentIndex": 7,
"Title": "payrolldbDataSet.xsd",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\payrolldbDataSet.xsd",
"RelativeDocumentMoniker": "PayrollSystem\\payrolldbDataSet.xsd",
@@ -71,7 +154,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 4,
+ "DocumentIndex": 11,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\Program.cs",
"RelativeDocumentMoniker": "PayrollSystem\\Program.cs",
@@ -84,7 +167,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 7,
+ "DocumentIndex": 12,
"Title": "Form1.cs",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\Form1.cs",
"RelativeDocumentMoniker": "PayrollSystem\\Form1.cs",
@@ -97,7 +180,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 6,
+ "DocumentIndex": 4,
"Title": "form_main.cs",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_main.cs",
"RelativeDocumentMoniker": "PayrollSystem\\form_main.cs",
@@ -110,7 +193,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 1,
+ "DocumentIndex": 8,
"Title": "form_dashboard.cs [Design]",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_dashboard.cs",
"RelativeDocumentMoniker": "PayrollSystem\\form_dashboard.cs",
@@ -122,7 +205,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 2,
+ "DocumentIndex": 9,
"Title": "form_main.cs [Design]",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\form_main.cs",
"RelativeDocumentMoniker": "PayrollSystem\\form_main.cs",
@@ -134,7 +217,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 3,
+ "DocumentIndex": 10,
"Title": "Form1.cs [Design]",
"DocumentMoniker": "C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\Form1.cs",
"RelativeDocumentMoniker": "PayrollSystem\\Form1.cs",
diff --git a/PayrollSystem/.vs/PayrollSystem.csproj.dtbcache.json b/PayrollSystem/.vs/PayrollSystem.csproj.dtbcache.json
new file mode 100644
index 0000000..41e4d3c
--- /dev/null
+++ b/PayrollSystem/.vs/PayrollSystem.csproj.dtbcache.json
@@ -0,0 +1 @@
+{"RootPath":"C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem","ProjectFileName":"PayrollSystem.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Form1.cs"},{"SourceFile":"Form1.Designer.cs"},{"SourceFile":"form_dashboard.cs"},{"SourceFile":"form_dashboard.Designer.cs"},{"SourceFile":"form_employees.cs"},{"SourceFile":"form_employees.Designer.cs"},{"SourceFile":"form_main.cs"},{"SourceFile":"form_main.Designer.cs"},{"SourceFile":"payrolldbDataSet.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Deployment.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\bin\\Debug\\PayrollSystem.exe","OutputItemRelativePath":"PayrollSystem.exe"},{"OutputItemFullPath":"C:\\Users\\warlock\\source\\repos\\PayrollSystem\\PayrollSystem\\bin\\Debug\\PayrollSystem.pdb","OutputItemRelativePath":"PayrollSystem.pdb"}],"CopyToOutputEntries":[]}
\ No newline at end of file
diff --git a/PayrollSystem/Helpers.cs b/PayrollSystem/Helpers.cs
new file mode 100644
index 0000000..6b0dded
--- /dev/null
+++ b/PayrollSystem/Helpers.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PayrollSystem
+{
+ public class Helpers
+ {
+ public static string conString = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\payrolldb.mdf;Integrated Security=True;Connect Timeout=30";
+
+ }
+}
diff --git a/PayrollSystem/PayrollSystem.csproj b/PayrollSystem/PayrollSystem.csproj
index 879aa4a..dd614fe 100644
--- a/PayrollSystem/PayrollSystem.csproj
+++ b/PayrollSystem/PayrollSystem.csproj
@@ -85,11 +85,23 @@
form_main.cs
+
+ Form
+
+
+ form_modify_employee.cs
+
+
True
True
payrolldbDataSet.xsd
+
+ True
+ True
+ payrolldbDataSet1.xsd
+
@@ -104,6 +116,9 @@
form_main.cs
+
+ form_modify_employee.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
@@ -124,6 +139,17 @@
payrolldbDataSet.xsd
+
+ payrolldbDataSet1.xsd
+
+
+ MSDataSetGenerator
+ payrolldbDataSet1.Designer.cs
+ Designer
+
+
+ payrolldbDataSet1.xsd
+
SettingsSingleFileGenerator
Settings.Designer.cs
diff --git a/PayrollSystem/bin/Debug/PayrollSystem.exe b/PayrollSystem/bin/Debug/PayrollSystem.exe
index 4521a28..ea10584 100644
Binary files a/PayrollSystem/bin/Debug/PayrollSystem.exe and b/PayrollSystem/bin/Debug/PayrollSystem.exe differ
diff --git a/PayrollSystem/bin/Debug/PayrollSystem.pdb b/PayrollSystem/bin/Debug/PayrollSystem.pdb
index 6972ffc..82d7b2c 100644
Binary files a/PayrollSystem/bin/Debug/PayrollSystem.pdb and b/PayrollSystem/bin/Debug/PayrollSystem.pdb differ
diff --git a/PayrollSystem/bin/Debug/payrolldb.mdf b/PayrollSystem/bin/Debug/payrolldb.mdf
index 722eb55..8aa2fc9 100644
Binary files a/PayrollSystem/bin/Debug/payrolldb.mdf and b/PayrollSystem/bin/Debug/payrolldb.mdf differ
diff --git a/PayrollSystem/bin/Debug/payrolldb_log.ldf b/PayrollSystem/bin/Debug/payrolldb_log.ldf
index 1dd0877..2b3627e 100644
Binary files a/PayrollSystem/bin/Debug/payrolldb_log.ldf and b/PayrollSystem/bin/Debug/payrolldb_log.ldf differ
diff --git a/PayrollSystem/form_dashboard.cs b/PayrollSystem/form_dashboard.cs
index 570b2a9..5b9d153 100644
--- a/PayrollSystem/form_dashboard.cs
+++ b/PayrollSystem/form_dashboard.cs
@@ -13,8 +13,6 @@ namespace PayrollSystem
{
public partial class form_dashboard : Form
{
- string conString = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\payrolldb.mdf;Integrated Security=True;Connect Timeout=30";
-
int employeeCount = 0;
int departmentsCount = 0;
@@ -27,7 +25,7 @@ namespace PayrollSystem
private void form_dashboard_Load(object sender, EventArgs e)
{
- using (SqlConnection con = new SqlConnection(conString))
+ using (SqlConnection con = new SqlConnection(Helpers.conString))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("SELECT COUNT(id) FROM Departments", con))
diff --git a/PayrollSystem/form_employees.Designer.cs b/PayrollSystem/form_employees.Designer.cs
index f2f0300..f179150 100644
--- a/PayrollSystem/form_employees.Designer.cs
+++ b/PayrollSystem/form_employees.Designer.cs
@@ -29,6 +29,12 @@
private void InitializeComponent()
{
this.list_employees = new System.Windows.Forms.ListView();
+ this.col_id = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_department = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_basic = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_allowance = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_joined = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.txtID = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
@@ -40,12 +46,6 @@
this.label4 = new System.Windows.Forms.Label();
this.combo_date_type = new System.Windows.Forms.ComboBox();
this.joined_date_picker = new System.Windows.Forms.DateTimePicker();
- this.col_id = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_department = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_basic = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_allowance = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_joined = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnAdd = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
@@ -68,6 +68,36 @@
this.list_employees.UseCompatibleStateImageBehavior = false;
this.list_employees.View = System.Windows.Forms.View.Details;
//
+ // col_id
+ //
+ this.col_id.Text = "ID";
+ this.col_id.Width = 54;
+ //
+ // col_name
+ //
+ this.col_name.Text = "Name";
+ this.col_name.Width = 226;
+ //
+ // col_department
+ //
+ this.col_department.Text = "Department";
+ this.col_department.Width = 147;
+ //
+ // col_basic
+ //
+ this.col_basic.Text = "Basic";
+ this.col_basic.Width = 131;
+ //
+ // col_allowance
+ //
+ this.col_allowance.Text = "Allowance";
+ this.col_allowance.Width = 140;
+ //
+ // col_joined
+ //
+ this.col_joined.Text = "Joined On";
+ this.col_joined.Width = 224;
+ //
// txtID
//
this.txtID.Location = new System.Drawing.Point(39, 29);
@@ -172,36 +202,6 @@
this.joined_date_picker.Visible = false;
this.joined_date_picker.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged);
//
- // col_id
- //
- this.col_id.Text = "ID";
- this.col_id.Width = 54;
- //
- // col_name
- //
- this.col_name.Text = "Name";
- this.col_name.Width = 226;
- //
- // col_department
- //
- this.col_department.Text = "Department";
- this.col_department.Width = 147;
- //
- // col_basic
- //
- this.col_basic.Text = "Basic";
- this.col_basic.Width = 131;
- //
- // col_allowance
- //
- this.col_allowance.Text = "Allowance";
- this.col_allowance.Width = 140;
- //
- // col_joined
- //
- this.col_joined.Text = "Joined On";
- this.col_joined.Width = 224;
- //
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(960, 72);
@@ -210,6 +210,7 @@
this.btnAdd.TabIndex = 12;
this.btnAdd.Text = "Add Employee";
this.btnAdd.UseVisualStyleBackColor = true;
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// button1
//
@@ -252,6 +253,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "form_employees";
this.Text = "form_employees";
+ this.Load += new System.EventHandler(this.form_employees_Load);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/PayrollSystem/form_employees.cs b/PayrollSystem/form_employees.cs
index 14ac37c..32a1a35 100644
--- a/PayrollSystem/form_employees.cs
+++ b/PayrollSystem/form_employees.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
+using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
@@ -15,6 +16,26 @@ namespace PayrollSystem
public form_employees()
{
InitializeComponent();
+ combo_date_type.SelectedIndex = 0;
+ combo_department.Items.Clear();
+ combo_department.Items.Add("Any");
+ using (SqlConnection connection = new SqlConnection(Helpers.conString))
+ {
+ connection.Open();
+ using (SqlCommand cmd = new SqlCommand("SELECT Name FROM Departments", connection))
+ {
+ using (SqlDataReader reader = cmd.ExecuteReader())
+ {
+ while (reader.Read())
+ {
+ combo_department.Items.Add(reader["Name"].ToString());
+ }
+ }
+ }
+ connection.Close();
+ }
+
+ combo_department.SelectedIndex = 0;
}
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
@@ -41,10 +62,75 @@ namespace PayrollSystem
{
Search();
}
- void Search()
+ private void form_employees_Load(object sender, EventArgs e)
{
-
+ Search();
}
+ void Search()
+ {
+ using(SqlConnection con = new SqlConnection(Helpers.conString))
+ {
+ con.Open();
+ //Prepare the WHERE Clauses
+ List clauses = new List();
+ if(txtID.Text.Length > 0) { clauses.Add($"Employees.ID='%{txtID.Text}%'"); }
+ if (txtName.Text.Length > 0) { clauses.Add($"Employees.Name='%{txtID.Text}%'"); }
+
+ if(combo_date_type.SelectedItem.ToString() != "Anytime") {
+ string condition = "=";
+ if (combo_date_type.SelectedItem.ToString() == "After")
+ {
+ condition = "<";
+ }else if(combo_date_type.SelectedItem.ToString() == "Before")
+ {
+ condition = ">";
+ }
+ clauses.Add($"Employees.Joined_Date{condition}{joined_date_picker.Value}");
+ }
+ if(combo_department.SelectedItem.ToString() != "Any")
+ {
+ clauses.Add($"Departments.Name={combo_department.SelectedItem.ToString()}");
+ }
+
+ //Calculate the final WHERE statement
+ string querySuffix = clauses.Count >0 ? $" WHERE {clauses[0]} " : "";
+ for(int i=1; i < clauses.Count; i++)
+ {
+ querySuffix += " AND "+clauses[i];
+ }
+
+ string baseQuery = "SELECT Employees.ID, Employees.Name, Departments.Name as DepartmentName, Departments.Basic, Employees.Allowance, Employees.Joined_Date FROM Employees JOIN Departments ON Employees.Department_ID=Departments.ID";
+ MessageBox.Show(baseQuery + querySuffix);
+ using (SqlCommand cmd = new SqlCommand(baseQuery + querySuffix, con))
+ {
+
+ using (SqlDataReader reader = cmd.ExecuteReader())
+ {
+ list_employees.Items.Clear();
+ while (reader.Read())
+ {
+ ListViewItem newItem = new ListViewItem(reader["ID"].ToString());
+ newItem.SubItems.Add(reader["Name"].ToString());
+ newItem.SubItems.Add(reader["DepartmentName"].ToString());
+ newItem.SubItems.Add(reader["Basic"].ToString());
+ newItem.SubItems.Add(reader["Allowance"].ToString());
+ newItem.SubItems.Add(reader["Joined_Date"].ToString());
+ list_employees.Items.Add(newItem);
+ }
+ }
+ }
+
+ con.Close();
+ }
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ form_modify_employee modifyForm = new form_modify_employee();
+ modifyForm.ShowDialog();
+
+ Search();
+ }
}
}
diff --git a/PayrollSystem/form_modify_employee.Designer.cs b/PayrollSystem/form_modify_employee.Designer.cs
new file mode 100644
index 0000000..e831cb3
--- /dev/null
+++ b/PayrollSystem/form_modify_employee.Designer.cs
@@ -0,0 +1,184 @@
+namespace PayrollSystem
+{
+ partial class form_modify_employee
+ {
+ ///
+ /// 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.btnAdd = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.txtName = new System.Windows.Forms.TextBox();
+ this.combo_department = new System.Windows.Forms.ComboBox();
+ this.txtAllowance = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.date_joined = new System.Windows.Forms.DateTimePicker();
+ this.SuspendLayout();
+ //
+ // btnAdd
+ //
+ this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnAdd.Location = new System.Drawing.Point(312, 162);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(108, 30);
+ this.btnAdd.TabIndex = 0;
+ this.btnAdd.Text = "Add";
+ this.btnAdd.UseVisualStyleBackColor = true;
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCancel.Location = new System.Drawing.Point(426, 162);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(108, 30);
+ this.btnCancel.TabIndex = 1;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(56, 37);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(41, 13);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "Name :";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(29, 80);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(68, 13);
+ this.label2.TabIndex = 3;
+ this.label2.Text = "Department :";
+ //
+ // txtName
+ //
+ this.txtName.Location = new System.Drawing.Point(103, 34);
+ this.txtName.Name = "txtName";
+ this.txtName.Size = new System.Drawing.Size(394, 20);
+ this.txtName.TabIndex = 4;
+ //
+ // combo_department
+ //
+ this.combo_department.FormattingEnabled = true;
+ this.combo_department.Location = new System.Drawing.Point(103, 77);
+ this.combo_department.Name = "combo_department";
+ this.combo_department.Size = new System.Drawing.Size(317, 21);
+ this.combo_department.TabIndex = 5;
+ //
+ // txtAllowance
+ //
+ this.txtAllowance.Location = new System.Drawing.Point(103, 124);
+ this.txtAllowance.Name = "txtAllowance";
+ this.txtAllowance.Size = new System.Drawing.Size(145, 20);
+ this.txtAllowance.TabIndex = 7;
+ this.txtAllowance.Text = "0";
+ this.txtAllowance.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(35, 127);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(62, 13);
+ this.label3.TabIndex = 6;
+ this.label3.Text = "Allowance :";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(254, 127);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(20, 13);
+ this.label4.TabIndex = 8;
+ this.label4.Text = "Rs";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(36, 170);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(61, 13);
+ this.label5.TabIndex = 9;
+ this.label5.Text = "Joined On :";
+ //
+ // date_joined
+ //
+ this.date_joined.Format = System.Windows.Forms.DateTimePickerFormat.Short;
+ this.date_joined.Location = new System.Drawing.Point(103, 166);
+ this.date_joined.Name = "date_joined";
+ this.date_joined.Size = new System.Drawing.Size(112, 20);
+ this.date_joined.TabIndex = 10;
+ //
+ // form_modify_employee
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(546, 204);
+ this.Controls.Add(this.date_joined);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.txtAllowance);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.combo_department);
+ this.Controls.Add(this.txtName);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnAdd);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "form_modify_employee";
+ this.Text = "Add New Employee";
+ this.Load += new System.EventHandler(this.form_modify_employee_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button btnAdd;
+ private System.Windows.Forms.Button btnCancel;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox txtName;
+ private System.Windows.Forms.ComboBox combo_department;
+ private System.Windows.Forms.TextBox txtAllowance;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.DateTimePicker date_joined;
+ }
+}
\ No newline at end of file
diff --git a/PayrollSystem/form_modify_employee.cs b/PayrollSystem/form_modify_employee.cs
new file mode 100644
index 0000000..709cf77
--- /dev/null
+++ b/PayrollSystem/form_modify_employee.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Data.SqlClient;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace PayrollSystem
+{
+ public partial class form_modify_employee : Form
+ {
+
+ int editingId = -1;
+ bool isEditing => editingId >= 0;
+ Dictionary departmentIdDic = new Dictionary();
+ public form_modify_employee(int _editingId = -1)
+ {
+ InitializeComponent();
+ editingId = _editingId;
+ }
+
+ private void form_modify_employee_Load(object sender, EventArgs e)
+ {
+ using(SqlConnection con = new SqlConnection(Helpers.conString))
+ {
+ con.Open();
+ using(SqlCommand cmd = new SqlCommand("SELECT * FROM Departments",con))
+ {
+ using(SqlDataReader reader = cmd.ExecuteReader())
+ {
+ departmentIdDic.Clear();
+ combo_department.Items.Clear();
+ while (reader.Read()) {
+ departmentIdDic.Add(reader["Name"].ToString(), reader["ID"].ToString());
+ combo_department.Items.Add(reader["Name"].ToString());
+ }
+ if (combo_department.Items.Count > 0) { combo_department.SelectedIndex = 0; }
+ }
+ }
+ con.Close();
+ }
+
+ this.Text = isEditing ? "Edit Employee Data" : "Add new Employee";
+ btnAdd.Text = isEditing ? "Edit" : "Add";
+
+ if (!isEditing)
+ {
+ date_joined.Value = DateTime.Now;
+ }
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ using(SqlConnection connection = new SqlConnection(Helpers.conString))
+ {
+ string query = "INSERT INTO Employees (Name, Department_ID, Allowance, Joined_Date) VALUES(@name, @depId, @allowance, @joinedDate)";
+ using (SqlCommand command = new SqlCommand(query, connection))
+ {
+ command.Parameters.AddWithValue("@name", txtName.Text);
+ command.Parameters.AddWithValue("@depId", departmentIdDic[combo_department.SelectedItem.ToString()]);
+ command.Parameters.AddWithValue("@allowance", txtAllowance.Text);
+ command.Parameters.AddWithValue("@joinedDate", date_joined.Value);
+
+ connection.Open();
+ int result = command.ExecuteNonQuery();
+ connection.Close();
+
+ if (result < 0)
+ {
+ MessageBox.Show("There was an error adding new employee", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/PayrollSystem/form_modify_employee.resx b/PayrollSystem/form_modify_employee.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/PayrollSystem/form_modify_employee.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/PayrollSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/PayrollSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index c8e0894..2dd1442 100644
Binary files a/PayrollSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/PayrollSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/PayrollSystem/obj/Debug/PayrollSystem.csproj.CoreCompileInputs.cache b/PayrollSystem/obj/Debug/PayrollSystem.csproj.CoreCompileInputs.cache
index 943f2a9..7bbf483 100644
--- a/PayrollSystem/obj/Debug/PayrollSystem.csproj.CoreCompileInputs.cache
+++ b/PayrollSystem/obj/Debug/PayrollSystem.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-6601523e2eec0b563a110cecb07652cb35aeec823cb494b099d289ce731c0491
+f0475c0bcd5a36c968bb1dae4fa9ab9f3ebd0b02be5078e6215513bfbd4b243e
diff --git a/PayrollSystem/obj/Debug/PayrollSystem.csproj.FileListAbsolute.txt b/PayrollSystem/obj/Debug/PayrollSystem.csproj.FileListAbsolute.txt
index 060c31f..9342cc6 100644
--- a/PayrollSystem/obj/Debug/PayrollSystem.csproj.FileListAbsolute.txt
+++ b/PayrollSystem/obj/Debug/PayrollSystem.csproj.FileListAbsolute.txt
@@ -13,3 +13,4 @@ C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\obj\Debug\PayrollSyste
C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\bin\Debug\payrolldb.mdf
C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\bin\Debug\payrolldb_log.ldf
C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\obj\Debug\PayrollSystem.form_employees.resources
+C:\Users\warlock\source\repos\PayrollSystem\PayrollSystem\obj\Debug\PayrollSystem.form_modify_employee.resources
diff --git a/PayrollSystem/obj/Debug/PayrollSystem.csproj.GenerateResource.cache b/PayrollSystem/obj/Debug/PayrollSystem.csproj.GenerateResource.cache
index e85488f..e09789e 100644
Binary files a/PayrollSystem/obj/Debug/PayrollSystem.csproj.GenerateResource.cache and b/PayrollSystem/obj/Debug/PayrollSystem.csproj.GenerateResource.cache differ
diff --git a/PayrollSystem/obj/Debug/PayrollSystem.exe b/PayrollSystem/obj/Debug/PayrollSystem.exe
index 4521a28..ea10584 100644
Binary files a/PayrollSystem/obj/Debug/PayrollSystem.exe and b/PayrollSystem/obj/Debug/PayrollSystem.exe differ
diff --git a/PayrollSystem/obj/Debug/PayrollSystem.form_modify_employee.resources b/PayrollSystem/obj/Debug/PayrollSystem.form_modify_employee.resources
new file mode 100644
index 0000000..6c05a97
Binary files /dev/null and b/PayrollSystem/obj/Debug/PayrollSystem.form_modify_employee.resources differ
diff --git a/PayrollSystem/obj/Debug/PayrollSystem.pdb b/PayrollSystem/obj/Debug/PayrollSystem.pdb
index 6972ffc..82d7b2c 100644
Binary files a/PayrollSystem/obj/Debug/PayrollSystem.pdb and b/PayrollSystem/obj/Debug/PayrollSystem.pdb differ
diff --git a/PayrollSystem/obj/Debug/TempPE/payrolldbDataSet1.Designer.cs.dll b/PayrollSystem/obj/Debug/TempPE/payrolldbDataSet1.Designer.cs.dll
new file mode 100644
index 0000000..e5afa7e
Binary files /dev/null and b/PayrollSystem/obj/Debug/TempPE/payrolldbDataSet1.Designer.cs.dll differ
diff --git a/PayrollSystem/payrolldb.mdf b/PayrollSystem/payrolldb.mdf
index 722eb55..db68f87 100644
Binary files a/PayrollSystem/payrolldb.mdf and b/PayrollSystem/payrolldb.mdf differ
diff --git a/PayrollSystem/payrolldbDataSet1.Designer.cs b/PayrollSystem/payrolldbDataSet1.Designer.cs
new file mode 100644
index 0000000..41a6256
--- /dev/null
+++ b/PayrollSystem/payrolldbDataSet1.Designer.cs
@@ -0,0 +1,2284 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+#pragma warning disable 1591
+
+namespace PayrollSystem {
+
+
+ ///
+ ///Represents a strongly typed in-memory cache of data.
+ ///
+ [global::System.Serializable()]
+ [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+ [global::System.ComponentModel.ToolboxItem(true)]
+ [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
+ [global::System.Xml.Serialization.XmlRootAttribute("payrolldbDataSet1")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
+ public partial class payrolldbDataSet1 : global::System.Data.DataSet {
+
+ private DepartmentsDataTable tableDepartments;
+
+ private EmployeesDataTable tableEmployees;
+
+ private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public payrolldbDataSet1() {
+ this.BeginInit();
+ this.InitClass();
+ global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
+ base.Tables.CollectionChanged += schemaChangedHandler;
+ base.Relations.CollectionChanged += schemaChangedHandler;
+ this.EndInit();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected payrolldbDataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
+ base(info, context, false) {
+ if ((this.IsBinarySerialized(info, context) == true)) {
+ this.InitVars(false);
+ global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
+ this.Tables.CollectionChanged += schemaChangedHandler1;
+ this.Relations.CollectionChanged += schemaChangedHandler1;
+ return;
+ }
+ string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
+ if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
+ global::System.Data.DataSet ds = new global::System.Data.DataSet();
+ ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
+ if ((ds.Tables["Departments"] != null)) {
+ base.Tables.Add(new DepartmentsDataTable(ds.Tables["Departments"]));
+ }
+ if ((ds.Tables["Employees"] != null)) {
+ base.Tables.Add(new EmployeesDataTable(ds.Tables["Employees"]));
+ }
+ this.DataSetName = ds.DataSetName;
+ this.Prefix = ds.Prefix;
+ this.Namespace = ds.Namespace;
+ this.Locale = ds.Locale;
+ this.CaseSensitive = ds.CaseSensitive;
+ this.EnforceConstraints = ds.EnforceConstraints;
+ this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
+ this.InitVars();
+ }
+ else {
+ this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
+ }
+ this.GetSerializationData(info, context);
+ global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
+ base.Tables.CollectionChanged += schemaChangedHandler;
+ this.Relations.CollectionChanged += schemaChangedHandler;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public DepartmentsDataTable Departments {
+ get {
+ return this.tableDepartments;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public EmployeesDataTable Employees {
+ get {
+ return this.tableEmployees;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.BrowsableAttribute(true)]
+ [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
+ public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
+ get {
+ return this._schemaSerializationMode;
+ }
+ set {
+ this._schemaSerializationMode = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public new global::System.Data.DataTableCollection Tables {
+ get {
+ return base.Tables;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public new global::System.Data.DataRelationCollection Relations {
+ get {
+ return base.Relations;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void InitializeDerivedDataSet() {
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public override global::System.Data.DataSet Clone() {
+ payrolldbDataSet1 cln = ((payrolldbDataSet1)(base.Clone()));
+ cln.InitVars();
+ cln.SchemaSerializationMode = this.SchemaSerializationMode;
+ return cln;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override bool ShouldSerializeTables() {
+ return false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override bool ShouldSerializeRelations() {
+ return false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
+ if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
+ this.Reset();
+ global::System.Data.DataSet ds = new global::System.Data.DataSet();
+ ds.ReadXml(reader);
+ if ((ds.Tables["Departments"] != null)) {
+ base.Tables.Add(new DepartmentsDataTable(ds.Tables["Departments"]));
+ }
+ if ((ds.Tables["Employees"] != null)) {
+ base.Tables.Add(new EmployeesDataTable(ds.Tables["Employees"]));
+ }
+ this.DataSetName = ds.DataSetName;
+ this.Prefix = ds.Prefix;
+ this.Namespace = ds.Namespace;
+ this.Locale = ds.Locale;
+ this.CaseSensitive = ds.CaseSensitive;
+ this.EnforceConstraints = ds.EnforceConstraints;
+ this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
+ this.InitVars();
+ }
+ else {
+ this.ReadXml(reader);
+ this.InitVars();
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
+ global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
+ this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
+ stream.Position = 0;
+ return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal void InitVars() {
+ this.InitVars(true);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal void InitVars(bool initTable) {
+ this.tableDepartments = ((DepartmentsDataTable)(base.Tables["Departments"]));
+ if ((initTable == true)) {
+ if ((this.tableDepartments != null)) {
+ this.tableDepartments.InitVars();
+ }
+ }
+ this.tableEmployees = ((EmployeesDataTable)(base.Tables["Employees"]));
+ if ((initTable == true)) {
+ if ((this.tableEmployees != null)) {
+ this.tableEmployees.InitVars();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitClass() {
+ this.DataSetName = "payrolldbDataSet1";
+ this.Prefix = "";
+ this.Namespace = "http://tempuri.org/payrolldbDataSet1.xsd";
+ this.EnforceConstraints = true;
+ this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
+ this.tableDepartments = new DepartmentsDataTable();
+ base.Tables.Add(this.tableDepartments);
+ this.tableEmployees = new EmployeesDataTable();
+ base.Tables.Add(this.tableEmployees);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private bool ShouldSerializeDepartments() {
+ return false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private bool ShouldSerializeEmployees() {
+ return false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
+ if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
+ this.InitVars();
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
+ payrolldbDataSet1 ds = new payrolldbDataSet1();
+ global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
+ global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
+ global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
+ any.Namespace = ds.Namespace;
+ sequence.Items.Add(any);
+ type.Particle = sequence;
+ global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
+ if (xs.Contains(dsSchema.TargetNamespace)) {
+ global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
+ global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
+ try {
+ global::System.Xml.Schema.XmlSchema schema = null;
+ dsSchema.Write(s1);
+ for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
+ schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
+ s2.SetLength(0);
+ schema.Write(s2);
+ if ((s1.Length == s2.Length)) {
+ s1.Position = 0;
+ s2.Position = 0;
+ for (; ((s1.Position != s1.Length)
+ && (s1.ReadByte() == s2.ReadByte())); ) {
+ ;
+ }
+ if ((s1.Position == s1.Length)) {
+ return type;
+ }
+ }
+ }
+ }
+ finally {
+ if ((s1 != null)) {
+ s1.Close();
+ }
+ if ((s2 != null)) {
+ s2.Close();
+ }
+ }
+ }
+ xs.Add(dsSchema);
+ return type;
+ }
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public delegate void DepartmentsRowChangeEventHandler(object sender, DepartmentsRowChangeEvent e);
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public delegate void EmployeesRowChangeEventHandler(object sender, EmployeesRowChangeEvent e);
+
+ ///
+ ///Represents the strongly named DataTable class.
+ ///
+ [global::System.Serializable()]
+ [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+ public partial class DepartmentsDataTable : global::System.Data.TypedTableBase {
+
+ private global::System.Data.DataColumn columnId;
+
+ private global::System.Data.DataColumn columnName;
+
+ private global::System.Data.DataColumn columnBasic;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsDataTable() {
+ this.TableName = "Departments";
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal DepartmentsDataTable(global::System.Data.DataTable table) {
+ this.TableName = table.TableName;
+ if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+ this.CaseSensitive = table.CaseSensitive;
+ }
+ if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+ this.Locale = table.Locale;
+ }
+ if ((table.Namespace != table.DataSet.Namespace)) {
+ this.Namespace = table.Namespace;
+ }
+ this.Prefix = table.Prefix;
+ this.MinimumCapacity = table.MinimumCapacity;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected DepartmentsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
+ base(info, context) {
+ this.InitVars();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn IdColumn {
+ get {
+ return this.columnId;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn NameColumn {
+ get {
+ return this.columnName;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn BasicColumn {
+ get {
+ return this.columnBasic;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ public int Count {
+ get {
+ return this.Rows.Count;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsRow this[int index] {
+ get {
+ return ((DepartmentsRow)(this.Rows[index]));
+ }
+ }
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DepartmentsRowChangeEventHandler DepartmentsRowChanging;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DepartmentsRowChangeEventHandler DepartmentsRowChanged;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DepartmentsRowChangeEventHandler DepartmentsRowDeleting;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DepartmentsRowChangeEventHandler DepartmentsRowDeleted;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void AddDepartmentsRow(DepartmentsRow row) {
+ this.Rows.Add(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsRow AddDepartmentsRow(string Name, int Basic) {
+ DepartmentsRow rowDepartmentsRow = ((DepartmentsRow)(this.NewRow()));
+ object[] columnValuesArray = new object[] {
+ null,
+ Name,
+ Basic};
+ rowDepartmentsRow.ItemArray = columnValuesArray;
+ this.Rows.Add(rowDepartmentsRow);
+ return rowDepartmentsRow;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsRow FindById(int Id) {
+ return ((DepartmentsRow)(this.Rows.Find(new object[] {
+ Id})));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public override global::System.Data.DataTable Clone() {
+ DepartmentsDataTable cln = ((DepartmentsDataTable)(base.Clone()));
+ cln.InitVars();
+ return cln;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Data.DataTable CreateInstance() {
+ return new DepartmentsDataTable();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal void InitVars() {
+ this.columnId = base.Columns["Id"];
+ this.columnName = base.Columns["Name"];
+ this.columnBasic = base.Columns["Basic"];
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitClass() {
+ this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnId);
+ this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnName);
+ this.columnBasic = new global::System.Data.DataColumn("Basic", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnBasic);
+ this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
+ this.columnId}, true));
+ this.columnId.AutoIncrement = true;
+ this.columnId.AutoIncrementSeed = -1;
+ this.columnId.AutoIncrementStep = -1;
+ this.columnId.AllowDBNull = false;
+ this.columnId.ReadOnly = true;
+ this.columnId.Unique = true;
+ this.columnName.AllowDBNull = false;
+ this.columnName.MaxLength = 50;
+ this.columnBasic.AllowDBNull = false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsRow NewDepartmentsRow() {
+ return ((DepartmentsRow)(this.NewRow()));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+ return new DepartmentsRow(builder);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Type GetRowType() {
+ return typeof(DepartmentsRow);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanged(e);
+ if ((this.DepartmentsRowChanged != null)) {
+ this.DepartmentsRowChanged(this, new DepartmentsRowChangeEvent(((DepartmentsRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanging(e);
+ if ((this.DepartmentsRowChanging != null)) {
+ this.DepartmentsRowChanging(this, new DepartmentsRowChangeEvent(((DepartmentsRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleted(e);
+ if ((this.DepartmentsRowDeleted != null)) {
+ this.DepartmentsRowDeleted(this, new DepartmentsRowChangeEvent(((DepartmentsRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleting(e);
+ if ((this.DepartmentsRowDeleting != null)) {
+ this.DepartmentsRowDeleting(this, new DepartmentsRowChangeEvent(((DepartmentsRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void RemoveDepartmentsRow(DepartmentsRow row) {
+ this.Rows.Remove(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
+ global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
+ global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
+ payrolldbDataSet1 ds = new payrolldbDataSet1();
+ global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema";
+ any1.MinOccurs = new decimal(0);
+ any1.MaxOccurs = decimal.MaxValue;
+ any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+ sequence.Items.Add(any1);
+ global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
+ any2.MinOccurs = new decimal(1);
+ any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+ sequence.Items.Add(any2);
+ global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
+ attribute1.Name = "namespace";
+ attribute1.FixedValue = ds.Namespace;
+ type.Attributes.Add(attribute1);
+ global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
+ attribute2.Name = "tableTypeName";
+ attribute2.FixedValue = "DepartmentsDataTable";
+ type.Attributes.Add(attribute2);
+ type.Particle = sequence;
+ global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
+ if (xs.Contains(dsSchema.TargetNamespace)) {
+ global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
+ global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
+ try {
+ global::System.Xml.Schema.XmlSchema schema = null;
+ dsSchema.Write(s1);
+ for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
+ schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
+ s2.SetLength(0);
+ schema.Write(s2);
+ if ((s1.Length == s2.Length)) {
+ s1.Position = 0;
+ s2.Position = 0;
+ for (; ((s1.Position != s1.Length)
+ && (s1.ReadByte() == s2.ReadByte())); ) {
+ ;
+ }
+ if ((s1.Position == s1.Length)) {
+ return type;
+ }
+ }
+ }
+ }
+ finally {
+ if ((s1 != null)) {
+ s1.Close();
+ }
+ if ((s2 != null)) {
+ s2.Close();
+ }
+ }
+ }
+ xs.Add(dsSchema);
+ return type;
+ }
+ }
+
+ ///
+ ///Represents the strongly named DataTable class.
+ ///
+ [global::System.Serializable()]
+ [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+ public partial class EmployeesDataTable : global::System.Data.TypedTableBase {
+
+ private global::System.Data.DataColumn columnId;
+
+ private global::System.Data.DataColumn columnName;
+
+ private global::System.Data.DataColumn columnDepartment_ID;
+
+ private global::System.Data.DataColumn columnAllowance;
+
+ private global::System.Data.DataColumn columnJoined_Date;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesDataTable() {
+ this.TableName = "Employees";
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal EmployeesDataTable(global::System.Data.DataTable table) {
+ this.TableName = table.TableName;
+ if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+ this.CaseSensitive = table.CaseSensitive;
+ }
+ if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+ this.Locale = table.Locale;
+ }
+ if ((table.Namespace != table.DataSet.Namespace)) {
+ this.Namespace = table.Namespace;
+ }
+ this.Prefix = table.Prefix;
+ this.MinimumCapacity = table.MinimumCapacity;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected EmployeesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
+ base(info, context) {
+ this.InitVars();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn IdColumn {
+ get {
+ return this.columnId;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn NameColumn {
+ get {
+ return this.columnName;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn Department_IDColumn {
+ get {
+ return this.columnDepartment_ID;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn AllowanceColumn {
+ get {
+ return this.columnAllowance;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn Joined_DateColumn {
+ get {
+ return this.columnJoined_Date;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ public int Count {
+ get {
+ return this.Rows.Count;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesRow this[int index] {
+ get {
+ return ((EmployeesRow)(this.Rows[index]));
+ }
+ }
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event EmployeesRowChangeEventHandler EmployeesRowChanging;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event EmployeesRowChangeEventHandler EmployeesRowChanged;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event EmployeesRowChangeEventHandler EmployeesRowDeleting;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event EmployeesRowChangeEventHandler EmployeesRowDeleted;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void AddEmployeesRow(EmployeesRow row) {
+ this.Rows.Add(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesRow AddEmployeesRow(string Name, int Department_ID, int Allowance, System.DateTime Joined_Date) {
+ EmployeesRow rowEmployeesRow = ((EmployeesRow)(this.NewRow()));
+ object[] columnValuesArray = new object[] {
+ null,
+ Name,
+ Department_ID,
+ Allowance,
+ Joined_Date};
+ rowEmployeesRow.ItemArray = columnValuesArray;
+ this.Rows.Add(rowEmployeesRow);
+ return rowEmployeesRow;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesRow FindById(int Id) {
+ return ((EmployeesRow)(this.Rows.Find(new object[] {
+ Id})));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public override global::System.Data.DataTable Clone() {
+ EmployeesDataTable cln = ((EmployeesDataTable)(base.Clone()));
+ cln.InitVars();
+ return cln;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Data.DataTable CreateInstance() {
+ return new EmployeesDataTable();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal void InitVars() {
+ this.columnId = base.Columns["Id"];
+ this.columnName = base.Columns["Name"];
+ this.columnDepartment_ID = base.Columns["Department_ID"];
+ this.columnAllowance = base.Columns["Allowance"];
+ this.columnJoined_Date = base.Columns["Joined_Date"];
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitClass() {
+ this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnId);
+ this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnName);
+ this.columnDepartment_ID = new global::System.Data.DataColumn("Department_ID", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnDepartment_ID);
+ this.columnAllowance = new global::System.Data.DataColumn("Allowance", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnAllowance);
+ this.columnJoined_Date = new global::System.Data.DataColumn("Joined_Date", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnJoined_Date);
+ this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
+ this.columnId}, true));
+ this.columnId.AutoIncrement = true;
+ this.columnId.AutoIncrementSeed = -1;
+ this.columnId.AutoIncrementStep = -1;
+ this.columnId.AllowDBNull = false;
+ this.columnId.ReadOnly = true;
+ this.columnId.Unique = true;
+ this.columnName.AllowDBNull = false;
+ this.columnName.MaxLength = 50;
+ this.columnDepartment_ID.AllowDBNull = false;
+ this.columnAllowance.AllowDBNull = false;
+ this.columnJoined_Date.AllowDBNull = false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesRow NewEmployeesRow() {
+ return ((EmployeesRow)(this.NewRow()));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+ return new EmployeesRow(builder);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Type GetRowType() {
+ return typeof(EmployeesRow);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanged(e);
+ if ((this.EmployeesRowChanged != null)) {
+ this.EmployeesRowChanged(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanging(e);
+ if ((this.EmployeesRowChanging != null)) {
+ this.EmployeesRowChanging(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleted(e);
+ if ((this.EmployeesRowDeleted != null)) {
+ this.EmployeesRowDeleted(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleting(e);
+ if ((this.EmployeesRowDeleting != null)) {
+ this.EmployeesRowDeleting(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void RemoveEmployeesRow(EmployeesRow row) {
+ this.Rows.Remove(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
+ global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
+ global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
+ payrolldbDataSet1 ds = new payrolldbDataSet1();
+ global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema";
+ any1.MinOccurs = new decimal(0);
+ any1.MaxOccurs = decimal.MaxValue;
+ any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+ sequence.Items.Add(any1);
+ global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
+ any2.MinOccurs = new decimal(1);
+ any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+ sequence.Items.Add(any2);
+ global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
+ attribute1.Name = "namespace";
+ attribute1.FixedValue = ds.Namespace;
+ type.Attributes.Add(attribute1);
+ global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
+ attribute2.Name = "tableTypeName";
+ attribute2.FixedValue = "EmployeesDataTable";
+ type.Attributes.Add(attribute2);
+ type.Particle = sequence;
+ global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
+ if (xs.Contains(dsSchema.TargetNamespace)) {
+ global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
+ global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
+ try {
+ global::System.Xml.Schema.XmlSchema schema = null;
+ dsSchema.Write(s1);
+ for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
+ schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
+ s2.SetLength(0);
+ schema.Write(s2);
+ if ((s1.Length == s2.Length)) {
+ s1.Position = 0;
+ s2.Position = 0;
+ for (; ((s1.Position != s1.Length)
+ && (s1.ReadByte() == s2.ReadByte())); ) {
+ ;
+ }
+ if ((s1.Position == s1.Length)) {
+ return type;
+ }
+ }
+ }
+ }
+ finally {
+ if ((s1 != null)) {
+ s1.Close();
+ }
+ if ((s2 != null)) {
+ s2.Close();
+ }
+ }
+ }
+ xs.Add(dsSchema);
+ return type;
+ }
+ }
+
+ ///
+ ///Represents strongly named DataRow class.
+ ///
+ public partial class DepartmentsRow : global::System.Data.DataRow {
+
+ private DepartmentsDataTable tableDepartments;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal DepartmentsRow(global::System.Data.DataRowBuilder rb) :
+ base(rb) {
+ this.tableDepartments = ((DepartmentsDataTable)(this.Table));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int Id {
+ get {
+ return ((int)(this[this.tableDepartments.IdColumn]));
+ }
+ set {
+ this[this.tableDepartments.IdColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public string Name {
+ get {
+ return ((string)(this[this.tableDepartments.NameColumn]));
+ }
+ set {
+ this[this.tableDepartments.NameColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int Basic {
+ get {
+ return ((int)(this[this.tableDepartments.BasicColumn]));
+ }
+ set {
+ this[this.tableDepartments.BasicColumn] = value;
+ }
+ }
+ }
+
+ ///
+ ///Represents strongly named DataRow class.
+ ///
+ public partial class EmployeesRow : global::System.Data.DataRow {
+
+ private EmployeesDataTable tableEmployees;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal EmployeesRow(global::System.Data.DataRowBuilder rb) :
+ base(rb) {
+ this.tableEmployees = ((EmployeesDataTable)(this.Table));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int Id {
+ get {
+ return ((int)(this[this.tableEmployees.IdColumn]));
+ }
+ set {
+ this[this.tableEmployees.IdColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public string Name {
+ get {
+ return ((string)(this[this.tableEmployees.NameColumn]));
+ }
+ set {
+ this[this.tableEmployees.NameColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int Department_ID {
+ get {
+ return ((int)(this[this.tableEmployees.Department_IDColumn]));
+ }
+ set {
+ this[this.tableEmployees.Department_IDColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int Allowance {
+ get {
+ return ((int)(this[this.tableEmployees.AllowanceColumn]));
+ }
+ set {
+ this[this.tableEmployees.AllowanceColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public System.DateTime Joined_Date {
+ get {
+ return ((global::System.DateTime)(this[this.tableEmployees.Joined_DateColumn]));
+ }
+ set {
+ this[this.tableEmployees.Joined_DateColumn] = value;
+ }
+ }
+ }
+
+ ///
+ ///Row event argument class
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public class DepartmentsRowChangeEvent : global::System.EventArgs {
+
+ private DepartmentsRow eventRow;
+
+ private global::System.Data.DataRowAction eventAction;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsRowChangeEvent(DepartmentsRow row, global::System.Data.DataRowAction action) {
+ this.eventRow = row;
+ this.eventAction = action;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsRow Row {
+ get {
+ return this.eventRow;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataRowAction Action {
+ get {
+ return this.eventAction;
+ }
+ }
+ }
+
+ ///
+ ///Row event argument class
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public class EmployeesRowChangeEvent : global::System.EventArgs {
+
+ private EmployeesRow eventRow;
+
+ private global::System.Data.DataRowAction eventAction;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesRowChangeEvent(EmployeesRow row, global::System.Data.DataRowAction action) {
+ this.eventRow = row;
+ this.eventAction = action;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesRow Row {
+ get {
+ return this.eventRow;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataRowAction Action {
+ get {
+ return this.eventAction;
+ }
+ }
+ }
+ }
+}
+namespace PayrollSystem.payrolldbDataSet1TableAdapters {
+
+
+ ///
+ ///Represents the connection and commands used to retrieve and save data.
+ ///
+ [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+ [global::System.ComponentModel.ToolboxItem(true)]
+ [global::System.ComponentModel.DataObjectAttribute(true)]
+ [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
+ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public partial class DepartmentsTableAdapter : global::System.ComponentModel.Component {
+
+ private global::System.Data.SqlClient.SqlDataAdapter _adapter;
+
+ private global::System.Data.SqlClient.SqlConnection _connection;
+
+ private global::System.Data.SqlClient.SqlTransaction _transaction;
+
+ private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
+
+ private bool _clearBeforeFill;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DepartmentsTableAdapter() {
+ this.ClearBeforeFill = true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
+ get {
+ if ((this._adapter == null)) {
+ this.InitAdapter();
+ }
+ return this._adapter;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal global::System.Data.SqlClient.SqlConnection Connection {
+ get {
+ if ((this._connection == null)) {
+ this.InitConnection();
+ }
+ return this._connection;
+ }
+ set {
+ this._connection = value;
+ if ((this.Adapter.InsertCommand != null)) {
+ this.Adapter.InsertCommand.Connection = value;
+ }
+ if ((this.Adapter.DeleteCommand != null)) {
+ this.Adapter.DeleteCommand.Connection = value;
+ }
+ if ((this.Adapter.UpdateCommand != null)) {
+ this.Adapter.UpdateCommand.Connection = value;
+ }
+ for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+ if ((this.CommandCollection[i] != null)) {
+ ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
+ }
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal global::System.Data.SqlClient.SqlTransaction Transaction {
+ get {
+ return this._transaction;
+ }
+ set {
+ this._transaction = value;
+ for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+ this.CommandCollection[i].Transaction = this._transaction;
+ }
+ if (((this.Adapter != null)
+ && (this.Adapter.DeleteCommand != null))) {
+ this.Adapter.DeleteCommand.Transaction = this._transaction;
+ }
+ if (((this.Adapter != null)
+ && (this.Adapter.InsertCommand != null))) {
+ this.Adapter.InsertCommand.Transaction = this._transaction;
+ }
+ if (((this.Adapter != null)
+ && (this.Adapter.UpdateCommand != null))) {
+ this.Adapter.UpdateCommand.Transaction = this._transaction;
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
+ get {
+ if ((this._commandCollection == null)) {
+ this.InitCommandCollection();
+ }
+ return this._commandCollection;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public bool ClearBeforeFill {
+ get {
+ return this._clearBeforeFill;
+ }
+ set {
+ this._clearBeforeFill = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitAdapter() {
+ this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
+ global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
+ tableMapping.SourceTable = "Table";
+ tableMapping.DataSetTable = "Departments";
+ tableMapping.ColumnMappings.Add("Id", "Id");
+ tableMapping.ColumnMappings.Add("Name", "Name");
+ tableMapping.ColumnMappings.Add("Basic", "Basic");
+ this._adapter.TableMappings.Add(tableMapping);
+ this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
+ this._adapter.DeleteCommand.Connection = this.Connection;
+ this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Departments] WHERE (([Id] = @Original_Id) AND ([Name] = @Origi" +
+ "nal_Name) AND ([Basic] = @Original_Basic))";
+ this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Basic", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Basic", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
+ this._adapter.InsertCommand.Connection = this.Connection;
+ this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Departments] ([Name], [Basic]) VALUES (@Name, @Basic);\r\nSELECT" +
+ " Id, Name, Basic FROM Departments WHERE (Id = SCOPE_IDENTITY())";
+ this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Basic", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Basic", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
+ this._adapter.UpdateCommand.Connection = this.Connection;
+ this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Departments] SET [Name] = @Name, [Basic] = @Basic WHERE (([Id] = @O" +
+ "riginal_Id) AND ([Name] = @Original_Name) AND ([Basic] = @Original_Basic));\r\nSEL" +
+ "ECT Id, Name, Basic FROM Departments WHERE (Id = @Id)";
+ this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Basic", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Basic", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Basic", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Basic", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitConnection() {
+ this._connection = new global::System.Data.SqlClient.SqlConnection();
+ this._connection.ConnectionString = global::PayrollSystem.Properties.Settings.Default.payrolldbConnectionString;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitCommandCollection() {
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
+ this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[0].Connection = this.Connection;
+ this._commandCollection[0].CommandText = "SELECT Id, Name, Basic FROM dbo.Departments";
+ this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
+ public virtual int Fill(payrolldbDataSet1.DepartmentsDataTable dataTable) {
+ this.Adapter.SelectCommand = this.CommandCollection[0];
+ if ((this.ClearBeforeFill == true)) {
+ dataTable.Clear();
+ }
+ int returnValue = this.Adapter.Fill(dataTable);
+ return returnValue;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
+ public virtual payrolldbDataSet1.DepartmentsDataTable GetData() {
+ this.Adapter.SelectCommand = this.CommandCollection[0];
+ payrolldbDataSet1.DepartmentsDataTable dataTable = new payrolldbDataSet1.DepartmentsDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(payrolldbDataSet1.DepartmentsDataTable dataTable) {
+ return this.Adapter.Update(dataTable);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(payrolldbDataSet1 dataSet) {
+ return this.Adapter.Update(dataSet, "Departments");
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(global::System.Data.DataRow dataRow) {
+ return this.Adapter.Update(new global::System.Data.DataRow[] {
+ dataRow});
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(global::System.Data.DataRow[] dataRows) {
+ return this.Adapter.Update(dataRows);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
+ public virtual int Delete(int Original_Id, string Original_Name, int Original_Basic) {
+ this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id));
+ if ((Original_Name == null)) {
+ throw new global::System.ArgumentNullException("Original_Name");
+ }
+ else {
+ this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
+ }
+ this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Basic));
+ global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
+ if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ this.Adapter.DeleteCommand.Connection.Open();
+ }
+ try {
+ int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
+ return returnValue;
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ this.Adapter.DeleteCommand.Connection.Close();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
+ public virtual int Insert(string Name, int Basic) {
+ if ((Name == null)) {
+ throw new global::System.ArgumentNullException("Name");
+ }
+ else {
+ this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
+ }
+ this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Basic));
+ global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
+ if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ this.Adapter.InsertCommand.Connection.Open();
+ }
+ try {
+ int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
+ return returnValue;
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ this.Adapter.InsertCommand.Connection.Close();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+ public virtual int Update(string Name, int Basic, int Original_Id, string Original_Name, int Original_Basic, int Id) {
+ if ((Name == null)) {
+ throw new global::System.ArgumentNullException("Name");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
+ }
+ this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Basic));
+ this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_Id));
+ if ((Original_Name == null)) {
+ throw new global::System.ArgumentNullException("Original_Name");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Name));
+ }
+ this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_Basic));
+ this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Id));
+ global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
+ if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ this.Adapter.UpdateCommand.Connection.Open();
+ }
+ try {
+ int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
+ return returnValue;
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ this.Adapter.UpdateCommand.Connection.Close();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+ public virtual int Update(string Name, int Basic, int Original_Id, string Original_Name, int Original_Basic) {
+ return this.Update(Name, Basic, Original_Id, Original_Name, Original_Basic, Original_Id);
+ }
+ }
+
+ ///
+ ///Represents the connection and commands used to retrieve and save data.
+ ///
+ [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+ [global::System.ComponentModel.ToolboxItem(true)]
+ [global::System.ComponentModel.DataObjectAttribute(true)]
+ [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
+ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public partial class EmployeesTableAdapter : global::System.ComponentModel.Component {
+
+ private global::System.Data.SqlClient.SqlDataAdapter _adapter;
+
+ private global::System.Data.SqlClient.SqlConnection _connection;
+
+ private global::System.Data.SqlClient.SqlTransaction _transaction;
+
+ private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
+
+ private bool _clearBeforeFill;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public EmployeesTableAdapter() {
+ this.ClearBeforeFill = true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
+ get {
+ if ((this._adapter == null)) {
+ this.InitAdapter();
+ }
+ return this._adapter;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal global::System.Data.SqlClient.SqlConnection Connection {
+ get {
+ if ((this._connection == null)) {
+ this.InitConnection();
+ }
+ return this._connection;
+ }
+ set {
+ this._connection = value;
+ if ((this.Adapter.InsertCommand != null)) {
+ this.Adapter.InsertCommand.Connection = value;
+ }
+ if ((this.Adapter.DeleteCommand != null)) {
+ this.Adapter.DeleteCommand.Connection = value;
+ }
+ if ((this.Adapter.UpdateCommand != null)) {
+ this.Adapter.UpdateCommand.Connection = value;
+ }
+ for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+ if ((this.CommandCollection[i] != null)) {
+ ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
+ }
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal global::System.Data.SqlClient.SqlTransaction Transaction {
+ get {
+ return this._transaction;
+ }
+ set {
+ this._transaction = value;
+ for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+ this.CommandCollection[i].Transaction = this._transaction;
+ }
+ if (((this.Adapter != null)
+ && (this.Adapter.DeleteCommand != null))) {
+ this.Adapter.DeleteCommand.Transaction = this._transaction;
+ }
+ if (((this.Adapter != null)
+ && (this.Adapter.InsertCommand != null))) {
+ this.Adapter.InsertCommand.Transaction = this._transaction;
+ }
+ if (((this.Adapter != null)
+ && (this.Adapter.UpdateCommand != null))) {
+ this.Adapter.UpdateCommand.Transaction = this._transaction;
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
+ get {
+ if ((this._commandCollection == null)) {
+ this.InitCommandCollection();
+ }
+ return this._commandCollection;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public bool ClearBeforeFill {
+ get {
+ return this._clearBeforeFill;
+ }
+ set {
+ this._clearBeforeFill = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitAdapter() {
+ this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
+ global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
+ tableMapping.SourceTable = "Table";
+ tableMapping.DataSetTable = "Employees";
+ tableMapping.ColumnMappings.Add("Id", "Id");
+ tableMapping.ColumnMappings.Add("Name", "Name");
+ tableMapping.ColumnMappings.Add("Department_ID", "Department_ID");
+ tableMapping.ColumnMappings.Add("Allowance", "Allowance");
+ tableMapping.ColumnMappings.Add("Joined_Date", "Joined_Date");
+ this._adapter.TableMappings.Add(tableMapping);
+ this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
+ this._adapter.DeleteCommand.Connection = this.Connection;
+ this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Employees] WHERE (([Id] = @Original_Id) AND ([Name] = @Origina" +
+ "l_Name) AND ([Department_ID] = @Original_Department_ID) AND ([Allowance] = @Orig" +
+ "inal_Allowance) AND ([Joined_Date] = @Original_Joined_Date))";
+ this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Department_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Department_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Allowance", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Allowance", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Joined_Date", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Joined_Date", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
+ this._adapter.InsertCommand.Connection = this.Connection;
+ this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Employees] ([Name], [Department_ID], [Allowance], [Joined_Date" +
+ "]) VALUES (@Name, @Department_ID, @Allowance, @Joined_Date);\r\nSELECT Id, Name, D" +
+ "epartment_ID, Allowance, Joined_Date FROM Employees WHERE (Id = SCOPE_IDENTITY()" +
+ ")";
+ this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Department_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Department_ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Allowance", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Allowance", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Joined_Date", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Joined_Date", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
+ this._adapter.UpdateCommand.Connection = this.Connection;
+ this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Employees] SET [Name] = @Name, [Department_ID] = @Department_ID, [Allowance] = @Allowance, [Joined_Date] = @Joined_Date WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([Department_ID] = @Original_Department_ID) AND ([Allowance] = @Original_Allowance) AND ([Joined_Date] = @Original_Joined_Date));
+SELECT Id, Name, Department_ID, Allowance, Joined_Date FROM Employees WHERE (Id = @Id)";
+ this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Department_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Department_ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Allowance", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Allowance", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Joined_Date", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Joined_Date", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Department_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Department_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Allowance", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Allowance", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Joined_Date", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Joined_Date", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitConnection() {
+ this._connection = new global::System.Data.SqlClient.SqlConnection();
+ this._connection.ConnectionString = global::PayrollSystem.Properties.Settings.Default.payrolldbConnectionString;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitCommandCollection() {
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
+ this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[0].Connection = this.Connection;
+ this._commandCollection[0].CommandText = "SELECT Id, Name, Department_ID, Allowance, Joined_Date FROM dbo.Employees";
+ this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
+ public virtual int Fill(payrolldbDataSet1.EmployeesDataTable dataTable) {
+ this.Adapter.SelectCommand = this.CommandCollection[0];
+ if ((this.ClearBeforeFill == true)) {
+ dataTable.Clear();
+ }
+ int returnValue = this.Adapter.Fill(dataTable);
+ return returnValue;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
+ public virtual payrolldbDataSet1.EmployeesDataTable GetData() {
+ this.Adapter.SelectCommand = this.CommandCollection[0];
+ payrolldbDataSet1.EmployeesDataTable dataTable = new payrolldbDataSet1.EmployeesDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(payrolldbDataSet1.EmployeesDataTable dataTable) {
+ return this.Adapter.Update(dataTable);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(payrolldbDataSet1 dataSet) {
+ return this.Adapter.Update(dataSet, "Employees");
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(global::System.Data.DataRow dataRow) {
+ return this.Adapter.Update(new global::System.Data.DataRow[] {
+ dataRow});
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(global::System.Data.DataRow[] dataRows) {
+ return this.Adapter.Update(dataRows);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
+ public virtual int Delete(int Original_Id, string Original_Name, int Original_Department_ID, int Original_Allowance, System.DateTime Original_Joined_Date) {
+ this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id));
+ if ((Original_Name == null)) {
+ throw new global::System.ArgumentNullException("Original_Name");
+ }
+ else {
+ this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
+ }
+ this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Department_ID));
+ this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_Allowance));
+ this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_Joined_Date));
+ global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
+ if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ this.Adapter.DeleteCommand.Connection.Open();
+ }
+ try {
+ int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
+ return returnValue;
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ this.Adapter.DeleteCommand.Connection.Close();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
+ public virtual int Insert(string Name, int Department_ID, int Allowance, System.DateTime Joined_Date) {
+ if ((Name == null)) {
+ throw new global::System.ArgumentNullException("Name");
+ }
+ else {
+ this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
+ }
+ this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Department_ID));
+ this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Allowance));
+ this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(Joined_Date));
+ global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
+ if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ this.Adapter.InsertCommand.Connection.Open();
+ }
+ try {
+ int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
+ return returnValue;
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ this.Adapter.InsertCommand.Connection.Close();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+ public virtual int Update(string Name, int Department_ID, int Allowance, System.DateTime Joined_Date, int Original_Id, string Original_Name, int Original_Department_ID, int Original_Allowance, System.DateTime Original_Joined_Date, int Id) {
+ if ((Name == null)) {
+ throw new global::System.ArgumentNullException("Name");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
+ }
+ this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Department_ID));
+ this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Allowance));
+ this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Joined_Date));
+ this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_Id));
+ if ((Original_Name == null)) {
+ throw new global::System.ArgumentNullException("Original_Name");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Name));
+ }
+ this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Department_ID));
+ this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Allowance));
+ this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_Joined_Date));
+ this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Id));
+ global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
+ if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ this.Adapter.UpdateCommand.Connection.Open();
+ }
+ try {
+ int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
+ return returnValue;
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ this.Adapter.UpdateCommand.Connection.Close();
+ }
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+ public virtual int Update(string Name, int Department_ID, int Allowance, System.DateTime Joined_Date, int Original_Id, string Original_Name, int Original_Department_ID, int Original_Allowance, System.DateTime Original_Joined_Date) {
+ return this.Update(Name, Department_ID, Allowance, Joined_Date, Original_Id, Original_Name, Original_Department_ID, Original_Allowance, Original_Joined_Date, Original_Id);
+ }
+ }
+
+ ///
+ ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
+ ///
+ [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+ [global::System.ComponentModel.ToolboxItem(true)]
+ [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
+ "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
+ public partial class TableAdapterManager : global::System.ComponentModel.Component {
+
+ private UpdateOrderOption _updateOrder;
+
+ private DepartmentsTableAdapter _departmentsTableAdapter;
+
+ private EmployeesTableAdapter _employeesTableAdapter;
+
+ private bool _backupDataSetBeforeUpdate;
+
+ private global::System.Data.IDbConnection _connection;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public UpdateOrderOption UpdateOrder {
+ get {
+ return this._updateOrder;
+ }
+ set {
+ this._updateOrder = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
+ "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
+ "a", "System.Drawing.Design.UITypeEditor")]
+ public DepartmentsTableAdapter DepartmentsTableAdapter {
+ get {
+ return this._departmentsTableAdapter;
+ }
+ set {
+ this._departmentsTableAdapter = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
+ "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
+ "a", "System.Drawing.Design.UITypeEditor")]
+ public EmployeesTableAdapter EmployeesTableAdapter {
+ get {
+ return this._employeesTableAdapter;
+ }
+ set {
+ this._employeesTableAdapter = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public bool BackupDataSetBeforeUpdate {
+ get {
+ return this._backupDataSetBeforeUpdate;
+ }
+ set {
+ this._backupDataSetBeforeUpdate = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ public global::System.Data.IDbConnection Connection {
+ get {
+ if ((this._connection != null)) {
+ return this._connection;
+ }
+ if (((this._departmentsTableAdapter != null)
+ && (this._departmentsTableAdapter.Connection != null))) {
+ return this._departmentsTableAdapter.Connection;
+ }
+ if (((this._employeesTableAdapter != null)
+ && (this._employeesTableAdapter.Connection != null))) {
+ return this._employeesTableAdapter.Connection;
+ }
+ return null;
+ }
+ set {
+ this._connection = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ public int TableAdapterInstanceCount {
+ get {
+ int count = 0;
+ if ((this._departmentsTableAdapter != null)) {
+ count = (count + 1);
+ }
+ if ((this._employeesTableAdapter != null)) {
+ count = (count + 1);
+ }
+ return count;
+ }
+ }
+
+ ///
+ ///Update rows in top-down order.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private int UpdateUpdatedRows(payrolldbDataSet1 dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) {
+ int result = 0;
+ if ((this._departmentsTableAdapter != null)) {
+ global::System.Data.DataRow[] updatedRows = dataSet.Departments.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
+ updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
+ if (((updatedRows != null)
+ && (0 < updatedRows.Length))) {
+ result = (result + this._departmentsTableAdapter.Update(updatedRows));
+ allChangedRows.AddRange(updatedRows);
+ }
+ }
+ if ((this._employeesTableAdapter != null)) {
+ global::System.Data.DataRow[] updatedRows = dataSet.Employees.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
+ updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
+ if (((updatedRows != null)
+ && (0 < updatedRows.Length))) {
+ result = (result + this._employeesTableAdapter.Update(updatedRows));
+ allChangedRows.AddRange(updatedRows);
+ }
+ }
+ return result;
+ }
+
+ ///
+ ///Insert rows in top-down order.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private int UpdateInsertedRows(payrolldbDataSet1 dataSet, global::System.Collections.Generic.List allAddedRows) {
+ int result = 0;
+ if ((this._departmentsTableAdapter != null)) {
+ global::System.Data.DataRow[] addedRows = dataSet.Departments.Select(null, null, global::System.Data.DataViewRowState.Added);
+ if (((addedRows != null)
+ && (0 < addedRows.Length))) {
+ result = (result + this._departmentsTableAdapter.Update(addedRows));
+ allAddedRows.AddRange(addedRows);
+ }
+ }
+ if ((this._employeesTableAdapter != null)) {
+ global::System.Data.DataRow[] addedRows = dataSet.Employees.Select(null, null, global::System.Data.DataViewRowState.Added);
+ if (((addedRows != null)
+ && (0 < addedRows.Length))) {
+ result = (result + this._employeesTableAdapter.Update(addedRows));
+ allAddedRows.AddRange(addedRows);
+ }
+ }
+ return result;
+ }
+
+ ///
+ ///Delete rows in bottom-up order.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private int UpdateDeletedRows(payrolldbDataSet1 dataSet, global::System.Collections.Generic.List allChangedRows) {
+ int result = 0;
+ if ((this._employeesTableAdapter != null)) {
+ global::System.Data.DataRow[] deletedRows = dataSet.Employees.Select(null, null, global::System.Data.DataViewRowState.Deleted);
+ if (((deletedRows != null)
+ && (0 < deletedRows.Length))) {
+ result = (result + this._employeesTableAdapter.Update(deletedRows));
+ allChangedRows.AddRange(deletedRows);
+ }
+ }
+ if ((this._departmentsTableAdapter != null)) {
+ global::System.Data.DataRow[] deletedRows = dataSet.Departments.Select(null, null, global::System.Data.DataViewRowState.Deleted);
+ if (((deletedRows != null)
+ && (0 < deletedRows.Length))) {
+ result = (result + this._departmentsTableAdapter.Update(deletedRows));
+ allChangedRows.AddRange(deletedRows);
+ }
+ }
+ return result;
+ }
+
+ ///
+ ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) {
+ if (((updatedRows == null)
+ || (updatedRows.Length < 1))) {
+ return updatedRows;
+ }
+ if (((allAddedRows == null)
+ || (allAddedRows.Count < 1))) {
+ return updatedRows;
+ }
+ global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List();
+ for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
+ global::System.Data.DataRow row = updatedRows[i];
+ if ((allAddedRows.Contains(row) == false)) {
+ realUpdatedRows.Add(row);
+ }
+ }
+ return realUpdatedRows.ToArray();
+ }
+
+ ///
+ ///Update all changes to the dataset.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public virtual int UpdateAll(payrolldbDataSet1 dataSet) {
+ if ((dataSet == null)) {
+ throw new global::System.ArgumentNullException("dataSet");
+ }
+ if ((dataSet.HasChanges() == false)) {
+ return 0;
+ }
+ if (((this._departmentsTableAdapter != null)
+ && (this.MatchTableAdapterConnection(this._departmentsTableAdapter.Connection) == false))) {
+ throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+ "tring.");
+ }
+ if (((this._employeesTableAdapter != null)
+ && (this.MatchTableAdapterConnection(this._employeesTableAdapter.Connection) == false))) {
+ throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+ "tring.");
+ }
+ global::System.Data.IDbConnection workConnection = this.Connection;
+ if ((workConnection == null)) {
+ throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
+ "ger TableAdapter property to a valid TableAdapter instance.");
+ }
+ bool workConnOpened = false;
+ if (((workConnection.State & global::System.Data.ConnectionState.Broken)
+ == global::System.Data.ConnectionState.Broken)) {
+ workConnection.Close();
+ }
+ if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
+ workConnection.Open();
+ workConnOpened = true;
+ }
+ global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
+ if ((workTransaction == null)) {
+ throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
+ "ctions or the current state is not allowing the transaction to begin.");
+ }
+ global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List();
+ global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List();
+ global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List();
+ global::System.Collections.Generic.Dictionary