public CompanyModel(CompanyAllInfo company) { Id = company.Id; CompanyName = company.CompanyName; Activity = company.Activity; City = company.City; Street = company.Street; }
public CompanyAllInfo TransformToDto(long id) { var newcompany = new CompanyAllInfo(); newcompany.Id = id; newcompany.CompanyName = CompanyName; newcompany.Activity = Activity; newcompany.City = City; newcompany.Street = Street; return newcompany; }
public virtual void ChangeData( CompanyAllInfo newcompany) { CompanyName = newcompany.CompanyName; Activity = newcompany.Activity; //Address.City = newcompany.City; }
public void UpdateCompany(Company currentcompany, CompanyAllInfo newcompany) { using (var transaction = _session.BeginTransaction()) { try { currentcompany.ChangeData(newcompany); transaction.Commit(); } catch (Exception ex) { Logger.Logger.AddToLog("ComapnyRepository | UpdateCompany | {0}", ex); transaction.Rollback(); } } }