本文整理汇总了C#中LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway.IsFairWageProjectWorkFunction方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectGateway.IsFairWageProjectWorkFunction方法的具体用法?C# ProjectGateway.IsFairWageProjectWorkFunction怎么用?C# ProjectGateway.IsFairWageProjectWorkFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway
的用法示例。
在下文中一共展示了ProjectGateway.IsFairWageProjectWorkFunction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadFairWageProject
//.........这里部分代码省略.........
if (!originalRow.IsMealsCountryNull())
{
if (originalRow.MealsAllowance > 0)
{
mealsQuantity++;
}
}
double acumPeriod = GetTotalHoursByEmployeeIdPeriodId(originalRow.EmployeeID, originalRow.Date_, originalRow.ProjectTimeID);
if (acumPeriod > overtimeByCountry)
{
overtime = overtime + originalRow.ProjectTime;
}
else
{
double newAcumPeriod = acumPeriod + originalRow.ProjectTime;
if (newAcumPeriod > overtimeByCountry)
{
overtime = overtime + (newAcumPeriod - overtimeByCountry);
lhQuantity = lhQuantity + (originalRow.ProjectTime - (newAcumPeriod - overtimeByCountry));
}
else
{
lhQuantity = lhQuantity + originalRow.ProjectTime;
}
}
}
if (lhQuantity > 0)
{
ProjectCostingSheetAddTDS.LabourHoursInformationRow newRow = ((ProjectCostingSheetAddTDS.LabourHoursInformationDataTable)Table).NewLabourHoursInformationRow();
if (projectGateway.IsFairWageProjectWorkFunction(projectId, work_, functionListRow.Function_))
{
if (jobClassType_ != "Regular Rate")
{
decimal fairWageRate = projectGateway.GetOperatorGroupRate(projectId, jobClassType_);
GetEmployeeDataFairWage(newStartDate, newEndDate, employeeListRow.EmployeeID, work_, newRow, countryId, fringeRate, fairWageRate);
}
else
{
GetEmployeeData(newStartDate, newEndDate, employeeListRow.EmployeeID, work_, newRow); // Is same to non fair wage project
}
}
else
{
GetEmployeeData(newStartDate, newEndDate, employeeListRow.EmployeeID, work_, newRow); // Is same to non fair wage project
}
newRow.CostingSheetID = 0;
newRow.Work_ = work_;
newRow.EmployeeID = employeeListRow.EmployeeID;
newRow.RefID = refId;
newRow.LHQuantity = lhQuantity;
newRow.MealsQuantity = Convert.ToInt32(mealsQuantity);
if (mealsQuantity > 0) newRow.MealsUnitOfMeasurement = "Day"; else newRow.MealsUnitOfMeasurement = "";
if (motelQuantity > 0) newRow.MotelUnitOfMeasurement = "Day"; else newRow.MotelUnitOfMeasurement = "";
newRow.MealsCostCad = MealsAllowance.GetMealsAllowance(1, true, "Full Day");
newRow.MotelCostCad = 0;
newRow.TotalCostCad = (Convert.ToDecimal(lhQuantity) * decimal.Round(newRow.LHCostCad,2)) + (mealsQuantity * newRow.MealsCostCad) + (motelQuantity * newRow.MotelCostCad);
newRow.MealsCostUsd = MealsAllowance.GetMealsAllowance(2, true, "Full Day");
newRow.MotelCostUsd = 0;
newRow.TotalCostUsd = (Convert.ToDecimal(lhQuantity) * decimal.Round(newRow.LHCostUsd,2)) + (mealsQuantity * newRow.MealsCostUsd) + (motelQuantity * newRow.MotelCostUsd);
newRow.Deleted = false;
示例2: FillData2
/// <summary>
/// FillData2
/// </summary>
private void FillData2()
{
PrintHoursForPayrollPeriodOriginalGateway originalGateway = new PrintHoursForPayrollPeriodOriginalGateway(Data);
foreach (PrintHoursForPayrollPeriodTDS.OriginalRow originalRow in (PrintHoursForPayrollPeriodTDS.OriginalDataTable)originalGateway.Table)
{
PrintHoursForPayrollPeriodTDS.PrintHoursForPayrollPeriodRow newRow = ((PrintHoursForPayrollPeriodTDS.PrintHoursForPayrollPeriodDataTable)Table).NewPrintHoursForPayrollPeriodRow();
newRow.EmployeeID = originalRow.EmployeeID;
newRow.EmployeeName = originalRow.EmployeeName;
newRow.CountryID = originalRow.CountryID;
newRow.CountryName = originalRow.CountryName;
newRow.Date_ = originalRow.Date_;
newRow.ProjectName = originalRow.ProjectName;
if (!originalRow.IsWork_Null()) newRow.Work_ = originalRow.Work_; else newRow.SetWork_Null();
if (!originalRow.IsFunction_Null()) newRow.Function_ = originalRow.Function_; else newRow.SetFunction_Null();
if (!originalRow.IsStartTimeNull()) newRow.StartTime = originalRow.StartTime; else newRow.SetStartTimeNull();
if (!originalRow.IsEndTimeNull()) newRow.EndTime = originalRow.EndTime; else newRow.SetEndTimeNull();
if (!originalRow.IsOffsetNull()) newRow.Offset = originalRow.Offset; else newRow.SetOffsetNull();
newRow.FairWage = false;
originalRow.FairWage = false;
if (!originalRow.IsJobClassTypeNull()) newRow.JobClassType = originalRow.JobClassType; else newRow.JobClassType = " ";
if (originalRow.CountryID == 1)
{
newRow.TimeCA = originalRow.ProjectTime;
newRow.TimeUS = originalRow.ProjectTime;
}
else
{
newRow.TimeCA = originalRow.ProjectTime;
newRow.TimeUS = originalRow.ProjectTime;
}
newRow.TimeFairWage = 0;
newRow.TimeFairWageOt = 0;
newRow.TimeMob = 0;
newRow.TimeMobOt = 0;
newRow.TimeStandard = 0;
newRow.TimeStandardOt = 0;
if (!originalRow.IsStartTimeNull() && !originalRow.IsEndTimeNull())
{
if (originalRow.IsWork_Null()) originalRow.Work_ = "";
if (originalRow.IsFunction_Null()) originalRow.Function_ = "";
ProjectGateway projectGateway = new ProjectGateway(null);
ProjectTimeGateway projectTimeGateway = new ProjectTimeGateway();
projectTimeGateway.LoadByProjectTimeId(originalRow.ProjectTimeID);
if (projectGateway.IsFairWageProjectWorkFunction(projectTimeGateway.GetProjectId(originalRow.ProjectTimeID), originalRow.Work_, originalRow.Function_))
{
newRow.FairWage = true;
originalRow.FairWage = true;
}
int overtime = 40; //Default for USA
// Canada
if (originalRow.CountryID == 1)
{
switch (originalRow.Category)
{
case "Special Forces":
overtime = 50;
break;
case "Field":
overtime = 50;
break;
case "Field 44":
overtime = 44;
break;
case "Office/Admin":
overtime = 44;
break;
case "Mechanic/Manufactoring":
overtime = 44;
break;
}
if ((originalRow.Work_ == "Mobilization") && (originalRow.Function_ == "Prevail/Min Wage"))
{
double acumPeriod = GetTotalHoursByEmployeeIdPeriodId(originalRow.EmployeeID, originalRow.Date_, originalRow.ProjectTimeID);
if (acumPeriod > overtime)
{
newRow.TimeMob = 0;
newRow.TimeMobOt = originalRow.ProjectTime;
}
else
{
double newAcumPeriod = acumPeriod + originalRow.ProjectTime;
if (newAcumPeriod > overtime)
//.........这里部分代码省略.........