Skip to content

Commit 8bbdd0c

Browse files
add
1 parent 395cb25 commit 8bbdd0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1051
-350
lines changed

BBM486Project.sln.DotSettings.user

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue">C:\Program Files\JetBrains\JetBrains Rider 2021.1.5\tools\MSBuild\Current\Bin\MSBuild.exe</s:String>
33
<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/BuildTool/MsbuildVersion/@EntryValue">1048576</s:Int64>
4+
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=WindowsFormsApp_002FForms_002FEmployeesForm/@EntryIndexedValue">True</s:Boolean>
45

56
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=WindowsFormsApp_002FForms_002FFormMainMenu/@EntryIndexedValue">True</s:Boolean>
6-
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=WindowsFormsApp_002FForms_002FUpdateEmployeeForm/@EntryIndexedValue">True</s:Boolean>
7+
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=WindowsFormsApp_002FForms_002FUpdateEmployeeForm/@EntryIndexedValue">False</s:Boolean>
78
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=WindowsFormsApp_002FTextBox_002FCustomTextBox/@EntryIndexedValue">False</s:Boolean>
89
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>

DataAccess/Concrete/EntityFramework/EfInternDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public List<InternDetailDto> GetInternDetails()
1818
{
1919
var result = from i in context.Interns
2020
join s in context.SoftwareDevelopers
21-
on i.MentorId equals s.Id
21+
on i.MentorId.Value equals s.Id
2222
select new InternDetailDto
2323
{
2424
Id = i.Id,

DataAccess/Concrete/EntityFramework/EfJuniorSoftwareDeveloperDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public List<JuniorSoftwareDeveloperDto> GetJuniorSoftwareDeveloperDetails()
1515
{
1616
var result = from j in context.JuniorSoftwareDevelopers
1717
join s in context.SeniorSoftwareDevelopers
18-
on j.SeniorId equals s.Id
18+
on j.SeniorId.Value equals s.Id
1919
select new JuniorSoftwareDeveloperDto
2020
{
2121
Id = j.Id,

DataAccess/Concrete/EntityFramework/EfQAEngineerDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public List<QAEngineerDto> GetQAEngineerDetails()
1818
{
1919
var result = from q in context.QAEngineers
2020
join p in context.ProjectManagers
21-
on q.ManagerId equals p.Id
21+
on q.ManagerId.Value equals p.Id
2222
select new QAEngineerDto()
2323
{
2424
Id = q.Id,

DataAccess/Concrete/EntityFramework/EfSeniorSoftwareDeveloperDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public List<SeniorSoftwareDeveloperDto> GetSeniorSoftwareDeveloperDetails()
1919
{
2020
var result = from s in context.SeniorSoftwareDevelopers
2121
join p in context.ProjectManagers
22-
on s.ManagerId equals p.Id
22+
on s.ManagerId.Value equals p.Id
2323
select new SeniorSoftwareDeveloperDto()
2424
{
2525
Id = s.Id,

DataAccess/Concrete/EntityFramework/EfSoftwareDeveloperDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public List<SoftwareDeveloperDto> GetSoftwareDeveloperDetails()
1717
{
1818
var result = from s in context.SoftwareDevelopers
1919
join se in context.SeniorSoftwareDevelopers
20-
on s.SeniorId equals se.Id
20+
on s.SeniorId.Value equals se.Id
2121
select new SoftwareDeveloperDto()
2222
{
2323
Id = s.Id,

DataAccess/Concrete/EntityFramework/EfSystemAnalystDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public List<SystemAnalystDto> GetSystemAnalystDetails()
1717
{
1818
var result = from s in context.SystemAnalysts
1919
join p in context.ProjectManagers
20-
on s.ManagerId equals p.Id
20+
on s.ManagerId.Value equals p.Id
2121
select new SystemAnalystDto()
2222
{
2323
Id = s.Id,

DataAccess/Concrete/EntityFramework/EfTestEngineerDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public List<TestEngineerDto> GetTestEngineerDetails()
1717
{
1818
var result = from s in context.TestEngineers
1919
join p in context.ProjectManagers
20-
on s.ManagerId equals p.Id
20+
on s.ManagerId.Value equals p.Id
2121
select new TestEngineerDto()
2222
{
2323
Id = s.Id,

DataAccess/Concrete/EntityFramework/EfUIDesignerDal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public List<UIDesignerDto> GetUIDesignerDetails()
1717
{
1818
var result = from s in context.UIDesigners
1919
join p in context.ProjectManagers
20-
on s.ManagerId equals p.Id
20+
on s.ManagerId.Value equals p.Id
2121
select new UIDesignerDto()
2222
{
2323
Id = s.Id,

Entities/Concrete/Intern.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class Intern:IEntity
77
{
88
public int Id { get; set; }
9-
public int MentorId { get; set; }
9+
public int? MentorId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/JuniorSoftwareDeveloper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class JuniorSoftwareDeveloper:IEntity
77
{
88
public int Id { get; set; }
9-
public int SeniorId { get; set; }
9+
public int? SeniorId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/QAEngineer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class QAEngineer:IEntity
77
{
88
public int Id { get; set; }
9-
public int ManagerId { get; set; }
9+
public int? ManagerId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/SeniorSoftwareDeveloper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class SeniorSoftwareDeveloper:IEntity
77
{
88
public int Id { get; set; }
9-
public int ManagerId { get; set; }
9+
public int? ManagerId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/SoftwareDeveloper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class SoftwareDeveloper:IEntity
77
{
88
public int Id { get; set; }
9-
public int SeniorId { get; set; }
9+
public int? SeniorId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/SystemAnalyst.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class SystemAnalyst:IEntity
77
{
88
public int Id { get; set; }
9-
public int ManagerId { get; set; }
9+
public int? ManagerId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/TestEngineer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class TestEngineer:IEntity
77
{
88
public int Id { get; set; }
9-
public int ManagerId { get; set; }
9+
public int? ManagerId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }

Entities/Concrete/UIDesigner.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Entities.Concrete
66
public class UIDesigner:IEntity
77
{
88
public int Id { get; set; }
9-
public int ManagerId { get; set; }
9+
public int? ManagerId { get; set; }
1010
public string FirstName { get; set; }
1111
public string LastName { get; set; }
1212
public string Address { get; set; }
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace Service.Abstract
2+
{
3+
public abstract class AbstractWageCalculator
4+
{
5+
public decimal MinimumWage()
6+
{
7+
return 2729;
8+
}
9+
10+
public decimal IndividualPensionShare(decimal wage,int rate=0)
11+
{
12+
wage -= wage * rate / 100;
13+
return wage;
14+
}
15+
16+
public abstract decimal BonusShare(decimal wage, int rate=0);
17+
public abstract decimal AdditionalShift(int workHour=0);
18+
19+
// Template Method
20+
public decimal Calculate()
21+
{
22+
decimal wage = MinimumWage();
23+
wage = IndividualPensionShare(wage);
24+
wage = BonusShare(wage);
25+
wage += AdditionalShift();
26+
return wage;
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class InternWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage = 0, int rate = 0)
8+
{
9+
return wage;
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
return 0;
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class JuniorSoftwareDeveloperWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class ProjectManagerWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class QAEngineerWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class SeniorSoftwareDeveloperWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class SoftwareDeveloperWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class SystemAnalystWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class TestEngineerWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Service.Abstract;
2+
3+
namespace Service.Concrete
4+
{
5+
public class UIDesignerWageCalculator:AbstractWageCalculator
6+
{
7+
public override decimal BonusShare(decimal wage, int rate = 0)
8+
{
9+
throw new System.NotImplementedException();
10+
}
11+
12+
public override decimal AdditionalShift(int workHour = 0)
13+
{
14+
throw new System.NotImplementedException();
15+
}
16+
}
17+
}

Service/Concrete/InternManager.cs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Service.Concrete
1010
public class InternManager:IInternService
1111
{
1212
IInternDal _internDal;
13+
private InternWageCalculator _internWageCalculator = new InternWageCalculator();
1314

1415
public InternManager(IInternDal internDal)
1516
{

Service/Concrete/JuniorSoftwareDeveloperManager.cs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ public class JuniorSoftwareDeveloperManager:IJuniorSoftwareDeveloperService
1111
{
1212
IJuniorSoftwareDeveloperDal _juniorSoftwareDeveloperDal;
1313

14+
private JuniorSoftwareDeveloperWageCalculator _juniorSoftwareDeveloperWageCalculator =
15+
new JuniorSoftwareDeveloperWageCalculator();
16+
1417
public JuniorSoftwareDeveloperManager(IJuniorSoftwareDeveloperDal juniorSoftwareDeveloperDal)
1518
{
1619
_juniorSoftwareDeveloperDal = juniorSoftwareDeveloperDal;

Service/Concrete/ProjectManagerManager.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ namespace Service.Concrete
1010
public class ProjectManagerManager:IProjectManagerService
1111
{
1212
IProjectManagerDal _projectManagerDal;
13-
13+
private ProjectManagerWageCalculator _projectManagerWageCalculator = new ProjectManagerWageCalculator();
14+
1415
public ProjectManagerManager(IProjectManagerDal projectManagerDal)
1516
{
1617
_projectManagerDal = projectManagerDal;

Service/Concrete/QAEngineerManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Service.Concrete
99
public class QAEngineerManager:IQAEngineerService
1010
{
1111
IQAEngineerDal _qaEngineerDal;
12-
12+
private QAEngineerWageCalculator _qaEngineerWageCalculator = new QAEngineerWageCalculator();
1313
public QAEngineerManager(IQAEngineerDal qaEngineerDal)
1414
{
1515

0 commit comments

Comments
 (0)