Ejemplo n.º 1
0
 public void TestGetJobInfoForCallEntry()
 {
     //Arrange
     JobModel model = new JobModel(new FakeUnitOfWork());
     //Act
     CS_Job result = model.GetJobInfoForCallEntry(1);
     //Assert
     Assert.IsNotNull(result);
 }
 /// <summary>
 /// Get Job Info into Job Property
 /// </summary>
 public void GetJobInfo()
 {
     try
     {
         using (_jobModel = new JobModel())
         {
             CS_Job job = _jobModel.GetJobInfoForCallEntry(_view.JobId.Value);
             _view.Job = job;
             _view.CustomerId = job.CS_CustomerInfo.CustomerId;
         }
     }
     catch (Exception ex)
     {
         Logger.Write(string.Format("An Error has ocurred while trying to get the Job Info.\n{0}\n{1}", ex.Message, ex.StackTrace));
         _view.DisplayMessage("An Internal Error has ocurred while trying to load the Information. Please try again.", false);
     }
 }