Exemple #1
0
 /// <summary>
 /// Crete From domain model to dropdown
 /// </summary>
 public static CompanyDropDown CreateFrom(this DomainModels.Company source)
 {
     return(new CompanyDropDown
     {
         CompanyId = source.CompanyId,
         CompanyCodeName = source.CompanyCode + " - " + source.CompanyName,
         ParentCompanyId = source.CompanyId
     });
 }
Exemple #2
0
 /// <summary>
 /// Crete From Domain model
 /// </summary>
 public static Company CreateFromm(this DomainModels.Company source)
 {
     return(new Company
     {
         CompanyId = source.CompanyId,
         CompanyCode = source.CompanyCode,
         CompanyName = source.CompanyName,
         CompanyLegalName = source.CompanyLegalName,
         ParentCompanyId = source.ParentCompanyId,
         ParentCompanyName = source.ParentCompanyId != null ? source.ParentCompany.CompanyName : "",
         CompanyDescription = source.CompanyDescription,
         CrNumber = source.CrNumber,
         PaidUpCapital = source.PaidUpCapital,
         Uan = source.Uan,
         Ntn = source.Ntn,
         OrgGroupId = source.OrgGroupId,
         OrgGroupName = source.OrgGroupId != null ? source.OrgGroup.OrgGroupName: "",
         BusinessSegmentId = source.BusinessSegmentId,
         BusinessSegmentName = source.BusinessSegment.BusinessSegmentName
     });
 }