예제 #1
0
 public void AddPortalInsulationRemoveSession()
 {
     try
     {
         IPortalInsulationRemoveSession portalInsulationRemoveSession = new PortalInsulationRemoveSession()
         {
             RemoveInsulationId = Guid.NewGuid(),
             LeakDetailsId      = Guid.Parse("9697B7C4-CD2E-4243-9642-D3FA01A2B5E1"),
             RemovingType       = "asbestos",
             Temperature        = 2.2M,
             PipeDiameter       = 2.2M,
             LinearFt           = 2,
             Fittings           = "90ts",
             AdditionalComments = "portalrempve comments",
             RequestCreatedDate = DateTime.Now,
             RequestStartDate   = DateTime.Now,
             RequestEndDate     = DateTime.Now,
             RequestComments    = "djfsdjfjhsdj",
         };
         ltr.Create((PortalInsulationRemoveSession)portalInsulationRemoveSession);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 public void UpdatePortalInsulationRemoveSession()
 {
     try
     {
         IPortalInsulationRemoveSession portalInsulationRemoveSession = new PortalInsulationRemoveSession()
         {
             RemoveInsulationId = Guid.Parse("3C443900-8CC7-444D-BCD0-A742E58FC770"),
             LeakDetailsId      = Guid.Parse("C124835B-4B82-4CAB-A173-44601AC73012"),
             RemovingType       = "asbestos",
             Temperature        = 2.2M,
             PipeDiameter       = 2.2M,
             LinearFt           = 2,
             Fittings           = "90ts",
             AdditionalComments = "portalrempve comments",
             RequestCreatedDate = DateTime.Now,
             RequestStartDate   = DateTime.Now,
             RequestEndDate     = DateTime.Now,
             RequestComments    = "djfsdjfjhsdj",
         };
         ltr.Update((PortalInsulationRemoveSession)portalInsulationRemoveSession);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 // PUT: api/PortalInsulationRemoveSession/5
 public HttpResponseMessage Put(PortalInsulationRemoveSession portalInsulationRemoveSession)
 {
     try
     {
         response.StatusCode           = HttpStatusCode.Created;
         response.Content              = new StringContent(portalInsulationRemoveSessionFactory.Update(portalInsulationRemoveSession).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);
 }