Example #1
0
 /// <summary>
 /// Create From DomainModel to DropDown
 /// </summary>
 public static DepartmentDropDown CreateFrom(this DomainModels.Department source)
 {
     return(new DepartmentDropDown
     {
         DepartmentId = source.DepartmentId,
         DepartmentCodeName = source.DepartmentCode + " - " + source.DepartmentName,
         CompanyId = source.Company != null ? source.Company.CompanyId:0,
     });
 }
Example #2
0
 /// <summary>
 /// Create From Domain model
 /// </summary>
 public static Department CreateFromm(this DomainModels.Department source)
 {
     return(new Department
     {
         DepartmentId = source.DepartmentId,
         DepartmentCode = source.DepartmentCode,
         DepartmentName = source.DepartmentName,
         DepartmentDescription = source.DepartmentDescription,
         DepartmentType = source.DepartmentType,
         CompanyId = source.CompanyId,
         CompanyName = source.Company.CompanyName
     });
 }