Пример #1
0
 /// <summary>
 ///  Create web model from entity
 /// </summary>
 public static HireGroup CreateFromForTariffRate(this DomainModels.HireGroup source)
 {
     return(new HireGroup
     {
         HireGroupId = source.HireGroupId,
         HireGroupName = source.HireGroupCode + "-" + source.HireGroupName,
     });
 }
Пример #2
0
 public static ParentHireGroup CreateFromParentHireGroup(this DomainModels.HireGroup source)
 {
     return(new ParentHireGroup
     {
         ParentHireGroupId = source.HireGroupId,
         ParentHireGroupName = source.HireGroupCode + '-' + source.HireGroupName,
         CompanyId = source.CompanyId
     });
 }
Пример #3
0
 /// <summary>
 ///  Create web model from entity
 /// </summary>
 public static HireGroupDropDown CreateFromHireGroupDropDown(this DomainModels.HireGroup source)
 {
     return(new HireGroupDropDown
     {
         HireGroupId = source.HireGroupId,
         HireGroupCodeName = source.HireGroupCode + " - " + source.HireGroupName,
         CompanyId = source.CompanyId
     });
 }
Пример #4
0
 /// <summary>
 ///  Create web model from entity
 /// </summary>
 public static HireGroup CreateFrom(this DomainModels.HireGroup source)
 {
     return(new HireGroup
     {
         HireGroupId = source.HireGroupId,
         HireGroupName = source.HireGroupName,
         HireGroupCode = source.HireGroupCode,
         Description = source.HireGroupDescription,
         IsParent = source.IsParent,
         ParentHireGroupName = source.ParentHireGroup != null ? source.ParentHireGroup.HireGroupCode + '-' + source.ParentHireGroup.HireGroupName : string.Empty,
         ParentHireGroupId = source.ParentHireGroup != null ? source.ParentHireGroup.HireGroupId : 0,
         CompanyName = source.Company.CompanyCode + '-' + source.Company.CompanyName,
         CompanyId = source.Company.CompanyId,
     });
 }