| @@ -5,7 +5,7 @@ using System.Threading.Tasks; | |||||
| namespace jdis_import | namespace jdis_import | ||||
| { | { | ||||
| public class Customer | |||||
| public class CustomerImport | |||||
| { | { | ||||
| public string Number { get; set; } | public string Number { get; set; } | ||||
| public string Name { get; set; } | public string Name { get; set; } | ||||
| @@ -5,7 +5,7 @@ using System.Threading.Tasks; | |||||
| namespace jdis_import | namespace jdis_import | ||||
| { | { | ||||
| public class Equipment | |||||
| public class EquipmentImport | |||||
| { | { | ||||
| public int MID { get; set; } | public int MID { get; set; } | ||||
| public string Make { get; set; } | public string Make { get; set; } | ||||
| @@ -5,7 +5,7 @@ using System.Threading.Tasks; | |||||
| namespace jdis_import | namespace jdis_import | ||||
| { | { | ||||
| public class Part | |||||
| public class PartImport | |||||
| { | { | ||||
| public string Qty { get; set; } | public string Qty { get; set; } | ||||
| @@ -8,6 +8,7 @@ using System.IO; | |||||
| using System.Data; | using System.Data; | ||||
| using System.Data.SqlClient; | using System.Data.SqlClient; | ||||
| using System.Reflection; | using System.Reflection; | ||||
| using jdis_import.RESTObjects; | |||||
| /* | /* | ||||
| Secret Value up-8Q~y46~JyQZjJlsAJ-zpXpglpmuPIJ1Gx3a2O | Secret Value up-8Q~y46~JyQZjJlsAJ-zpXpglpmuPIJ1Gx3a2O | ||||
| @@ -21,6 +22,12 @@ namespace jdis_import | |||||
| { | { | ||||
| class Program | class Program | ||||
| { | { | ||||
| private static List<Customer> _customers; | |||||
| private static List<Make> _makes; | |||||
| private static List<Product> _products; | |||||
| private static List<Model> _models; | |||||
| private static List<InspectionType> _inspectionTypes; | |||||
| private static List<Template> _templates; | |||||
| private static string _exeDir; | private static string _exeDir; | ||||
| private static bool _log = true; | private static bool _log = true; | ||||
| private static string _connection = "Data Source=192.168.0.7;Initial Catalog=Connexion_Brandt;User ID=mobilepmuser;Password=data4techs;Encrypt=No;TrustServerCertificate=true;Persist Security Info=True;"; | private static string _connection = "Data Source=192.168.0.7;Initial Catalog=Connexion_Brandt;User ID=mobilepmuser;Password=data4techs;Encrypt=No;TrustServerCertificate=true;Persist Security Info=True;"; | ||||
| @@ -33,6 +40,15 @@ namespace jdis_import | |||||
| public static Dictionary<string, int> InspectionType; | public static Dictionary<string, int> InspectionType; | ||||
| static async System.Threading.Tasks.Task Main(string[] args) | static async System.Threading.Tasks.Task Main(string[] args) | ||||
| { | { | ||||
| RESTService rservice = new RESTService(); | |||||
| _customers = rservice.RestGet<Customer>("customers.svc"); | |||||
| _makes = rservice.RestGet<Make>("makes.svc"); | |||||
| _products = rservice.RestGet<Product>("products.svc"); | |||||
| _models = rservice.RestGet<Model>("models.svc"); | |||||
| _inspectionTypes = rservice.RestGet<InspectionType>("inspectionTypes.svc"); | |||||
| _templates = rservice.RestGet<Template>("templates.svc"); | |||||
| _exeDir = Environment.CurrentDirectory; | _exeDir = Environment.CurrentDirectory; | ||||
| SetupDirectories(); | SetupDirectories(); | ||||
| List<ToDo> list = new List<ToDo>(); | List<ToDo> list = new List<ToDo>(); | ||||
| @@ -460,10 +476,10 @@ namespace jdis_import | |||||
| { | { | ||||
| string file = Path.Combine(_exeDir, todo.FileName);// todo.FileName; | string file = Path.Combine(_exeDir, todo.FileName);// todo.FileName; | ||||
| todo.FileName = file; | todo.FileName = file; | ||||
| Customer c = new Customer(); | |||||
| WorkOrder wo = new WorkOrder(); | |||||
| Equipment eq = new Equipment(); | |||||
| List<Part> parts = new List<Part>(); | |||||
| CustomerImport c = new CustomerImport(); | |||||
| WorkOrderImport wo = new WorkOrderImport(); | |||||
| EquipmentImport eq = new EquipmentImport(); | |||||
| List<PartImport> parts = new List<PartImport>(); | |||||
| Console.WriteLine("Line 306: " + file); | Console.WriteLine("Line 306: " + file); | ||||
| Console.WriteLine("Line 307: " + file); | Console.WriteLine("Line 307: " + file); | ||||
| @@ -613,7 +629,7 @@ namespace jdis_import | |||||
| { | { | ||||
| if (qty < 100 && !currentline.Contains("HR")) | if (qty < 100 && !currentline.Contains("HR")) | ||||
| { | { | ||||
| Part pt = new Part(); | |||||
| PartImport pt = new PartImport(); | |||||
| string sline = currentline.Substring(19).Trim(); | string sline = currentline.Substring(19).Trim(); | ||||
| //pt.Description = currentline.Substring(34, 14); | //pt.Description = currentline.Substring(34, 14); | ||||
| pt.Number = sline.Substring(0, sline.IndexOf(" ")); | pt.Number = sline.Substring(0, sline.IndexOf(" ")); | ||||
| @@ -635,7 +651,7 @@ namespace jdis_import | |||||
| List<CSVObject> exceptions = new List<CSVObject>(); | List<CSVObject> exceptions = new List<CSVObject>(); | ||||
| if (parts.Count == 0) | if (parts.Count == 0) | ||||
| { | { | ||||
| Part p = new Part(); | |||||
| PartImport p = new PartImport(); | |||||
| p.Description = string.Empty; | p.Description = string.Empty; | ||||
| p.Qty = string.Empty; | p.Qty = string.Empty; | ||||
| p.Number = string.Empty; | p.Number = string.Empty; | ||||
| @@ -647,7 +663,7 @@ namespace jdis_import | |||||
| _sqlMessages.Add(e.Message); | _sqlMessages.Add(e.Message); | ||||
| } | } | ||||
| foreach (Part prt in parts) | |||||
| foreach (PartImport prt in parts) | |||||
| { | { | ||||
| CSVObject obj = new CSVObject(); | CSVObject obj = new CSVObject(); | ||||
| obj.Address = string.Format(frmtString, c.Addr1.Trim()); | obj.Address = string.Format(frmtString, c.Addr1.Trim()); | ||||
| @@ -0,0 +1,44 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| [JsonObject(MemberSerialization.OptIn)] | |||||
| public class Customer | |||||
| { | |||||
| [JsonProperty(PropertyName = "Address")] | |||||
| public string Address { get; set; } | |||||
| [JsonProperty(PropertyName = "Address2")] | |||||
| public string Address2 { get; set; } | |||||
| [JsonProperty(PropertyName = "City")] | |||||
| public string City { get; set; } | |||||
| [JsonProperty(PropertyName = "State")] | |||||
| public string State { get; set; } | |||||
| [JsonProperty(PropertyName = "Name")] | |||||
| public string Name { get; set; } | |||||
| [JsonProperty(PropertyName = "Number")] | |||||
| public string Number { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "Phone1")] | |||||
| public string Phone1 { get; set; } | |||||
| [JsonProperty(PropertyName = "Phone2")] | |||||
| public string Phone2 { get; set; } | |||||
| [JsonProperty(PropertyName = "Fax")] | |||||
| public string Fax { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int UpdateUserID { get; set; } | |||||
| } | |||||
| } | |||||
| @@ -1,12 +0,0 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class CustomerSpec | |||||
| { | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,33 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class InspectionLevel | |||||
| { | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "Description")] | |||||
| public string Description { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "InspectionType")] | |||||
| public InspectionType InspectionType { get; set; } | |||||
| [JsonProperty(PropertyName = "InspectionTypeID")] | |||||
| public int InspectionTypeID { get { return this.InspectionType != null ? this.InspectionType.ID : 0; } } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "Name")] | |||||
| public string Name { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int? UpdateUserID { get; set; } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,51 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class InspectionType | |||||
| { | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "Description")] | |||||
| public string Description { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "InspectionLevels")] | |||||
| public List<InspectionLevel> InspectionLevels { get; set; } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "Name")] | |||||
| public string Name { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int? UpdateUserID { get; set; } | |||||
| /* | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "InspectionLevels":[{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "InspectionTypeID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }], | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| */ | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,38 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| [JsonObject(MemberSerialization.OptIn)] | |||||
| public class Make | |||||
| { | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "Description")] | |||||
| public string Description { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "Name")] | |||||
| public string Name { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int? UpdateUserID { get; set; } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,36 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class Model | |||||
| { | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "Description")] | |||||
| public string Description { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "Make")] | |||||
| public Make Make { get; set; } | |||||
| [JsonProperty(PropertyName = "MakeID")] | |||||
| public int MakeID { get { return this.Make != null ? this.Make.ID : 0; } set { value = this.Make != null ? this.Make.ID : 0; } } | |||||
| [JsonProperty(PropertyName = "Name")] | |||||
| public string Name { get; set; } | |||||
| [JsonProperty(PropertyName = "Product")] | |||||
| public Product Product { get; set; } | |||||
| [JsonProperty(PropertyName = "ProductID")] | |||||
| public int ProductID { get { return this.Product != null ? this.Product.ID : 0; } set { value = this.Product != null ? this.Product.ID : 0; } } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int? UpdateUserID { get; set; } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,29 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class Product | |||||
| { | |||||
| [JsonProperty(PropertyName = "Code")] | |||||
| public string Code { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "Description")] | |||||
| public string Description { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int? UpdateUserID { get; set; } | |||||
| } | |||||
| } | |||||
| @@ -1,5 +1,6 @@ | |||||
| using System.Globalization; | |||||
| using Newtonsoft.Json; | using Newtonsoft.Json; | ||||
| using Newtonsoft.Json.Converters; | |||||
| namespace jdis_import.RESTObjects | namespace jdis_import.RESTObjects | ||||
| { | { | ||||
| @@ -36,4 +37,27 @@ namespace jdis_import.RESTObjects | |||||
| #endregion | #endregion | ||||
| } | } | ||||
| public static class Deserialize | |||||
| { | |||||
| public static T FromJson<T>(string json) | |||||
| { | |||||
| return JsonConvert.DeserializeObject<T>(json, Converter.Settings); | |||||
| } | |||||
| } | |||||
| public static class Serialize | |||||
| { | |||||
| public static string ToJson<T>(this T self) | |||||
| { | |||||
| return JsonConvert.SerializeObject(self, Converter.Settings); | |||||
| } | |||||
| } | |||||
| internal static class Converter | |||||
| { | |||||
| public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings | |||||
| { | |||||
| MetadataPropertyHandling = MetadataPropertyHandling.Ignore, | |||||
| DateParseHandling = DateParseHandling.None, | |||||
| DateFormatHandling = DateFormatHandling.MicrosoftDateFormat, | |||||
| }; | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1,70 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using System.Net.Http; | |||||
| using System.Net.Http.Headers; | |||||
| using RestSharp; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class RESTService | |||||
| { | |||||
| private string _baseUrl = "http://servicesbrandt.rpmindustries.com:8081"; | |||||
| private HttpClient _httpClient; | |||||
| public RESTService() | |||||
| { | |||||
| } | |||||
| public RESTService(string endPoint, Dictionary<string, string> parameters) | |||||
| { | |||||
| _baseUrl = _baseUrl + "/" + endPoint; | |||||
| foreach (KeyValuePair<string, string> kvp in parameters) | |||||
| { | |||||
| _baseUrl = _baseUrl + "/" + kvp.Key; | |||||
| if (!string.IsNullOrEmpty(kvp.Value)) | |||||
| _baseUrl = _baseUrl + "/" + kvp.Value; | |||||
| } | |||||
| _httpClient = new HttpClient(new HttpClientHandler | |||||
| { | |||||
| UseCookies = true, | |||||
| CookieContainer = new System.Net.CookieContainer() | |||||
| }) | |||||
| { | |||||
| BaseAddress = new Uri(_baseUrl), | |||||
| DefaultRequestHeaders = { Accept = { MediaTypeWithQualityHeaderValue.Parse("application/json") } } | |||||
| }; | |||||
| } | |||||
| public string RestGet(string endpoint, Dictionary<string, string> parameters = null) | |||||
| { | |||||
| string url = _baseUrl + "/" + endpoint + '/'; | |||||
| RestClient client = new RestClient(url); | |||||
| RestRequest request = new RestRequest(endpoint, Method.Get); | |||||
| request.AddHeader("Accept", "application/json"); | |||||
| request.Method = Method.Get; | |||||
| RestResponse response = client.Execute(request); | |||||
| return response.Content; | |||||
| } | |||||
| public List<T> RestGet<T>(string endpoint) | |||||
| { | |||||
| RESTResponse<List<T>> rest = new RESTResponse<List<T>>(); | |||||
| string url = _baseUrl + "/" + endpoint + "/"; | |||||
| RestClient client = new RestClient(url); | |||||
| RestRequest request = new RestRequest(); | |||||
| request.Method = Method.Get; | |||||
| request.AddHeader("Accept", "application/json"); | |||||
| request.Method = Method.Get; | |||||
| RestResponse response = client.Execute(request); | |||||
| rest = Deserialize.FromJson<RESTResponse<List<T>>>(response.Content); | |||||
| List<T> list = new List<T>(); | |||||
| list.AddRange(rest.data); | |||||
| return list; | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,264 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| using Newtonsoft.Json; | |||||
| namespace jdis_import.RESTObjects | |||||
| { | |||||
| public class Template | |||||
| { | |||||
| [JsonProperty(PropertyName = "CreateDate")] | |||||
| public DateTime CreateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "CreateUserID")] | |||||
| public int CreateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "Description")] | |||||
| public string Description { get; set; } | |||||
| [JsonProperty(PropertyName = "ID")] | |||||
| public int ID { get; set; } | |||||
| [JsonProperty(PropertyName = "Name")] | |||||
| public string Name { get; set; } | |||||
| [JsonProperty(PropertyName = "IsActive")] | |||||
| public bool IsActive { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateDate")] | |||||
| public DateTime? UpdateDate { get; set; } | |||||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||||
| public int? UpdateUserID { get; set; } | |||||
| [JsonProperty(PropertyName = "InspectionLevel")] | |||||
| public InspectionLevel InspectionLevel { get; set; } | |||||
| [JsonProperty(PropertyName = "InspectionLevelID")] | |||||
| public int InspectionLevelID | |||||
| { | |||||
| get | |||||
| { | |||||
| return this.InspectionLevel != null ? this.InspectionLevel.ID : 0; | |||||
| } | |||||
| set | |||||
| { | |||||
| value = this.InspectionLevel != null ? this.InspectionLevel.ID : 0; | |||||
| } | |||||
| } | |||||
| [JsonProperty(PropertyName = "InspectionType")] | |||||
| public InspectionType InspectionType { get; set; } | |||||
| [JsonProperty(PropertyName = "InspectionTypeID")] | |||||
| public int InspectionTypeID | |||||
| { | |||||
| get | |||||
| { | |||||
| return this.InspectionType != null ? this.InspectionType.ID : 0; | |||||
| } | |||||
| set | |||||
| { | |||||
| value = this.InspectionType != null ? this.InspectionType.ID : 0; | |||||
| } | |||||
| } | |||||
| [JsonProperty(PropertyName = "Model")] | |||||
| public Model Model { get; set; } | |||||
| [JsonProperty(PropertyName = "ModelID")] | |||||
| public int? ModelID { get { return this.Model != null ? Model.ID : null; } set { value = this.Model != null ? Model.ID : null; } } | |||||
| [JsonProperty(PropertyName = "Product")] | |||||
| public Product Product { get; set; } | |||||
| [JsonProperty(PropertyName = "ProductID")] | |||||
| public int? ProductID { get { return this.Product != null ? Product.ID : null; } set { value = this.Product != null ? Product.ID : null; } } | |||||
| /* | |||||
| "TemplateCategories":[{ | |||||
| "Category":{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "CategoryID":2147483647, | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "ID":2147483647, | |||||
| "SortOrder":2147483647, | |||||
| "TemplateID":2147483647, | |||||
| "TemplateItemSpecs":[{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "ID":2147483647, | |||||
| "Item":{ | |||||
| "Category":{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "CategoryID":2147483647, | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "InputType":{ | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "InputTypeID":2147483647, | |||||
| "IsActive":true, | |||||
| "ItemResponseTypes":[{ | |||||
| "ID":2147483647, | |||||
| "ItemID":2147483647, | |||||
| "ResponseType":{ | |||||
| "Color":"String content", | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "RepairType":{ | |||||
| "Color":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "ResponseTypeID":2147483647, | |||||
| "SortOrder":2147483647 | |||||
| }], | |||||
| "Name":"String content", | |||||
| "SMSCCode":{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "SMSCCodeID":2147483647, | |||||
| "Specs":[{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "ItemID":2147483647, | |||||
| "Name":"String content", | |||||
| "NumberOfTests":2147483647, | |||||
| "SpecItems":[{ | |||||
| "ComparisonType":{ | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "ComparisonTypeID":2147483647, | |||||
| "ID":2147483647, | |||||
| "Name":"String content", | |||||
| "Qualifier":"String content", | |||||
| "SortOrder":2147483647, | |||||
| "SpecID":2147483647, | |||||
| "SpecItemValues":[{ | |||||
| "ID":2147483647, | |||||
| "SortOrder":2147483647, | |||||
| "SpecItemID":2147483647, | |||||
| "Value":"String content", | |||||
| "ValueType":{ | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "ValueTypeID":2147483647 | |||||
| }], | |||||
| "Unit":{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "DataType":{ | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "DataTypeID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "UnitID":2147483647 | |||||
| }], | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }], | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "ItemID":2147483647, | |||||
| "SortOrder":2147483647, | |||||
| "Spec":{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "ItemID":2147483647, | |||||
| "Name":"String content", | |||||
| "NumberOfTests":2147483647, | |||||
| "SpecItems":[{ | |||||
| "ComparisonType":{ | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "ComparisonTypeID":2147483647, | |||||
| "ID":2147483647, | |||||
| "Name":"String content", | |||||
| "Qualifier":"String content", | |||||
| "SortOrder":2147483647, | |||||
| "SpecID":2147483647, | |||||
| "SpecItemValues":[{ | |||||
| "ID":2147483647, | |||||
| "SortOrder":2147483647, | |||||
| "SpecItemID":2147483647, | |||||
| "Value":"String content", | |||||
| "ValueType":{ | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "ValueTypeID":2147483647 | |||||
| }], | |||||
| "Unit":{ | |||||
| "CreateDate":"\/Date(928164000000-0400)\/", | |||||
| "CreateUserID":2147483647, | |||||
| "DataType":{ | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "Name":"String content" | |||||
| }, | |||||
| "DataTypeID":2147483647, | |||||
| "Description":"String content", | |||||
| "ID":2147483647, | |||||
| "IsActive":true, | |||||
| "Name":"String content", | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "UnitID":2147483647 | |||||
| }], | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }, | |||||
| "SpecID":2147483647, | |||||
| "TemplateCategoryID":2147483647, | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }], | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| }], | |||||
| "UpdateDate":"\/Date(928164000000-0400)\/", | |||||
| "UpdateUserID":2147483647 | |||||
| */ | |||||
| } | |||||
| } | |||||
| @@ -5,7 +5,7 @@ using System.Threading.Tasks; | |||||
| namespace jdis_import | namespace jdis_import | ||||
| { | { | ||||
| public class WorkOrder | |||||
| public class WorkOrderImport | |||||
| { | { | ||||
| public DateTime CreateDate { get; set; } | public DateTime CreateDate { get; set; } | ||||
| public DateTime OpnDt { get; set; } | public DateTime OpnDt { get; set; } | ||||
| @@ -0,0 +1,4 @@ | |||||
| <?xml version="1.0" encoding="utf-8" ?> | |||||
| <Root> | |||||
| <Mike>mcarman@rpmindustries.com</Mike> | |||||
| </Root> | |||||
| @@ -0,0 +1,19 @@ | |||||
| <?xml version="1.0" encoding="utf-8" ?> | |||||
| <Root> | |||||
| <ZZ50>1</ZZ50> | |||||
| <ZZ250>1</ZZ250> | |||||
| <ZZ500>2</ZZ500> | |||||
| <ZZ1000>3</ZZ1000> | |||||
| <ZZ2000>4</ZZ2000> | |||||
| <ZZ3000>5</ZZ3000> | |||||
| <ZZ4000>6</ZZ4000> | |||||
| <ZZ5000>7</ZZ5000> | |||||
| <ZZ6000>6</ZZ6000> | |||||
| <ZZ300>1</ZZ300> | |||||
| <ZZ600>2</ZZ600> | |||||
| <ZZ1200>3</ZZ1200> | |||||
| <ZZ2400>4</ZZ2400> | |||||
| <ZZ3600>6</ZZ3600> | |||||
| <ZZ4800>2</ZZ4800> | |||||
| <INSPECTION>11</INSPECTION> | |||||
| </Root> | |||||