Employee search and add
This commit is contained in:
parent
0d47974416
commit
547bf20555
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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",
|
||||
|
|
|
|||
1
PayrollSystem/.vs/PayrollSystem.csproj.dtbcache.json
Normal file
1
PayrollSystem/.vs/PayrollSystem.csproj.dtbcache.json
Normal file
|
|
@ -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":[]}
|
||||
14
PayrollSystem/Helpers.cs
Normal file
14
PayrollSystem/Helpers.cs
Normal file
|
|
@ -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";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -85,11 +85,23 @@
|
|||
<Compile Include="form_main.Designer.cs">
|
||||
<DependentUpon>form_main.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="form_modify_employee.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="form_modify_employee.Designer.cs">
|
||||
<DependentUpon>form_modify_employee.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers.cs" />
|
||||
<Compile Include="payrolldbDataSet.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>payrolldbDataSet.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="payrolldbDataSet1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>payrolldbDataSet1.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
|
|
@ -104,6 +116,9 @@
|
|||
<EmbeddedResource Include="form_main.resx">
|
||||
<DependentUpon>form_main.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="form_modify_employee.resx">
|
||||
<DependentUpon>form_modify_employee.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
|
@ -124,6 +139,17 @@
|
|||
<None Include="payrolldbDataSet.xss">
|
||||
<DependentUpon>payrolldbDataSet.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="payrolldbDataSet1.xsc">
|
||||
<DependentUpon>payrolldbDataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="payrolldbDataSet1.xsd">
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>payrolldbDataSet1.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="payrolldbDataSet1.xss">
|
||||
<DependentUpon>payrolldbDataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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))
|
||||
|
|
|
|||
74
PayrollSystem/form_employees.Designer.cs
generated
74
PayrollSystem/form_employees.Designer.cs
generated
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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<string> clauses = new List<string>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
184
PayrollSystem/form_modify_employee.Designer.cs
generated
Normal file
184
PayrollSystem/form_modify_employee.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
namespace PayrollSystem
|
||||
{
|
||||
partial class form_modify_employee
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
85
PayrollSystem/form_modify_employee.cs
Normal file
85
PayrollSystem/form_modify_employee.cs
Normal file
|
|
@ -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<string, string> departmentIdDic = new Dictionary<string, string>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
PayrollSystem/form_modify_employee.resx
Normal file
120
PayrollSystem/form_modify_employee.resx
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
6601523e2eec0b563a110cecb07652cb35aeec823cb494b099d289ce731c0491
|
||||
f0475c0bcd5a36c968bb1dae4fa9ab9f3ebd0b02be5078e6215513bfbd4b243e
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
PayrollSystem/obj/Debug/TempPE/payrolldbDataSet1.Designer.cs.dll
Normal file
BIN
PayrollSystem/obj/Debug/TempPE/payrolldbDataSet1.Designer.cs.dll
Normal file
Binary file not shown.
Binary file not shown.
2284
PayrollSystem/payrolldbDataSet1.Designer.cs
generated
Normal file
2284
PayrollSystem/payrolldbDataSet1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
PayrollSystem/payrolldbDataSet1.xsc
Normal file
1
PayrollSystem/payrolldbDataSet1.xsc
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
175
PayrollSystem/payrolldbDataSet1.xsd
Normal file
175
PayrollSystem/payrolldbDataSet1.xsd
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="payrolldbDataSet1" targetNamespace="http://tempuri.org/payrolldbDataSet1.xsd" xmlns:mstns="http://tempuri.org/payrolldbDataSet1.xsd" xmlns="http://tempuri.org/payrolldbDataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="payrolldbConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="payrolldbConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.PayrollSystem.Properties.Settings.GlobalReference.Default.payrolldbConnectionString" Provider="System.Data.SqlClient" />
|
||||
</Connections>
|
||||
<Tables>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentsTableAdapter" GeneratorDataComponentClassName="DepartmentsTableAdapter" Name="Departments" UserDataComponentName="DepartmentsTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="payrolldbConnectionString (Settings)" DbObjectName="dbo.Departments" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [dbo].[Departments] WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([Basic] = @Original_Basic))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Basic" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Basic" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [dbo].[Departments] ([Name], [Basic]) VALUES (@Name, @Basic);
|
||||
SELECT Id, Name, Basic FROM Departments WHERE (Id = SCOPE_IDENTITY())</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Basic" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Basic" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT Id, Name, Basic FROM dbo.Departments</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>UPDATE [dbo].[Departments] SET [Name] = @Name, [Basic] = @Basic WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([Basic] = @Original_Basic));
|
||||
SELECT Id, Name, Basic FROM Departments WHERE (Id = @Id)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Basic" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Basic" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Basic" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Basic" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Id" ColumnName="Id" DataSourceName="[C:\USERS\WARLOCK\SOURCE\REPOS\PAYROLLSYSTEM\PAYROLLSYSTEM\PAYROLLDB.MDF].dbo.Departments" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="Id" DataSetColumn="Id" />
|
||||
<Mapping SourceColumn="Name" DataSetColumn="Name" />
|
||||
<Mapping SourceColumn="Basic" DataSetColumn="Basic" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="EmployeesTableAdapter" GeneratorDataComponentClassName="EmployeesTableAdapter" Name="Employees" UserDataComponentName="EmployeesTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="payrolldbConnectionString (Settings)" DbObjectName="dbo.Employees" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<DeleteCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>DELETE FROM [dbo].[Employees] WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([Department_ID] = @Original_Department_ID) AND ([Allowance] = @Original_Allowance) AND ([Joined_Date] = @Original_Joined_Date))</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Department_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Department_ID" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Allowance" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Allowance" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_Joined_Date" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="Joined_Date" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</DeleteCommand>
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>INSERT INTO [dbo].[Employees] ([Name], [Department_ID], [Allowance], [Joined_Date]) VALUES (@Name, @Department_ID, @Allowance, @Joined_Date);
|
||||
SELECT Id, Name, Department_ID, Allowance, Joined_Date FROM Employees WHERE (Id = SCOPE_IDENTITY())</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Department_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Department_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Allowance" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Allowance" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Joined_Date" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="Joined_Date" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<CommandText>SELECT Id, Name, Department_ID, Allowance, Joined_Date FROM dbo.Employees</CommandText>
|
||||
<Parameters />
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="Text" ModifiedByUser="false">
|
||||
<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)</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Department_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Department_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Allowance" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Allowance" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Joined_Date" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="Joined_Date" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Department_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Department_ID" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Allowance" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Allowance" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_Joined_Date" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="Joined_Date" SourceColumnNullMapping="false" SourceVersion="Original" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Id" ColumnName="Id" DataSourceName="[C:\USERS\WARLOCK\SOURCE\REPOS\PAYROLLSYSTEM\PAYROLLSYSTEM\PAYROLLDB.MDF].dbo.Employees" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="Id" DataSetColumn="Id" />
|
||||
<Mapping SourceColumn="Name" DataSetColumn="Name" />
|
||||
<Mapping SourceColumn="Department_ID" DataSetColumn="Department_ID" />
|
||||
<Mapping SourceColumn="Allowance" DataSetColumn="Allowance" />
|
||||
<Mapping SourceColumn="Joined_Date" DataSetColumn="Joined_Date" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
</Tables>
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="payrolldbDataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_UserDSName="payrolldbDataSet1" msprop:Generator_DataSetName="payrolldbDataSet1">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Departments" msprop:Generator_RowEvHandlerName="DepartmentsRowChangeEventHandler" msprop:Generator_RowDeletedName="DepartmentsRowDeleted" msprop:Generator_RowDeletingName="DepartmentsRowDeleting" msprop:Generator_RowEvArgName="DepartmentsRowChangeEvent" msprop:Generator_TablePropName="Departments" msprop:Generator_RowChangedName="DepartmentsRowChanged" msprop:Generator_RowChangingName="DepartmentsRowChanging" msprop:Generator_TableClassName="DepartmentsDataTable" msprop:Generator_RowClassName="DepartmentsRow" msprop:Generator_TableVarName="tableDepartments" msprop:Generator_UserTableName="Departments">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_UserColumnName="Id" type="xs:int" />
|
||||
<xs:element name="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_UserColumnName="Name">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Basic" msprop:Generator_ColumnPropNameInRow="Basic" msprop:Generator_ColumnPropNameInTable="BasicColumn" msprop:Generator_ColumnVarNameInTable="columnBasic" msprop:Generator_UserColumnName="Basic" type="xs:int" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Employees" msprop:Generator_RowEvHandlerName="EmployeesRowChangeEventHandler" msprop:Generator_RowDeletedName="EmployeesRowDeleted" msprop:Generator_RowDeletingName="EmployeesRowDeleting" msprop:Generator_RowEvArgName="EmployeesRowChangeEvent" msprop:Generator_TablePropName="Employees" msprop:Generator_RowChangedName="EmployeesRowChanged" msprop:Generator_RowChangingName="EmployeesRowChanging" msprop:Generator_TableClassName="EmployeesDataTable" msprop:Generator_RowClassName="EmployeesRow" msprop:Generator_TableVarName="tableEmployees" msprop:Generator_UserTableName="Employees">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_UserColumnName="Id" type="xs:int" />
|
||||
<xs:element name="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_UserColumnName="Name">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Department_ID" msprop:Generator_ColumnPropNameInRow="Department_ID" msprop:Generator_ColumnPropNameInTable="Department_IDColumn" msprop:Generator_ColumnVarNameInTable="columnDepartment_ID" msprop:Generator_UserColumnName="Department_ID" type="xs:int" />
|
||||
<xs:element name="Allowance" msprop:Generator_ColumnPropNameInRow="Allowance" msprop:Generator_ColumnPropNameInTable="AllowanceColumn" msprop:Generator_ColumnVarNameInTable="columnAllowance" msprop:Generator_UserColumnName="Allowance" type="xs:int" />
|
||||
<xs:element name="Joined_Date" msprop:Generator_ColumnPropNameInRow="Joined_Date" msprop:Generator_ColumnPropNameInTable="Joined_DateColumn" msprop:Generator_ColumnVarNameInTable="columnJoined_Date" msprop:Generator_UserColumnName="Joined_Date" type="xs:dateTime" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:Departments" />
|
||||
<xs:field xpath="mstns:Id" />
|
||||
</xs:unique>
|
||||
<xs:unique name="Employees_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:Employees" />
|
||||
<xs:field xpath="mstns:Id" />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
1
PayrollSystem/payrolldbDataSet1.xss
Normal file
1
PayrollSystem/payrolldbDataSet1.xss
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user