Пример #1
0
 public void AddPlanWithProcessSession()
 {
     try
     {
         IPlanWithProcessSession planWithProcessSession = new PlanWithProcessSession()
         {
             PlanWithProcessId       = Guid.NewGuid(),
             LeakDetailsId           = Guid.Parse("C124835B-4B82-4CAB-A173-44601AC73012"),
             ProcessStartDate        = DateTime.Now,
             OperatorName            = "Dustin",
             PlanWithProcessComments = "fdskjhfkjsdfhkjsdhfkjasf",
         };
         ltr.Create((PlanWithProcessSession)planWithProcessSession);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
 public void UpdatePlanWithProcessSession()
 {
     try
     {
         IPlanWithProcessSession planWithProcessSession = new PlanWithProcessSession()
         {
             PlanWithProcessId       = Guid.Parse("12A2C784-6E90-45A6-8F20-27083FBDA06B"),
             LeakDetailsId           = Guid.Parse("C124835B-4B82-4CAB-A173-44601AC73012"),
             ProcessStartDate        = DateTime.Now,
             OperatorName            = "Dustin",
             PlanWithProcessComments = "fdskjhfkjsdfhkjsdhfkjasf",
         };
         ltr.Update((PlanWithProcessSession)planWithProcessSession);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
 // PUT: api/PlanWithProcessSession/5
 public HttpResponseMessage Put(PlanWithProcessSession planWithProcessSession)
 {
     try
     {
         response.StatusCode           = HttpStatusCode.Created;
         response.Content              = new StringContent(planWithProcessSessionFactory.Update(planWithProcessSession).ToString());
         response.Headers.CacheControl = new CacheControlHeaderValue()
         {
             MaxAge = TimeSpan.FromMinutes(20)
         };
     }
     catch (Exception ex)
     {
         response.StatusCode           = HttpStatusCode.BadRequest;
         response.Content              = new StringContent(ex.Message);
         response.Headers.CacheControl = new CacheControlHeaderValue()
         {
             MaxAge = TimeSpan.FromMinutes(20)
         };
     }
     return(response);
 }