예제 #1
0
 public CompanyModel(CompanyAllInfo company)
 {
     Id = company.Id;
     CompanyName = company.CompanyName;
     Activity = company.Activity;
     City = company.City;
     Street = company.Street;
 }
예제 #2
0
 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;
 }
예제 #3
0
 public virtual void ChangeData( CompanyAllInfo newcompany)
 {
     CompanyName = newcompany.CompanyName;
     Activity = newcompany.Activity;
     //Address.City = newcompany.City;
 }
예제 #4
0
 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();
         }
     }
 }