ChrisCompleteCodeTrunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
using System;
using System.Web.Http;
using LaserficheDataProvider.Web.Models;
using System.Configuration;
namespace LaserficheDataProvider.Web.Controllers
{
public class EntryController : ApiController
{
public IHttpActionResult GetEntryId(string referenceNumber)
{
Lib.LaserficheDataProvider laserficheDataProvider;
int entryId;
ResponseModel respose = new ResponseModel();
try
{
laserficheDataProvider = new Lib.LaserficheDataProvider(referenceNumber);
entryId = laserficheDataProvider.GetEntryId();
laserficheDataProvider.CloseConnection();
}
catch (Exception ex)
{
respose.HasErrors = true;
respose.Errors.Add(ex.Message);
respose.EntryId = null;
return Ok(respose);
}
respose.HasErrors = false;
respose.EntryId = entryId;
bool isDebug = (ConfigurationManager.AppSettings["DEBUG"].ToString() == "1") ? true : false;
if (isDebug)
{
System.IO.File.WriteAllText("c:\\temp\amsweblinkprovider_" + Guid.NewGuid().ToString() + ".txt", respose.EntryId.ToString());
}
return Ok(respose);
}
}
}
|
Revision |
Author |
Commited |
Message |
1
|
BBDSCHRIS
|
Wed 22 Aug, 2018 20:08:03 +0000 |
|