public CodeCombinitionViewModel(CodeCombinitionView entity) { this.AllowedPosting = entity.AllowedPosting; this.CodeCombinitionCode = entity.CodeCombinitionCode; this.CompanyId = entity.CompanyId; this.EndDate = entity.EndDate; this.Id = entity.Id; this.SOBId = entity.SOBId; this.StartDate = entity.StartDate; this.CodeCombinitionName = entity.CodeCombinitionName; }
private CodeCombinitionView GetCodeCombViewByCodeCombEntity(CodeCombinition entity) { if (entity == null) { return(null); } CodeCombinitionView obj = new CodeCombinitionView(); obj.AllowedPosting = entity.AllowedPosting; obj.CodeCombinitionCode = Utility.CodeCombination(entity, "."); obj.CompanyId = entity.CompanyId; obj.EndDate = entity.EndDate; obj.Id = entity.Id; obj.SOBId = entity.SOBId; obj.StartDate = entity.StartDate; return(obj); }
public CodeCombinitionView GetSingle(long id, long companyId) { CodeCombinitionView codeCombinationView = GetCodeCombViewByCodeCombEntity(this.GetAll(companyId).FirstOrDefault(x => x.Id == id)); return(codeCombinationView); }