| @@ -1,26 +1,26 @@ | |||
| { | |||
| "version": "0.2.0", | |||
| "configurations": [ | |||
| { | |||
| // Use IntelliSense to find out which attributes exist for C# debugging | |||
| // Use hover for the description of the existing attributes | |||
| // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | |||
| "name": ".NET Core Launch (console)", | |||
| "type": "coreclr", | |||
| "request": "launch", | |||
| "preLaunchTask": "build", | |||
| // If you have changed target frameworks, make sure to update the program path. | |||
| "program": "${workspaceFolder}/bin/Debug/net6.0/jdis_import.dll", | |||
| "args": [], | |||
| "cwd": "${workspaceFolder}", | |||
| // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console | |||
| "console": "internalConsole", | |||
| "stopAtEntry": false | |||
| }, | |||
| { | |||
| "name": ".NET Core Attach", | |||
| "type": "coreclr", | |||
| "request": "attach" | |||
| } | |||
| ] | |||
| } | |||
| "version": "0.2.0", | |||
| "configurations": [ | |||
| { | |||
| // Use IntelliSense to find out which attributes exist for C# debugging | |||
| // Use hover for the description of the existing attributes | |||
| // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | |||
| "name": ".NET Core Launch (console)", | |||
| "type": "coreclr", | |||
| "request": "launch", | |||
| "preLaunchTask": "build", | |||
| // If you have changed target frameworks, make sure to update the program path. | |||
| "program": "${workspaceFolder}/bin/Debug/net6.0/jdis_import.dll", | |||
| "args": [], | |||
| "cwd": "${workspaceFolder}", | |||
| // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console | |||
| "console": "integratedTerminal", | |||
| "stopAtEntry": false | |||
| }, | |||
| { | |||
| "name": ".NET Core Attach", | |||
| "type": "coreclr", | |||
| "request": "attach" | |||
| } | |||
| ] | |||
| } | |||
| @@ -0,0 +1,4 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <Root> | |||
| <Mike>mcarman@rpmindustries.com</Mike> | |||
| </Root> | |||
| @@ -0,0 +1,191 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using System.Data.SqlClient; | |||
| using System.Data; | |||
| namespace jdis_import | |||
| { | |||
| public class CSVObject | |||
| { | |||
| public string CustomerNumber { get; set; } | |||
| public string CustomerName { get; set; } | |||
| public string Address { get; set; } | |||
| public string Address2 { get; set; } | |||
| public string City { get; set; } | |||
| public string State { get; set; } | |||
| public string ZipCode { get; set; } | |||
| public string EquipmentNumber { get; set; } | |||
| public string SerialNumber { get; set; } | |||
| public string Model { get; set; } | |||
| public string MeterReading { get; set; } | |||
| public string Year { get; set; } | |||
| public string FamilyCode { get; set; } | |||
| public string FamilyDescription { get; set; } | |||
| public string Make { get; set; } | |||
| public string LastServiceDate { get; set; } | |||
| public string DBSWorkOrderNumber { get; set; } | |||
| public string DateActualStart { get; set; } | |||
| public string CodeAndDescriptionOriginal { get; set; } | |||
| public string CodeAndDescription { get; set; } | |||
| public string Store { get; set; } | |||
| public string StoreDescription { get; set; } | |||
| public string ContractTypeCode { get; set; } | |||
| public string JobSiteContactName { get; set; } | |||
| public string JobSiteContactPhone { get; set; } | |||
| public string PriorityCode { get; set; } | |||
| public string SpecialInstructions { get; set; } | |||
| public string PartNumber { get; set; } | |||
| public string PartNumberDescription { get; set; } | |||
| public string ReferenceDocNumber { get; set; } | |||
| public string Quantity { get; set; } | |||
| public string SegmentNumber { get; set; } | |||
| public string ServiceTech { get; set; } | |||
| public string TechName { get; set; } | |||
| public string InspectionType { get; set; } | |||
| public string ScheduledStartDate { get; set; } | |||
| public string SQLStatement { get; set; } | |||
| public static int MachineExists(string serialnumber, string connStr) | |||
| { | |||
| int? id = 0; | |||
| string sql = string.Format("Select ID from equipment where serialnumber = '{0}'", serialnumber); | |||
| using (SqlConnection conn = new SqlConnection(connStr)) | |||
| { | |||
| conn.Open(); | |||
| SqlCommand cmd = conn.CreateCommand(); | |||
| cmd.CommandText = sql; | |||
| cmd.CommandType = CommandType.Text; | |||
| id = Convert.ToInt32(cmd.ExecuteScalar()); | |||
| if (id > 0) | |||
| { | |||
| cmd.CommandText = string.Format("Select ModelID from Equipment where ID = {0}", id); | |||
| id = Convert.ToInt32(cmd.ExecuteScalar()); | |||
| } | |||
| } | |||
| return Convert.ToInt32(id); | |||
| } | |||
| public void Validate() | |||
| { | |||
| if (this.CustomerNumber.Length > 50) throw new ApplicationException(string.Format("Customer Number too long. Text: {0}", this.CustomerNumber)); | |||
| if (this.CustomerName.Length > 50) throw new ApplicationException("Customer Name too long."); | |||
| if (this.Address.Length > 50) throw new ApplicationException("Address too long."); | |||
| if (this.Address2.Length > 50) throw new ApplicationException("Address2 too long."); | |||
| if (this.City.Length > 50) throw new ApplicationException("City too long."); | |||
| if (this.State.Length > 3) throw new ApplicationException("State too long."); | |||
| if (this.ZipCode.Length > 50) throw new ApplicationException("ZipCode too long."); | |||
| if (this.EquipmentNumber.Length > 50) throw new ApplicationException("Equipment Number too long."); | |||
| if (this.SerialNumber.Length > 50) throw new ApplicationException("Serial Number too long."); | |||
| if (this.Model.Length > 50) throw new ApplicationException("Model too long."); | |||
| if (this.MeterReading.Length > 50) throw new ApplicationException("Meter Reading too long."); | |||
| if (this.Year.Length > 50) throw new ApplicationException("Year too long."); | |||
| if (this.FamilyCode.Length > 50) throw new ApplicationException("Family Code too long."); | |||
| if (this.FamilyDescription.Length > 50) throw new ApplicationException("Family Description too long."); | |||
| if (this.Make.Length > 50) throw new ApplicationException("Make too long."); | |||
| if (this.LastServiceDate.Length > 50) throw new ApplicationException("Last Service Date too long."); | |||
| if (this.DBSWorkOrderNumber.Length > 50) throw new ApplicationException("DBS Work Order Number too long."); | |||
| if (this.DateActualStart.Length > 50) throw new ApplicationException("Date Actual Start too long."); | |||
| if (this.CodeAndDescriptionOriginal.Length > 50) throw new ApplicationException("Code and Description Original too long."); | |||
| if (this.Store.Length > 50) throw new ApplicationException("Store too long."); | |||
| if (this.StoreDescription.Length > 50) throw new ApplicationException("Store Description too long."); | |||
| if (this.ContractTypeCode.Length > 50) throw new ApplicationException("Contact Type Code too long."); | |||
| if (this.JobSiteContactName.Length > 50) throw new ApplicationException("Job Site Contact Name too long."); | |||
| if (this.JobSiteContactPhone.Length > 50) throw new ApplicationException("job Site contact Phone too long."); | |||
| if (this.PriorityCode.Length > 50) throw new ApplicationException("Priority Code too long."); | |||
| if (this.PartNumber.Length > 50) throw new ApplicationException("Part Number too long."); | |||
| if (this.PartNumberDescription.Length > 50) throw new ApplicationException("Part Number Description too long."); | |||
| if (this.ReferenceDocNumber.Length > 50) throw new ApplicationException("Reference Document Number too long."); | |||
| if (this.Quantity.Length > 50) throw new ApplicationException("Quantity too long."); | |||
| if (this.SegmentNumber.Length > 50) throw new ApplicationException("Segment too long."); | |||
| if (this.ServiceTech.Length > 50) throw new ApplicationException("Service Tech too long."); | |||
| if (this.TechName.Length > 50) throw new ApplicationException("Tech Name too long."); | |||
| if (this.InspectionType.Length > 50) throw new ApplicationException("Inspection Type too long."); | |||
| } | |||
| public static string WriteToDB(List<CSVObject> items, SqlConnection conn) | |||
| { | |||
| SqlCommand cmd = conn.CreateCommand(); | |||
| cmd.Connection = conn; | |||
| cmd.CommandType = CommandType.Text; | |||
| string insertcmd = @"Insert Into Results_Brandt(CustomerNumber, CustomerName, [Address], Address2, City, [State], ZipCode, EquipmentNumber, SerialNumber, [Model], MeterReading, [Year], FamilyCode, FamilyDescription, Make, LastServiceDate, DBSWorkOrderNumber, DateActualStart, CodeAndDescriptionOriginal, CodeAndDescription, Store, StoreDescription, ContractTypeCode, JobSiteContactName, JobSiteContactPhone, PriorityCode, SpecialInstructions, PartNumber, PartNumberDescription, ReferenceDocNumber, Quantity, SegmentNumber, ServiceTech, TechName, InspectionType) Values('{0}','{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}')"; | |||
| List<string> msg = new List<string>(); | |||
| string msgs = string.Empty; | |||
| foreach (var item in items) | |||
| { | |||
| cmd.CommandText = string.Format(insertcmd, | |||
| item.CustomerNumber, | |||
| item.CustomerName, | |||
| item.Address, | |||
| item.Address2, | |||
| item.City, | |||
| item.State, | |||
| item.ZipCode, | |||
| item.EquipmentNumber, | |||
| item.SerialNumber, | |||
| item.Model, | |||
| item.MeterReading, | |||
| item.Year, | |||
| item.FamilyCode, | |||
| item.FamilyDescription, | |||
| item.Make, | |||
| item.LastServiceDate, | |||
| item.DBSWorkOrderNumber, | |||
| item.ScheduledStartDate, | |||
| item.CodeAndDescriptionOriginal, | |||
| item.CodeAndDescription, | |||
| item.Store, | |||
| item.StoreDescription, | |||
| item.ContractTypeCode, | |||
| item.JobSiteContactName, | |||
| item.JobSiteContactPhone, | |||
| item.PriorityCode, | |||
| string.IsNullOrEmpty(item.SpecialInstructions) ? string.Empty : item.SpecialInstructions, | |||
| item.PartNumber, | |||
| item.PartNumberDescription, | |||
| item.ReferenceDocNumber, | |||
| item.Quantity, | |||
| item.SegmentNumber, | |||
| item.ServiceTech, | |||
| item.TechName, | |||
| item.InspectionType); | |||
| try | |||
| { | |||
| cmd.ExecuteNonQuery(); | |||
| cmd.Dispose(); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| item.SQLStatement = cmd.CommandText; | |||
| msg.Add(ex.Message); | |||
| } | |||
| } | |||
| if (msg.Count > 0) return string.Join("\r\n", msg); | |||
| else return string.Empty; | |||
| } | |||
| public static void WriteCSV<T>(IEnumerable<T> items, string path) | |||
| { | |||
| if (System.IO.File.Exists(path)) System.IO.File.Delete(path); | |||
| Type itemType = typeof(T); | |||
| var props = itemType.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance); | |||
| using (var writer = new System.IO.StreamWriter(path)) | |||
| { | |||
| string[] clmns = props.Select(p => p.Name).ToArray(); | |||
| string header = string.Join(",", clmns); | |||
| writer.WriteLine(header); | |||
| foreach (var item in items) | |||
| { | |||
| List<string> vals = new List<string>(); | |||
| foreach (string prop in clmns) | |||
| vals.Add(item.GetType().GetProperty(prop).GetValue(item, null).ToString()); | |||
| string valueline = string.Join(",", vals); | |||
| writer.WriteLine(valueline); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace jdis_import | |||
| { | |||
| public class Customer | |||
| { | |||
| public string Number { get; set; } | |||
| public string Name { get; set; } | |||
| public string Addr1 { get; set; } | |||
| public string Addr2 { get; set; } | |||
| public string City { get; set; } | |||
| public string State { get; set; } | |||
| public string Zip { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace jdis_import | |||
| { | |||
| public class Equipment | |||
| { | |||
| public int MID { get; set; } | |||
| public string Make { get; set; } | |||
| public string Model { get; set; } | |||
| public string SerialNumber { get; set; } | |||
| public string EquipmentNumber { get; set; } | |||
| public string MeterReading { get; set; } | |||
| } | |||
| } | |||
| @@ -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> | |||
| @@ -0,0 +1,115 @@ | |||
| Date 18JAN2023 13:37:10 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 42 Work Order 3524310 Seg. 01 Opn Dt 13JAN2023 | |||
| Auth by Phone 902-835-3381 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S MUNICIPAL ENTERPRISES LIM Cust No. 42000005 S MUNICIPAL ENTERPRISES LIM | |||
| O 315 ROCKY LAKE DRIVE Pur-Ord. 10731374 H REQUIRE -PO -JOB OR EQUIP | |||
| L PO BOX 48100 P-% 0.0 L-% 0.0 I invoicereceiving@dexter.c | |||
| D BEDFORD, NS B4A 3Z2 P 48 QUARRYSTONE, NS B4A 3 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 544K 1DW544KZEED664197 L109 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0909 Lbr Tx-0909 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| SERVICE CALL TO ANTRIM | |||
| CORRECTION: | |||
| Travel To Antrim | |||
| ---------------------------------------- | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: HALPM1 T | |||
| PROMISE DATE: 16JAN2023 T | |||
| SPECIAL INSTRUCTIONS: ANTRIM NS T | |||
| CONTACT: MAURICE COMPAGNON 902-717-1354 T | |||
| EMAIL: MCOMPAGNON@DEXTERS.CA T | |||
| .75 01-16 R/T 04540 REPAIR 205.00 153.75 | |||
| 1 01-18 1 SERVICE ACCESSORIES 13.84 13.84 | |||
| 1 01-18 1 LABOUR CREDIT AS PER AGREE 30.00- 30.00- | |||
| 1 01-18 1 CARBON TAX CREDI 3.08- 3.08- | |||
| SEG # 01 TOTAL = .00 P .75 LH 153.75 L 19.24-M 134.51 T | |||
| 500 HOUR SERVICE | |||
| CORRECTION: | |||
| Change Engine Oil & Filter | |||
| Change Fuel Filter & Water Seperator | |||
| Change Primary Air Filter | |||
| Change Cab Fresh & Recirc Filters | |||
| Check All Belts & Hoses | |||
| Grease Machine | |||
| ---------------------------------------- | |||
| 1 1 RE504836 OIL FILT 38.76 38.76 | |||
| 1 1 R502513 SEAL 11.86 11.86 | |||
| 1 1 RE541922 FILTER E 64.21 64.21 | |||
| 1 1 RE522878 FILTER E 64.26 64.26 | |||
| 1 1 AT223493 FUEL FIL 21.83 21.83 | |||
| 1 1 AM39653 OIL FILT 19.39 19.39 | |||
| 1 1 AT300487 FILTER E 126.79 126.79 | |||
| 1 1 AT191102 AIR FILT 30.89 30.89 | |||
| 1 1 AT307501 AIR FILT 25.41 25.41 | |||
| 1 1 2450820L 20L - 36 158.15 158.15 | |||
| PLEASE PICK AND PU IN BRADS OIL ROOM! | |||
| Date 18JAN2023 13:37:10 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 42 Work Order 3524310 Seg. 02 Opn Dt 13JAN2023 | |||
| Auth by Phone 902-835-3381 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S MUNICIPAL ENTERPRISES LIM Cust No. 42000005 S MUNICIPAL ENTERPRISES LIM | |||
| O 315 ROCKY LAKE DRIVE Pur-Ord. 10731374 H REQUIRE -PO -JOB OR EQUIP | |||
| L PO BOX 48100 P-% 0.0 L-% 0.0 I invoicereceiving@dexter.c | |||
| D BEDFORD, NS B4A 3Z2 P 48 QUARRYSTONE, NS B4A 3 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 544K 1DW544KZEED664197 L109 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0909 Lbr Tx-0909 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 3.00 01-16 R/T 04540 REPAIR 205.00 615.00 | |||
| 3.00- 01-16 R/T 04540 REPAIR 205.00 615.00- | |||
| .75 01-16 R/T 04540 REPAIR 205.00 153.75 | |||
| 1.25 01-16 R/T 04540 REPAIR 205.00 256.25 | |||
| 3.50 01-16 R/T 04540 REPAIR 205.00 717.50 | |||
| .75 01-16 O/T 04540 REPAIR 265.00 198.75 | |||
| 1.00 01-18 R/T 04540 REPAIR 205.00 205.00 | |||
| 1 01-18 1 SERVICE ACCESSORIES 137.81 137.81 | |||
| 1 01-18 1 LABOUR CREDIT AS PER AGREE 522.50- 522.50- | |||
| 1 01-18 1 CARBON TAX CREDIT 30.63- 30.63- | |||
| SEG # 02 TOTAL = 561.55 P 7.25 LH 1,531.25 L 415.32-M 1,677.48 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 561.55 * | |||
| * Total Labor 1,685.00 * | |||
| * Non-Taxable 1,685.00 * | |||
| * Misc Charges 434.56-* | |||
| * GST/HST 271.80 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 2,083.79 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 18JAN2023 13:40:49 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 42 Work Order 3524330 Seg. 01 Opn Dt 18JAN2023 | |||
| Auth by Phone 902-835-3381 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S MUNICIPAL ENTERPRISES LIM Cust No. 42000005 S MUNICIPAL ENTERPRISES LIM | |||
| O 315 ROCKY LAKE DRIVE Pur-Ord. 10731900 H REQUIRE -PO -JOB OR EQUIP | |||
| L PO BOX 48100 P-% 0.0 L-% 0.0 I invoicereceiving@dexter.c | |||
| D BEDFORD, NS B4A 3Z2 P 48 QUARRYSTONE, NS B4A 3 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 324L 1LU324LXKZB069244 L-124 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0909 Lbr Tx-0909 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| SERVICE CALL TO GOODWOOD | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: HALPM1 T | |||
| PROMISE DATE: 18JAN2023 T | |||
| SPECIAL INSTRUCTIONS: MILLS DR GOODWOOD NS T | |||
| CONTACT: MAURICE COMPAGNON 902-717-1354 T | |||
| EMAIL: MCOMPAGNON@DEXTERS.CA T | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| PERFOM 500 HOUR SERVICE | |||
| 2 2 245085L 5L-(4x5) 43.01 86.02 | |||
| 5 5 WDF WASTE DI .10 .50 | |||
| 1 1 MIU800650 OIL FILT 26.20 26.20 | |||
| 1 1 AT171854 AIR FILT 53.24 53.24 | |||
| 1 1 KV16429 AIR FILT 96.66 96.66 | |||
| 1 1 MIU805005 FILTER E 95.99 95.99 | |||
| 1 1 MIU802421 FILTER E 51.97 51.97 | |||
| 1 1 MIU802422 O-RING 19.39 19.39 | |||
| 1 1 LW12202965 FILTER 107.14 107.14 | |||
| .50 01-18 R/T 04540 REPAIR 205.00 102.50 | |||
| PLEASE PICK AND PUT IN BRADS OIL ROOM FOR 3PM!! | |||
| SEG # 02 TOTAL = 537.11 P .50 LH 102.50 L .00 M 639.61 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 537.11 * | |||
| * Total Labor 102.50 * | |||
| * Non-Taxable 102.50 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 95.94 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 735.55 * | |||
| **************************************** | |||
| @@ -0,0 +1,19 @@ | |||
| using System.Net; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using Microsoft.Identity.Client; | |||
| using Microsoft.Exchange.WebServices; | |||
| using Microsoft.Exchange.WebServices.Data; | |||
| namespace jdis_import.MailObjects | |||
| { | |||
| public class Exch365 | |||
| { | |||
| } | |||
| } | |||
| @@ -0,0 +1,15 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace jdis_import | |||
| { | |||
| public class Part | |||
| { | |||
| public string Qty { get; set; } | |||
| public string Number { get; set; } | |||
| public string Description { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,870 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using Microsoft.Identity.Client; | |||
| using Microsoft.Exchange.WebServices.Data; | |||
| using System.IO; | |||
| using System.Data; | |||
| using System.Data.SqlClient; | |||
| using System.Reflection; | |||
| /* | |||
| Secret Value up-8Q~y46~JyQZjJlsAJ-zpXpglpmuPIJ1Gx3a2O | |||
| Secret ID cba04a6c-a233-4646-909b-b50921edbe1c | |||
| Client ID 489776b1-ee79-4b14-bc44-9f6bf47332db | |||
| Object ID c7647074-edb6-4e8e-8a01-a1ed924fdae9 | |||
| Tenant ID 1fd06c96-d3a4-45e9-9ed7-bcecb394d277 | |||
| */ | |||
| namespace jdis_import | |||
| { | |||
| class Program | |||
| { | |||
| static void Main(string[] args) | |||
| private static bool _log = true; | |||
| private static string _connection = "Data Source=RPM-APP.prelub.com;Initial Catalog=Connexion_Brandt;User ID=mobilepmuser;Password=data4techs;"; | |||
| private static string _workOrderNumber = string.Empty; | |||
| private static List<string> _sqlMessages = new List<string>(); | |||
| private static bool _newMachine = false; | |||
| private static bool _quoted = false; | |||
| private static Dictionary<string, string> _keys = new Dictionary<string, string>() { { "SecretV", "up-8Q~y46~JyQZjJlsAJ-zpXpglpmuPIJ1Gx3a2O" }, { "SecretID", "cba04a6c-a233-4646-909b-b50921edbe1c" }, { "ObjectId", "c7647074-edb6-4e8e-8a01-a1ed924fdae9" }, { "TenentID", "1fd06c96-d3a4-45e9-9ed7-bcecb394d277" }, { "AppID", "489776b1-ee79-4b14-bc44-9f6bf47332db" } }; | |||
| public static Dictionary<string, int> InspectionType; | |||
| static async System.Threading.Tasks.Task Main(string[] args) | |||
| { | |||
| SetupDirectories(); | |||
| List<ToDo> list = new List<ToDo>(); | |||
| var cca = ConfidentialClientApplicationBuilder | |||
| // .Create("1dff6bdb-7009-4d2a-ae0f-9f333a4f182b") | |||
| // .WithClientSecret("VOD8Q~7BI9u4ySU0saesCG87TaEtKSCya5vw6as5") | |||
| // .WithTenantId("1fd06c96-d3a4-45e9-9ed7-bcecb394d277") | |||
| .Create(_keys["AppID"]) | |||
| .WithClientSecret(_keys["SecretV"]) | |||
| .WithTenantId(_keys["TenentID"]) | |||
| .Build(); | |||
| var ewsScopes = new string[] { "https://outlook.office365.com/.default" }; | |||
| try | |||
| { | |||
| var authResult = await cca.AcquireTokenForClient(ewsScopes) | |||
| .ExecuteAsync(); | |||
| // Configure the ExchangeService with the access token | |||
| var ewsClient = new ExchangeService(); | |||
| ewsClient.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx"); | |||
| ewsClient.Credentials = new OAuthCredentials(authResult.AccessToken); | |||
| ewsClient.ImpersonatedUserId = | |||
| new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "cmobile@prelub.com"); | |||
| Mailbox mb = new Mailbox("connexionmobile@rpmindustries.org"); | |||
| FolderId fid = new FolderId(WellKnownFolderName.Inbox, mb); | |||
| List<SearchFilter> searchFilterCollection = new List<SearchFilter>(); | |||
| string[] filters = "Brandt Import;BRANDT IMPORT;brandt import;TEST Brandt".Split(';'); | |||
| foreach (string s in filters) | |||
| searchFilterCollection.Add(new SearchFilter.ContainsSubstring(ItemSchema.Subject, s)); | |||
| SearchFilter searchFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.Or, searchFilterCollection.ToArray()); | |||
| ItemView view = new ItemView(100); | |||
| view.PropertySet = new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject, ItemSchema.DateTimeReceived); | |||
| view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending); | |||
| view.Traversal = ItemTraversal.Shallow; | |||
| FindItemsResults<Item> findResults = ewsClient.FindItems(fid, searchFilter, view); | |||
| foreach (EmailMessage msg in findResults.Items) | |||
| { | |||
| msg.Load(); | |||
| if (!msg.IsRead) | |||
| { | |||
| if (msg.HasAttachments) | |||
| { | |||
| foreach (Attachment attachment in msg.Attachments) | |||
| { | |||
| attachment.Load(); | |||
| if (attachment is FileAttachment) | |||
| { | |||
| ToDo todo = new ToDo(); | |||
| todo.Sender = msg.Sender.Address; | |||
| todo.SenderName = msg.Sender.Name; | |||
| todo.FileName = attachment.Name; | |||
| list.Add(todo); | |||
| //Download File | |||
| FileAttachment fAttachment = attachment as FileAttachment; | |||
| File.WriteAllBytes(fAttachment.Name, fAttachment.Content); | |||
| msg.IsRead = true; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| foreach (ToDo import in list) | |||
| { | |||
| //Start Importing | |||
| BeginImport(import); | |||
| GetInspectionTypes(); | |||
| ReadFile(import); | |||
| } | |||
| foreach (ToDo sendMsg in list) | |||
| { | |||
| string body = "JDIS File: {0} {1}"; | |||
| if (sendMsg.Success) | |||
| { | |||
| body = string.Format(body, sendMsg.FileName, "Was Imported Successfully"); | |||
| } | |||
| else | |||
| { | |||
| body = string.Format(body, sendMsg.FileName, string.Format("Had Errors while importing: {0}", sendMsg.Validation)); | |||
| } | |||
| EmailMessage msgToSend = new EmailMessage(ewsClient); | |||
| msgToSend.Subject = sendMsg.FileName; | |||
| msgToSend.ToRecipients.Add(new EmailAddress(sendMsg.Sender)); | |||
| msgToSend.CcRecipients.Add(new EmailAddress("mcarman@rpmindustries.com")); | |||
| msgToSend.Body = body; | |||
| msgToSend.SendAndSaveCopy(); | |||
| } | |||
| } | |||
| catch (MsalException ex) | |||
| { | |||
| Console.WriteLine($"Error acquiring access token: {ex}"); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| Console.WriteLine($"Error: {ex}"); | |||
| } | |||
| if (System.Diagnostics.Debugger.IsAttached) | |||
| { | |||
| Console.WriteLine("Hit any key to exit..."); | |||
| Console.ReadKey(); | |||
| } | |||
| } | |||
| public static void BeginImport(ToDo todo) | |||
| { | |||
| XMLData.BuildIntervalLookup(); | |||
| } | |||
| private static void SetupDirectories() | |||
| { | |||
| if (!Directory.Exists("Success")) | |||
| Directory.CreateDirectory("Success"); | |||
| if (!Directory.Exists("Fail")) | |||
| Directory.CreateDirectory("Fail"); | |||
| if (!Directory.Exists("Log")) | |||
| Directory.CreateDirectory("Log"); | |||
| } | |||
| public static void GetInspectionTypes() | |||
| { | |||
| int i = (int)System.Net.SecurityProtocolType.Tls12; | |||
| InspectionType = new Dictionary<string, int>(); | |||
| SqlConnection con = new SqlConnection("Data Source=RPM-APP.prelub.com;Initial Catalog=Connexion_Brandt;User ID=mobilepmuser;Password=data4techs;"); | |||
| con.Open(); | |||
| SqlCommand cmd = con.CreateCommand(); | |||
| cmd.CommandTimeout = 0; | |||
| cmd.Connection = con; | |||
| cmd.CommandText = "Select ID, [Name] From InspectionType"; | |||
| cmd.CommandType = CommandType.Text; | |||
| DataSet ds = new DataSet(); | |||
| SqlDataAdapter da = new SqlDataAdapter(cmd); | |||
| da.Fill(ds); | |||
| foreach (DataRow row in ds.Tables[0].Rows) | |||
| { | |||
| InspectionType.Add(row["Name"].ToString(), Convert.ToInt32(row["ID"])); | |||
| } | |||
| ds.Dispose(); | |||
| cmd.Dispose(); | |||
| con.Close(); | |||
| con.Dispose(); | |||
| Console.WriteLine(i); | |||
| } | |||
| private static string frmtString | |||
| { | |||
| get | |||
| { | |||
| if (_quoted) return "\"{0}\""; | |||
| else return "{0}"; | |||
| } | |||
| } | |||
| private static List<string> WriteFileToText(string file) | |||
| { | |||
| List<string> list = new List<string>(); | |||
| string txt = string.Empty; | |||
| using (StreamReader sr = new StreamReader(file)) | |||
| { | |||
| txt = sr.ReadToEnd().Trim(); | |||
| txt = txt.Replace("\r\r\r", ""); | |||
| txt = txt.Replace("\r\r", ""); | |||
| txt = txt.Replace("\r", ""); | |||
| sr.Close(); | |||
| } | |||
| string[] array = txt.Trim().Split('\n'); | |||
| list.AddRange(array); | |||
| return list; | |||
| } | |||
| private static DateTime DateFormatter(string d, bool hastime = true) | |||
| { | |||
| string month, day, year, time; | |||
| DateTime dt = new DateTime(); | |||
| if (d.IndexOf("JAN") != -1) | |||
| { | |||
| month = "01"; | |||
| d = d.Replace("JAN", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("FEB") != -1) | |||
| { | |||
| month = "02"; | |||
| d = d.Replace("FEB", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("MARCH") != -1) | |||
| { | |||
| month = "03"; | |||
| d = d.Replace("MARCH", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("MAR") != -1) | |||
| { | |||
| month = "03"; | |||
| d = d.Replace("MAR", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("APRIL") != -1) | |||
| { | |||
| month = "04"; | |||
| d = d.Replace("APRIL", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("APR") != -1) | |||
| { | |||
| month = "04"; | |||
| d = d.Replace("APR", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("MAY") != -1) | |||
| { | |||
| month = "05"; | |||
| d = d.Replace("MAY", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("JUNE") != -1) | |||
| { | |||
| month = "06"; | |||
| d = d.Replace("JUNE", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("JUN") != -1) | |||
| { | |||
| month = "06"; | |||
| d = d.Replace("JUN", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("JULY") != -1) | |||
| { | |||
| month = "07"; | |||
| d = d.Replace("JULY", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("JUL") != -1) | |||
| { | |||
| month = "07"; | |||
| d = d.Replace("JUL", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("AUG") != -1) | |||
| { | |||
| month = "08"; | |||
| d = d.Replace("AUG", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("SEPT") != -1) | |||
| { | |||
| month = "09"; | |||
| d = d.Replace("SEPT", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("SEP") != -1) | |||
| { | |||
| month = "09"; | |||
| d = d.Replace("SEP", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("OCT") != -1) | |||
| { | |||
| month = "10"; | |||
| d = d.Replace("OCT", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("0CT") != -1) | |||
| { | |||
| month = "10"; | |||
| d = d.Replace("0CT", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else if (d.IndexOf("NOV") != -1) | |||
| { | |||
| month = "11"; | |||
| d = d.Replace("NOV", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| else | |||
| { | |||
| month = "12"; | |||
| d = d.Replace("DEC", "|"); | |||
| day = d.Substring(0, d.IndexOf("|")); | |||
| year = d.Substring(d.IndexOf("|") + 1, 4); | |||
| if (hastime) | |||
| time = d.Substring(d.IndexOf(":") - 3 + 2); | |||
| else time = "00:00:00.000"; | |||
| string date = string.Format("{0}-{1}-{2} {3}", year, month, day, time); | |||
| dt = DateTime.Parse(date); | |||
| } | |||
| return dt; | |||
| } | |||
| private static void ReadFile(ToDo todo) | |||
| { | |||
| string file = todo.FileName; | |||
| Customer c = new Customer(); | |||
| WorkOrder wo = new WorkOrder(); | |||
| Equipment eq = new Equipment(); | |||
| List<Part> parts = new List<Part>(); | |||
| Console.WriteLine("Line 306: " + file); | |||
| Console.WriteLine("Line 307: " + file); | |||
| string filemove = string.Empty; | |||
| string filetxt = string.Empty; | |||
| string inspectionLevel = string.Empty; | |||
| bool isSpecial = false; | |||
| StringBuilder specialInstructions = new StringBuilder(); | |||
| int line = 1; | |||
| try | |||
| { | |||
| List<string> filelines = WriteFileToText(file); | |||
| for (int i = filelines.Count - 1; i >= 0; i--) | |||
| { | |||
| if (string.IsNullOrEmpty(filelines[i])) filelines.RemoveAt(i); | |||
| } | |||
| string[] lines = filelines.ToArray(); | |||
| foreach (string s in lines) | |||
| { | |||
| string currentline = s.Trim().Replace("'", "''"); | |||
| if (currentline.Contains("Page") && currentline.Substring(78).Trim() != "1") | |||
| line = 18; | |||
| if (currentline.Contains("Page") && currentline.Substring(78).Trim() == "1") | |||
| line = 1; | |||
| switch (line) | |||
| { | |||
| case 1: | |||
| string strDate = currentline.Substring(5, currentline.IndexOf("*") - 6); | |||
| strDate = strDate.Trim(); | |||
| strDate.Replace(" ", " "); | |||
| wo.CreateDate = DateFormatter(strDate); | |||
| break; | |||
| case 2: | |||
| string strWONum = currentline.Substring(currentline.IndexOf("Work Order") + 10, 12); | |||
| strWONum = strWONum.Trim(); | |||
| wo.Number = strWONum; | |||
| _workOrderNumber = strWONum; | |||
| string strSeg = currentline.Substring(currentline.IndexOf("Seg.") + 4, 25); | |||
| strSeg = strSeg.Trim(); | |||
| wo.Segment = strSeg; | |||
| string strODate = currentline.Substring(currentline.IndexOf("Opn Dt") + 6); | |||
| strODate = strODate.Trim(); | |||
| wo.OpnDt = DateFormatter(strODate, false); | |||
| break; | |||
| case 5: | |||
| c.Name = currentline.Substring(3, 25); | |||
| c.Number = currentline.Substring(38, 10); | |||
| break; | |||
| case 6: | |||
| c.Addr1 = currentline.Substring(3, 25); | |||
| break; | |||
| case 7: | |||
| c.Addr2 = currentline.Substring(3, 25); | |||
| break; | |||
| case 8: | |||
| int comma = currentline.IndexOf(","); | |||
| int length = currentline.Length - 3; | |||
| c.City = (comma == -1) ? "" : currentline.Substring(3, comma - 3); | |||
| c.State = currentline.Substring(currentline.IndexOf(",") + 2, 2); | |||
| c.Zip = currentline.Substring(comma + 5, 7); | |||
| break; | |||
| case 11: | |||
| eq.Make = currentline.Substring(0, 8).Trim(); | |||
| eq.Model = currentline.Substring(8, 14).Trim(); | |||
| eq.SerialNumber = currentline.Substring(22, 22).Trim(); | |||
| eq.EquipmentNumber = currentline.Substring(42, 16).Trim(); | |||
| eq.MeterReading = currentline.Substring(60, 7).Trim(); | |||
| eq.MID = CSVObject.MachineExists(eq.SerialNumber, _connection); | |||
| if (eq.MID == 0) _newMachine = true; | |||
| break; | |||
| default: | |||
| break; | |||
| } | |||
| if (line > 14) | |||
| { | |||
| if (currentline.EndsWith(" T")) | |||
| { | |||
| if (currentline.Contains("PM LEVEL")) | |||
| { | |||
| isSpecial = false; | |||
| } | |||
| else if (currentline.Contains("PM INTERVAL")) | |||
| { | |||
| isSpecial = false; | |||
| string pminterval = currentline.Substring(currentline.IndexOf(":") + 2); | |||
| pminterval = pminterval.Substring(0, pminterval.IndexOf(" ")).Trim(); | |||
| if (XMLData.IntervalLookup.ContainsKey(pminterval)) wo.InspectionLevel = XMLData.IntervalLookup[pminterval].ToString(); | |||
| if (!string.IsNullOrEmpty(wo.InspectionLevel)) wo.InspectionInterval = pminterval; | |||
| string strService = currentline.Substring(currentline.IndexOf(":") + 2); | |||
| strService = strService.Substring(strService.IndexOf(" ") + 1).Trim(); | |||
| strService = strService.Substring(strService.IndexOf(" ") + 1).Trim(); | |||
| if (strService.IndexOf(" ") > 0) | |||
| strService = strService.Substring(0, strService.IndexOf(" ")).Trim(); | |||
| if (InspectionType.ContainsKey(strService)) | |||
| wo.InspectionType = InspectionType[strService].ToString(); | |||
| else wo.InspectionType = InspectionType["PM"].ToString(); | |||
| string codeanddescriptionoriginal = currentline.Substring(currentline.IndexOf(":") + 2); | |||
| codeanddescriptionoriginal = codeanddescriptionoriginal.Substring(0, codeanddescriptionoriginal.IndexOf(" T") - 3).Trim(); | |||
| wo.CodeAndDescriptionOriginal = codeanddescriptionoriginal; | |||
| } | |||
| else if (currentline.Contains("EMPID")) | |||
| { | |||
| isSpecial = false; | |||
| string empid = currentline.Substring(currentline.IndexOf(":") + 2); | |||
| empid = empid.Substring(0, empid.IndexOf(" ")).Trim(); | |||
| wo.TechnicianUserID = empid; | |||
| } | |||
| else if (currentline.Contains("PROMISE DATE")) | |||
| { | |||
| isSpecial = false; | |||
| string promisedate = currentline.Substring(currentline.IndexOf(":") + 2); | |||
| promisedate = promisedate.Substring(0, promisedate.IndexOf(" ")).Trim(); | |||
| wo.ScheduledStartDate = DateFormatter(promisedate, false); | |||
| } | |||
| else if (currentline.Contains("SPECIAL INSTRUCTIONS")) | |||
| { | |||
| isSpecial = true; | |||
| string special = currentline.Substring(currentline.IndexOf(":") + 2); | |||
| special = special.Substring(0, special.IndexOf(" T") - 1).Trim(); | |||
| specialInstructions.Append(special); | |||
| } | |||
| else | |||
| { | |||
| if (isSpecial) | |||
| { | |||
| string addspecial = currentline.Substring(0, currentline.IndexOf(" T") - 1).Trim(); | |||
| specialInstructions.Append(string.Format(" {0}", addspecial)); | |||
| } | |||
| } | |||
| } | |||
| else | |||
| { | |||
| isSpecial = false; | |||
| int qty = 0; | |||
| if (currentline.Length > 0) | |||
| { | |||
| string input = currentline.Substring(0, (currentline.IndexOf(" ") == -1) ? 1 : currentline.IndexOf(" ")).Trim(); | |||
| if (int.TryParse(input, out qty)) | |||
| { | |||
| if (qty < 100 && !currentline.Contains("HR")) | |||
| { | |||
| Part pt = new Part(); | |||
| string sline = currentline.Substring(19).Trim(); | |||
| //pt.Description = currentline.Substring(34, 14); | |||
| pt.Number = sline.Substring(0, sline.IndexOf(" ")); | |||
| sline = sline.Substring(sline.IndexOf(" ")).Trim(); | |||
| pt.Description = sline.Substring(0, sline.IndexOf(" ")).Trim(); | |||
| pt.Qty = currentline.Substring(0, currentline.IndexOf(" ")).Trim(); | |||
| parts.Add(pt); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| line++; | |||
| } | |||
| if (wo.ScheduledStartDate == DateTime.MinValue) wo.ScheduledStartDate = DateTime.Now; | |||
| List<CSVObject> list = new List<CSVObject>(); | |||
| List<CSVObject> exceptions = new List<CSVObject>(); | |||
| if (parts.Count == 0) | |||
| { | |||
| Part p = new Part(); | |||
| p.Description = string.Empty; | |||
| p.Qty = string.Empty; | |||
| p.Number = string.Empty; | |||
| parts.Add(p); | |||
| } | |||
| static void conn_InfoMsg(object sender, SqlInfoMessageEventArgs e) | |||
| { | |||
| _sqlMessages.Add(e.Message); | |||
| } | |||
| foreach (Part prt in parts) | |||
| { | |||
| CSVObject obj = new CSVObject(); | |||
| obj.Address = string.Format(frmtString, c.Addr1.Trim()); | |||
| obj.Address2 = string.Format(frmtString, c.Addr2.Trim()); | |||
| obj.City = string.Format(frmtString, c.City.Trim()); | |||
| obj.State = string.Format(frmtString, c.State.Trim()); | |||
| obj.CustomerName = string.Format(frmtString, c.Name.Trim()); | |||
| obj.CustomerNumber = string.Format(frmtString, c.Number.Trim()); | |||
| obj.DBSWorkOrderNumber = string.Format(frmtString, wo.Number.Trim()); | |||
| obj.EquipmentNumber = string.Format(frmtString, eq.EquipmentNumber.Trim()); | |||
| obj.Make = string.Format(frmtString, eq.Make.Trim()); | |||
| obj.MeterReading = string.Format(frmtString, eq.MeterReading.Trim()); | |||
| obj.Model = string.Format(frmtString, eq.Model.Trim()); | |||
| obj.PartNumber = string.Format(frmtString, prt.Number.Trim()); | |||
| obj.PartNumberDescription = string.Format(frmtString, prt.Description.Trim()); | |||
| obj.Quantity = string.Format(frmtString, prt.Qty.Trim()); | |||
| obj.SegmentNumber = string.Format(frmtString, wo.Segment.Trim()); | |||
| obj.SerialNumber = string.Format(frmtString, eq.SerialNumber.Trim()); | |||
| obj.ZipCode = string.Format(frmtString, c.Zip.Trim()); | |||
| obj.CodeAndDescription = string.Format(frmtString, wo.InspectionLevel.Trim()); | |||
| obj.SpecialInstructions = specialInstructions.ToString(); | |||
| obj.CodeAndDescriptionOriginal = string.Format(frmtString, wo.CodeAndDescriptionOriginal); | |||
| obj.ContractTypeCode = string.Format(frmtString, ""); | |||
| obj.DateActualStart = string.Format(frmtString, wo.CreateDate); | |||
| obj.FamilyCode = string.Format(frmtString, ""); | |||
| obj.FamilyDescription = string.Format(frmtString, ""); | |||
| obj.JobSiteContactName = string.Format(frmtString, ""); | |||
| obj.JobSiteContactPhone = string.Format(frmtString, ""); | |||
| obj.LastServiceDate = string.Format(frmtString, ""); | |||
| obj.PriorityCode = string.Format(frmtString, ""); | |||
| obj.ReferenceDocNumber = string.Format(frmtString, ""); | |||
| obj.ServiceTech = string.Format(frmtString, wo.TechnicianUserID); | |||
| obj.StoreDescription = string.Format(frmtString, ""); | |||
| obj.Store = string.Format(frmtString, ""); | |||
| obj.TechName = string.Format(frmtString, ""); | |||
| obj.Year = string.Format(frmtString, ""); | |||
| obj.ScheduledStartDate = string.Format(frmtString, wo.ScheduledStartDate.ToString("yyyy-MM-dd hh:mm:ss")); | |||
| obj.InspectionType = string.Format(frmtString, wo.InspectionType.ToString()); | |||
| obj.Validate(); | |||
| if (string.IsNullOrEmpty(obj.SerialNumber)) | |||
| { | |||
| exceptions.Add(obj); | |||
| //throw new ApplicationException("Serial Number is missing."); | |||
| } | |||
| else list.Add(obj); | |||
| if (list.Count == 0) | |||
| { | |||
| StringBuilder sbException = new StringBuilder(); | |||
| foreach (CSVObject csvobj in exceptions) | |||
| foreach (PropertyInfo pi in csvobj.GetType().GetProperties()) | |||
| { | |||
| sbException.AppendLine(string.Format("{0}: {1}", pi.Name, pi.GetValue(csvobj, null))); | |||
| } | |||
| throw new ApplicationException(string.Format("Object Validation Error\r\n{0}", sbException.ToString())); | |||
| } | |||
| } | |||
| filemove = Path.Combine("Success", file);// string.Format("{0}\\{1}\\{2}", _currentDir, _settings["SUCCESSDIR"], file); | |||
| try | |||
| { | |||
| SqlConnection conn = new SqlConnection(_connection); | |||
| conn.Open(); | |||
| string errorstr = CSVObject.WriteToDB(list, conn); | |||
| conn.Close(); | |||
| conn.Dispose(); | |||
| if (!string.IsNullOrEmpty(errorstr)) throw new ApplicationException(errorstr); | |||
| SqlCommand cmd = new SqlCommand("usp_DoImport", new SqlConnection(_connection)); | |||
| cmd.CommandTimeout = 0; | |||
| SqlParameter sqlReturn = cmd.Parameters.Add("@b", SqlDbType.Int); | |||
| sqlReturn.Direction = ParameterDirection.ReturnValue; | |||
| cmd.Connection.Open(); | |||
| cmd.Connection.InfoMessage += new SqlInfoMessageEventHandler(conn_InfoMsg); | |||
| cmd.Connection.FireInfoMessageEventOnUserErrors = true; | |||
| cmd.CommandType = CommandType.StoredProcedure; | |||
| cmd.ExecuteNonQuery(); | |||
| if (Convert.ToInt32(cmd.Parameters["@b"].Value) != 0) | |||
| throw new Exception("Error happend in the do import"); | |||
| cmd.Connection.Close(); | |||
| cmd.Dispose(); | |||
| conn.Dispose(); | |||
| SqlCommand delcmd = new SqlCommand("Delete Results_Brandt", new SqlConnection(_connection)); | |||
| delcmd.CommandTimeout = 0; | |||
| delcmd.Connection.Open(); | |||
| delcmd.CommandType = CommandType.Text; | |||
| try | |||
| { | |||
| delcmd.ExecuteNonQuery(); | |||
| } | |||
| catch (Exception dex) | |||
| { | |||
| throw new Exception(dex.Message); | |||
| } | |||
| delcmd.Connection.Close(); | |||
| delcmd.Dispose(); | |||
| } | |||
| catch (Exception exSql) | |||
| { | |||
| string msg = exSql.Message; | |||
| string logmsg = string.Format("Date: {0} Error: {1}", DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt"), exSql.Message); | |||
| WriteToLog(logmsg); | |||
| todo.Validation = exSql.Message + " " + _workOrderNumber; | |||
| //MailSvc.SendResponse(msg, _workOrderNumber); | |||
| } | |||
| Console.WriteLine("Line 584: " + filemove); | |||
| if (File.Exists(filemove)) File.Delete(filemove); | |||
| File.Move(file, filemove); | |||
| if (_log) | |||
| { | |||
| string successmsg = string.Format("Success Date: {0} File Name: {1} Work Order #: {2}{3}", DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt"), file, _workOrderNumber, "********************************"); | |||
| WriteToLog(successmsg); | |||
| if (exceptions.Count > 0) | |||
| { | |||
| foreach (CSVObject csvobj in exceptions) | |||
| { | |||
| string csvmsg = string.Format("Null Serial# Exception Date: {0} File Name: {1} Work Order #: {2}{3}", DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt"), file, _workOrderNumber, "********************************"); | |||
| WriteToLog(csvmsg); | |||
| } | |||
| } | |||
| if (_sqlMessages.Count > 0) | |||
| { | |||
| WriteToLog("***********************SQL Messages************************"); | |||
| foreach (string sqlmessg in _sqlMessages) | |||
| WriteToLog(sqlmessg); | |||
| WriteToLog("*********************End SQL Messages**********************"); | |||
| } | |||
| } | |||
| using (SqlConnection doublecheck = new SqlConnection(_connection)) | |||
| { | |||
| SqlCommand cmddoublecheck = doublecheck.CreateCommand(); | |||
| cmddoublecheck.Connection.Open(); | |||
| cmddoublecheck.CommandTimeout = 0; | |||
| cmddoublecheck.CommandText = string.Format("Select MAX(ID) from WorkOrder where Number = '{0}'", wo.Number); | |||
| cmddoublecheck.CommandType = CommandType.Text; | |||
| int rslt = (cmddoublecheck.ExecuteScalar() == DBNull.Value ? 0 : (int)cmddoublecheck.ExecuteScalar()); | |||
| cmddoublecheck.Dispose(); | |||
| if (rslt > 0) | |||
| { | |||
| cmddoublecheck.CommandText = string.Format("Select ID from Inspection where workorderid = {0}", rslt); | |||
| rslt = (cmddoublecheck.ExecuteScalar() == DBNull.Value ? 0 : (int)cmddoublecheck.ExecuteScalar()); | |||
| if (rslt > 0) | |||
| { | |||
| todo.Success = true; | |||
| //MailSvc.SendResponse("Work Order was imported successfully.", wo.Number); | |||
| } | |||
| else | |||
| { | |||
| //string noTemplate = string.Format("Work Order was created successfully. However, it appears there is no template for this model: {0}", eq.Model); | |||
| todo.Validation = todo.Validation + "\r\n" + string.Format("Work Order was created successfully. However, it appears there is no template for this model: {0}", eq.Model); | |||
| todo.Success = false; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| todo.Validation = todo.Validation + "\r\n" + string.Format("Failed to import work order {0}", wo.Number);//) | |||
| } | |||
| //MailSvc.SendResponse(string.Format("Failed to import work order {0}.", wo.Number), wo.Number); | |||
| } | |||
| //Console.ReadLine(); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| string exMesg = string.Empty; | |||
| try | |||
| { | |||
| exMesg = string.Format("Date: {0} Error: {1}\r\nError occured in line # {2}", DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt"), ex.Message, line); | |||
| } | |||
| catch (Exception exSend) | |||
| { | |||
| Console.Write(exSend.Message); | |||
| } | |||
| WriteToLog(exMesg); | |||
| filemove = Path.Combine("Fail", file);//, file); | |||
| try | |||
| { | |||
| Console.WriteLine("Line 634: " + file); | |||
| Console.WriteLine("Line 635: " + filemove); | |||
| File.Move(file, filemove); | |||
| } | |||
| catch (Exception moveExcept) | |||
| { | |||
| Console.WriteLine(moveExcept.Message); | |||
| } | |||
| todo.Success = false; | |||
| todo.Validation = todo.Validation + "\r\n" + string.Format("Failed to import work order {0}. Error: {1}", wo.Number, exMesg); | |||
| //MailSvc.SendResponse(string.Format("Failed to import work order {0}. Error: {1}", wo.Number, exMesg), wo.Number, filemove); | |||
| } | |||
| } | |||
| private static void CreateLogFile(string logfile) | |||
| { | |||
| using (StreamWriter sw = File.CreateText(logfile)) | |||
| { | |||
| sw.WriteLine("******************************************"); | |||
| sw.WriteLine("****************IMPORT LOG****************"); | |||
| sw.WriteLine("******************************************"); | |||
| } | |||
| } | |||
| public static void WriteToLog(string message, string sqlmessage = "") | |||
| { | |||
| string logfile = Path.Combine("Log", "log.log"); | |||
| if (!File.Exists(logfile)) | |||
| { | |||
| CreateLogFile(logfile); | |||
| } | |||
| using (StreamWriter sw = File.AppendText(logfile)) | |||
| { | |||
| sw.WriteLine(message); | |||
| if (!string.IsNullOrEmpty(sqlmessage)) | |||
| sw.WriteLine(sqlmessage); | |||
| } | |||
| } | |||
| } | |||
| public class ToDo | |||
| { | |||
| private bool _success = false; | |||
| public bool Success { get { return _success; } set { _success = value; } } | |||
| public string Sender { get; set; } | |||
| public string SenderName { get; set; } | |||
| public string FileName { get; set; } | |||
| public string Validation { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,12 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| public class CustomerSpec | |||
| { | |||
| } | |||
| } | |||
| @@ -0,0 +1,60 @@ | |||
| Date 18JAN2023 11:36:40 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3360706 Seg. 01 Opn Dt 18JAN2023 | |||
| Auth by LUC POISSANT Phone 306-385-8000 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S K + S POTASH CANADA GP Cust No. 48000 S | |||
| O 220 WALL STREET Pur-Ord. REQUIRED H PLEASE EMAIL INVS (see no | |||
| L P-% 0.0 L-% 0.0 I accountspayable@ks-potash | |||
| D SASKATOON, SK S7K 3Y3 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 470GLC 1FF470GXCEE471009 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0101 Lbr Tx-0101 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 1000 HR SERVICE | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| PM SERVICE CALL | |||
| SEG # 02 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| MISC ITEMS NOT COVERED BY PM INTERVAL | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: REGPM1 T | |||
| PROMISE DATE: 19JAN2023 T | |||
| SPECIAL INSTRUCTIONS: K+S SITE T | |||
| CONTACT: LUC POISSANT 306-536-8498 T | |||
| EMAIL: LUC.POISSANT@KS-POTASHCANADA.COM T | |||
| SEG # 03 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,115 @@ | |||
| Date 18JAN2023 13:37:10 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 42 Work Order 3524310 Seg. 01 Opn Dt 13JAN2023 | |||
| Auth by Phone 902-835-3381 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S MUNICIPAL ENTERPRISES LIM Cust No. 42000005 S MUNICIPAL ENTERPRISES LIM | |||
| O 315 ROCKY LAKE DRIVE Pur-Ord. 10731374 H REQUIRE -PO -JOB OR EQUIP | |||
| L PO BOX 48100 P-% 0.0 L-% 0.0 I invoicereceiving@dexter.c | |||
| D BEDFORD, NS B4A 3Z2 P 48 QUARRYSTONE, NS B4A 3 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 544K 1DW544KZEED664197 L109 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0909 Lbr Tx-0909 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| SERVICE CALL TO ANTRIM | |||
| CORRECTION: | |||
| Travel To Antrim | |||
| ---------------------------------------- | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: HALPM1 T | |||
| PROMISE DATE: 16JAN2023 T | |||
| SPECIAL INSTRUCTIONS: ANTRIM NS T | |||
| CONTACT: MAURICE COMPAGNON 902-717-1354 T | |||
| EMAIL: MCOMPAGNON@DEXTERS.CA T | |||
| .75 01-16 R/T 04540 REPAIR 205.00 153.75 | |||
| 1 01-18 1 SERVICE ACCESSORIES 13.84 13.84 | |||
| 1 01-18 1 LABOUR CREDIT AS PER AGREE 30.00- 30.00- | |||
| 1 01-18 1 CARBON TAX CREDI 3.08- 3.08- | |||
| SEG # 01 TOTAL = .00 P .75 LH 153.75 L 19.24-M 134.51 T | |||
| 500 HOUR SERVICE | |||
| CORRECTION: | |||
| Change Engine Oil & Filter | |||
| Change Fuel Filter & Water Seperator | |||
| Change Primary Air Filter | |||
| Change Cab Fresh & Recirc Filters | |||
| Check All Belts & Hoses | |||
| Grease Machine | |||
| ---------------------------------------- | |||
| 1 1 RE504836 OIL FILT 38.76 38.76 | |||
| 1 1 R502513 SEAL 11.86 11.86 | |||
| 1 1 RE541922 FILTER E 64.21 64.21 | |||
| 1 1 RE522878 FILTER E 64.26 64.26 | |||
| 1 1 AT223493 FUEL FIL 21.83 21.83 | |||
| 1 1 AM39653 OIL FILT 19.39 19.39 | |||
| 1 1 AT300487 FILTER E 126.79 126.79 | |||
| 1 1 AT191102 AIR FILT 30.89 30.89 | |||
| 1 1 AT307501 AIR FILT 25.41 25.41 | |||
| 1 1 2450820L 20L - 36 158.15 158.15 | |||
| PLEASE PICK AND PU IN BRADS OIL ROOM! | |||
| Date 18JAN2023 13:37:10 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 42 Work Order 3524310 Seg. 02 Opn Dt 13JAN2023 | |||
| Auth by Phone 902-835-3381 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S MUNICIPAL ENTERPRISES LIM Cust No. 42000005 S MUNICIPAL ENTERPRISES LIM | |||
| O 315 ROCKY LAKE DRIVE Pur-Ord. 10731374 H REQUIRE -PO -JOB OR EQUIP | |||
| L PO BOX 48100 P-% 0.0 L-% 0.0 I invoicereceiving@dexter.c | |||
| D BEDFORD, NS B4A 3Z2 P 48 QUARRYSTONE, NS B4A 3 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 544K 1DW544KZEED664197 L109 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0909 Lbr Tx-0909 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 3.00 01-16 R/T 04540 REPAIR 205.00 615.00 | |||
| 3.00- 01-16 R/T 04540 REPAIR 205.00 615.00- | |||
| .75 01-16 R/T 04540 REPAIR 205.00 153.75 | |||
| 1.25 01-16 R/T 04540 REPAIR 205.00 256.25 | |||
| 3.50 01-16 R/T 04540 REPAIR 205.00 717.50 | |||
| .75 01-16 O/T 04540 REPAIR 265.00 198.75 | |||
| 1.00 01-18 R/T 04540 REPAIR 205.00 205.00 | |||
| 1 01-18 1 SERVICE ACCESSORIES 137.81 137.81 | |||
| 1 01-18 1 LABOUR CREDIT AS PER AGREE 522.50- 522.50- | |||
| 1 01-18 1 CARBON TAX CREDIT 30.63- 30.63- | |||
| SEG # 02 TOTAL = 561.55 P 7.25 LH 1,531.25 L 415.32-M 1,677.48 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 561.55 * | |||
| * Total Labor 1,685.00 * | |||
| * Non-Taxable 1,685.00 * | |||
| * Misc Charges 434.56-* | |||
| * GST/HST 271.80 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 2,083.79 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 18JAN2023 13:40:49 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 42 Work Order 3524330 Seg. 01 Opn Dt 18JAN2023 | |||
| Auth by Phone 902-835-3381 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S MUNICIPAL ENTERPRISES LIM Cust No. 42000005 S MUNICIPAL ENTERPRISES LIM | |||
| O 315 ROCKY LAKE DRIVE Pur-Ord. 10731900 H REQUIRE -PO -JOB OR EQUIP | |||
| L PO BOX 48100 P-% 0.0 L-% 0.0 I invoicereceiving@dexter.c | |||
| D BEDFORD, NS B4A 3Z2 P 48 QUARRYSTONE, NS B4A 3 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 324L 1LU324LXKZB069244 L-124 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0909 Lbr Tx-0909 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| SERVICE CALL TO GOODWOOD | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: HALPM1 T | |||
| PROMISE DATE: 18JAN2023 T | |||
| SPECIAL INSTRUCTIONS: MILLS DR GOODWOOD NS T | |||
| CONTACT: MAURICE COMPAGNON 902-717-1354 T | |||
| EMAIL: MCOMPAGNON@DEXTERS.CA T | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| PERFOM 500 HOUR SERVICE | |||
| 2 2 245085L 5L-(4x5) 43.01 86.02 | |||
| 5 5 WDF WASTE DI .10 .50 | |||
| 1 1 MIU800650 OIL FILT 26.20 26.20 | |||
| 1 1 AT171854 AIR FILT 53.24 53.24 | |||
| 1 1 KV16429 AIR FILT 96.66 96.66 | |||
| 1 1 MIU805005 FILTER E 95.99 95.99 | |||
| 1 1 MIU802421 FILTER E 51.97 51.97 | |||
| 1 1 MIU802422 O-RING 19.39 19.39 | |||
| 1 1 LW12202965 FILTER 107.14 107.14 | |||
| .50 01-18 R/T 04540 REPAIR 205.00 102.50 | |||
| PLEASE PICK AND PUT IN BRADS OIL ROOM FOR 3PM!! | |||
| SEG # 02 TOTAL = 537.11 P .50 LH 102.50 L .00 M 639.61 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 537.11 * | |||
| * Total Labor 102.50 * | |||
| * Non-Taxable 102.50 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 95.94 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 735.55 * | |||
| **************************************** | |||
| @@ -0,0 +1,109 @@ | |||
| Date 18JAN2023 14:58:47 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3371564 Seg. 01 Opn Dt 18JAN2023 | |||
| Auth by MARY BARBARA Phone 604-591-4011 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S CITY OF SURREY Cust No. 14421632 S | |||
| O 13450 104TH AVENUE Pur-Ord. REQUIRED H PO #'S REQ'D ON ALL INV'S | |||
| L garageinvoices@surrey.ca P-% 0.0 L-% 0.0 I | |||
| D SURREY, BC V3T 1V8 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 844J DW844JX602504 O6G367 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0203 Lbr Tx-0203 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR SERVICE | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: SRYPM1 T | |||
| PROMISE DATE: 07FEB2023 T | |||
| SPECIAL INSTRUCTIONS: 19410 22ND AVE SURREY T | |||
| CONTACT: MARY BARBARA 604-590-7279 T | |||
| EMAIL: GARAGEINVOICES@SURREY.CA T | |||
| 1 1 DZ118269 OIL FILTER XY 105.06 .00 | |||
| 1 1 RE515345 FUEL FILTERXY 103.73 .00 | |||
| 1 1 RE506428 FILTER ELEMXY 80.00 .00 | |||
| 1 1 AT223493 FUEL FILTERXY 21.83 .00 | |||
| 1 1 T225008 BREATHER XY 46.38 .00 | |||
| 1 1 AT311066 AIR FILTER XY 279.52 .00 | |||
| 1 1 AT311067 AIR FILTER XY 139.13 .00 | |||
| 1 1 T168220 AIR FILTER XY 71.52 .00 | |||
| 1 1 T156471 AIR FILTER XY 93.72 .00 | |||
| 5 5 AT346594 FLUID KIT XY 52.14 .00 | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| PM SERVICE CALL | |||
| SEG # 02 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| MISC ITEMS NOT COVERED BY PM INTERVAL | |||
| SEG # 03 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| Date 18JAN2023 14:58:47 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 48 Work Order 3371564 Seg. 03 Opn Dt 18JAN2023 | |||
| Auth by MARY BARBARA Phone 604-591-4011 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S CITY OF SURREY Cust No. 14421632 S | |||
| O 13450 104TH AVENUE Pur-Ord. REQUIRED H PO #'S REQ'D ON ALL INV'S | |||
| L garageinvoices@surrey.ca P-% 0.0 L-% 0.0 I | |||
| D SURREY, BC V3T 1V8 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 844J DW844JX602504 O6G367 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0203 Lbr Tx-0203 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Backordered Parts 1,201.59 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,21 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace jdis_import | |||
| { | |||
| public class WorkOrder | |||
| { | |||
| public DateTime CreateDate { get; set; } | |||
| public DateTime OpnDt { get; set; } | |||
| public string Number { get; set; } | |||
| public string Segment { get; set; } | |||
| public string InspectionLevel { get; set; } | |||
| public string TechnicianUserID { get; set; } | |||
| public DateTime ScheduledStartDate { get; set; } | |||
| public string InspectionInterval { get; set; } | |||
| public string InspectionType { get; set; } | |||
| public string CodeAndDescriptionOriginal { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,38 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Xml.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace jdis_import | |||
| { | |||
| public class XMLData | |||
| { | |||
| private static Dictionary<string, string> _cclookup; | |||
| public static Dictionary<string, string> CCLookup { get { return _cclookup; } set { _cclookup = value; } } | |||
| private static Dictionary<string, int> _intervalLookup; | |||
| public static Dictionary<string, int> IntervalLookup { get { return _intervalLookup; } set { _intervalLookup = value; } } | |||
| public static void BuildIntervalLookup() | |||
| { | |||
| _intervalLookup = new Dictionary<string, int>(); | |||
| var doc = XDocument.Load(@"IntervalData.xml"); | |||
| var rootNodes = doc.Root.DescendantNodes().OfType<XElement>(); | |||
| Dictionary<string, string> dic = rootNodes.ToDictionary(n => n.Name.ToString(), n => n.Value); | |||
| foreach (KeyValuePair<string, string> kvp in dic) | |||
| { | |||
| _intervalLookup.Add(kvp.Key.Replace("ZZ", ""), int.Parse(kvp.Value)); | |||
| } | |||
| } | |||
| public static void BuildCCLookup() | |||
| { | |||
| _cclookup = new Dictionary<string, string>(); | |||
| var doc = XDocument.Load(string.Format("CCAddresses.xml")); | |||
| var rootNodes = doc.Root.DescendantNodes().OfType<XElement>(); | |||
| _cclookup = rootNodes.ToDictionary(n => n.Name.ToString(), n => n.Value); | |||
| } | |||
| } | |||
| } | |||
| @@ -10,8 +10,11 @@ | |||
| "dependencies": { | |||
| "Independentsoft.Exchange": "3.0.700", | |||
| "Microsoft.AspNet.WebApi.Client": "5.2.9", | |||
| "Microsoft.Exchange.WebServices": "2.2.0", | |||
| "Microsoft.Identity.Client": "4.49.1", | |||
| "Newtonsoft.Json": "13.0.1", | |||
| "RestSharp": "108.0.2" | |||
| "RestSharp": "108.0.2", | |||
| "System.Data.SqlClient": "4.8.5" | |||
| }, | |||
| "runtime": { | |||
| "jdis_import.dll": {} | |||
| @@ -37,18 +40,55 @@ | |||
| } | |||
| } | |||
| }, | |||
| "Microsoft.NETCore.Platforms/1.1.0": {}, | |||
| "Microsoft.Exchange.WebServices/2.2.0": { | |||
| "runtime": { | |||
| "lib/40/Microsoft.Exchange.WebServices.Auth.dll": { | |||
| "assemblyVersion": "15.0.0.0", | |||
| "fileVersion": "15.0.913.0" | |||
| }, | |||
| "lib/40/Microsoft.Exchange.WebServices.dll": { | |||
| "assemblyVersion": "15.0.0.0", | |||
| "fileVersion": "15.0.913.15" | |||
| } | |||
| } | |||
| }, | |||
| "Microsoft.Identity.Client/4.49.1": { | |||
| "dependencies": { | |||
| "Microsoft.IdentityModel.Abstractions": "6.22.0" | |||
| }, | |||
| "runtime": { | |||
| "lib/net6.0/Microsoft.Identity.Client.dll": { | |||
| "assemblyVersion": "4.49.1.0", | |||
| "fileVersion": "4.49.1.0" | |||
| } | |||
| } | |||
| }, | |||
| "Microsoft.IdentityModel.Abstractions/6.22.0": { | |||
| "runtime": { | |||
| "lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": { | |||
| "assemblyVersion": "6.22.0.0", | |||
| "fileVersion": "6.22.0.30727" | |||
| } | |||
| } | |||
| }, | |||
| "Microsoft.NETCore.Platforms/3.1.0": {}, | |||
| "Microsoft.NETCore.Targets/1.1.0": {}, | |||
| "Microsoft.Win32.Primitives/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "Microsoft.Win32.Registry/4.7.0": { | |||
| "dependencies": { | |||
| "System.Security.AccessControl": "4.7.0", | |||
| "System.Security.Principal.Windows": "4.7.0" | |||
| } | |||
| }, | |||
| "NETStandard.Library/1.6.1": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.Win32.Primitives": "4.3.0", | |||
| "System.AppContext": "4.3.0", | |||
| "System.Collections": "4.3.0", | |||
| @@ -127,19 +167,26 @@ | |||
| "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, | |||
| "runtime.native.System/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0" | |||
| } | |||
| }, | |||
| "runtime.native.System.Data.SqlClient.sni/4.7.0": { | |||
| "dependencies": { | |||
| "runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": "4.4.0", | |||
| "runtime.win-x64.runtime.native.System.Data.SqlClient.sni": "4.4.0", | |||
| "runtime.win-x86.runtime.native.System.Data.SqlClient.sni": "4.4.0" | |||
| } | |||
| }, | |||
| "runtime.native.System.IO.Compression/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0" | |||
| } | |||
| }, | |||
| "runtime.native.System.Net.Http/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0" | |||
| } | |||
| }, | |||
| @@ -170,6 +217,33 @@ | |||
| "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, | |||
| "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, | |||
| "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, | |||
| "runtime.win-arm64.runtime.native.System.Data.SqlClient.sni/4.4.0": { | |||
| "runtimeTargets": { | |||
| "runtimes/win-arm64/native/sni.dll": { | |||
| "rid": "win-arm64", | |||
| "assetType": "native", | |||
| "fileVersion": "0.0.0.0" | |||
| } | |||
| } | |||
| }, | |||
| "runtime.win-x64.runtime.native.System.Data.SqlClient.sni/4.4.0": { | |||
| "runtimeTargets": { | |||
| "runtimes/win-x64/native/sni.dll": { | |||
| "rid": "win-x64", | |||
| "assetType": "native", | |||
| "fileVersion": "0.0.0.0" | |||
| } | |||
| } | |||
| }, | |||
| "runtime.win-x86.runtime.native.System.Data.SqlClient.sni/4.4.0": { | |||
| "runtimeTargets": { | |||
| "runtimes/win-x86/native/sni.dll": { | |||
| "rid": "win-x86", | |||
| "assetType": "native", | |||
| "fileVersion": "0.0.0.0" | |||
| } | |||
| } | |||
| }, | |||
| "System.AppContext/4.3.0": { | |||
| "dependencies": { | |||
| "System.Runtime": "4.3.0" | |||
| @@ -186,7 +260,7 @@ | |||
| }, | |||
| "System.Collections/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| @@ -207,16 +281,43 @@ | |||
| }, | |||
| "System.Console/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.IO": "4.3.0", | |||
| "System.Runtime": "4.3.0", | |||
| "System.Text.Encoding": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Data.SqlClient/4.8.5": { | |||
| "dependencies": { | |||
| "Microsoft.Win32.Registry": "4.7.0", | |||
| "System.Security.Principal.Windows": "4.7.0", | |||
| "runtime.native.System.Data.SqlClient.sni": "4.7.0" | |||
| }, | |||
| "runtime": { | |||
| "lib/netcoreapp2.1/System.Data.SqlClient.dll": { | |||
| "assemblyVersion": "4.6.1.5", | |||
| "fileVersion": "4.700.22.51706" | |||
| } | |||
| }, | |||
| "runtimeTargets": { | |||
| "runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": { | |||
| "rid": "unix", | |||
| "assetType": "runtime", | |||
| "assemblyVersion": "4.6.1.5", | |||
| "fileVersion": "4.700.22.51706" | |||
| }, | |||
| "runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": { | |||
| "rid": "win", | |||
| "assetType": "runtime", | |||
| "assemblyVersion": "4.6.1.5", | |||
| "fileVersion": "4.700.22.51706" | |||
| } | |||
| } | |||
| }, | |||
| "System.Diagnostics.Debug/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| @@ -232,28 +333,28 @@ | |||
| }, | |||
| "System.Diagnostics.Tools/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Diagnostics.Tracing/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Globalization/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Globalization.Calendars/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Globalization": "4.3.0", | |||
| "System.Runtime": "4.3.0" | |||
| @@ -261,7 +362,7 @@ | |||
| }, | |||
| "System.Globalization.Extensions/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Globalization": "4.3.0", | |||
| "System.Resources.ResourceManager": "4.3.0", | |||
| "System.Runtime": "4.3.0", | |||
| @@ -271,7 +372,7 @@ | |||
| }, | |||
| "System.IO/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0", | |||
| "System.Text.Encoding": "4.3.0", | |||
| @@ -280,7 +381,7 @@ | |||
| }, | |||
| "System.IO.Compression/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Buffers": "4.3.0", | |||
| "System.Collections": "4.3.0", | |||
| "System.Diagnostics.Debug": "4.3.0", | |||
| @@ -312,7 +413,7 @@ | |||
| }, | |||
| "System.IO.FileSystem/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.IO": "4.3.0", | |||
| "System.IO.FileSystem.Primitives": "4.3.0", | |||
| @@ -359,7 +460,7 @@ | |||
| }, | |||
| "System.Net.Http/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Collections": "4.3.0", | |||
| "System.Diagnostics.Debug": "4.3.0", | |||
| "System.Diagnostics.DiagnosticSource": "4.3.0", | |||
| @@ -389,7 +490,7 @@ | |||
| }, | |||
| "System.Net.Primitives/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0", | |||
| "System.Runtime.Handles": "4.3.0" | |||
| @@ -397,7 +498,7 @@ | |||
| }, | |||
| "System.Net.Sockets/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.IO": "4.3.0", | |||
| "System.Net.Primitives": "4.3.0", | |||
| @@ -416,7 +517,7 @@ | |||
| }, | |||
| "System.Reflection/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.IO": "4.3.0", | |||
| "System.Reflection.Primitives": "4.3.0", | |||
| @@ -449,7 +550,7 @@ | |||
| }, | |||
| "System.Reflection.Extensions/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Reflection": "4.3.0", | |||
| "System.Runtime": "4.3.0" | |||
| @@ -457,7 +558,7 @@ | |||
| }, | |||
| "System.Reflection.Primitives/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| @@ -470,7 +571,7 @@ | |||
| }, | |||
| "System.Resources.ResourceManager/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Globalization": "4.3.0", | |||
| "System.Reflection": "4.3.0", | |||
| @@ -479,27 +580,27 @@ | |||
| }, | |||
| "System.Runtime/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0" | |||
| } | |||
| }, | |||
| "System.Runtime.Extensions/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Runtime.Handles/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Runtime.InteropServices/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Reflection": "4.3.0", | |||
| "System.Reflection.Primitives": "4.3.0", | |||
| @@ -526,9 +627,15 @@ | |||
| "System.Runtime.Extensions": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Security.AccessControl/4.7.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Security.Principal.Windows": "4.7.0" | |||
| } | |||
| }, | |||
| "System.Security.Cryptography.Algorithms/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Collections": "4.3.0", | |||
| "System.IO": "4.3.0", | |||
| "System.Resources.ResourceManager": "4.3.0", | |||
| @@ -546,7 +653,7 @@ | |||
| }, | |||
| "System.Security.Cryptography.Cng/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.IO": "4.3.0", | |||
| "System.Resources.ResourceManager": "4.3.0", | |||
| "System.Runtime": "4.3.0", | |||
| @@ -561,7 +668,7 @@ | |||
| }, | |||
| "System.Security.Cryptography.Csp/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.IO": "4.3.0", | |||
| "System.Reflection": "4.3.0", | |||
| "System.Resources.ResourceManager": "4.3.0", | |||
| @@ -578,7 +685,7 @@ | |||
| }, | |||
| "System.Security.Cryptography.Encoding/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Collections": "4.3.0", | |||
| "System.Collections.Concurrent": "4.3.0", | |||
| "System.Linq": "4.3.0", | |||
| @@ -622,7 +729,7 @@ | |||
| }, | |||
| "System.Security.Cryptography.X509Certificates/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "System.Collections": "4.3.0", | |||
| "System.Diagnostics.Debug": "4.3.0", | |||
| "System.Globalization": "4.3.0", | |||
| @@ -649,16 +756,17 @@ | |||
| "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Security.Principal.Windows/4.7.0": {}, | |||
| "System.Text.Encoding/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| }, | |||
| "System.Text.Encoding.Extensions/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0", | |||
| "System.Text.Encoding": "4.3.0" | |||
| @@ -677,7 +785,7 @@ | |||
| }, | |||
| "System.Threading.Tasks/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| @@ -691,7 +799,7 @@ | |||
| }, | |||
| "System.Threading.Timer/4.3.0": { | |||
| "dependencies": { | |||
| "Microsoft.NETCore.Platforms": "1.1.0", | |||
| "Microsoft.NETCore.Platforms": "3.1.0", | |||
| "Microsoft.NETCore.Targets": "1.1.0", | |||
| "System.Runtime": "4.3.0" | |||
| } | |||
| @@ -753,12 +861,33 @@ | |||
| "path": "microsoft.aspnet.webapi.client/5.2.9", | |||
| "hashPath": "microsoft.aspnet.webapi.client.5.2.9.nupkg.sha512" | |||
| }, | |||
| "Microsoft.NETCore.Platforms/1.1.0": { | |||
| "Microsoft.Exchange.WebServices/2.2.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-NlkaTD0uWtg9VbiWq0VDWMBPzHFknH3tmstrxt0acrT09LBGqATTjRpsGOODz6tUdX7/dehBinxsf75U5Uw/+A==", | |||
| "path": "microsoft.exchange.webservices/2.2.0", | |||
| "hashPath": "microsoft.exchange.webservices.2.2.0.nupkg.sha512" | |||
| }, | |||
| "Microsoft.Identity.Client/4.49.1": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-vDU3cdXIom4+pxJk8sDJcHYTHPhb6DSVF9zjFY61SoQVs1OxbHZY9+mBnq1gGkG7N/o04WTt42IdV/0gf1+5DA==", | |||
| "path": "microsoft.identity.client/4.49.1", | |||
| "hashPath": "microsoft.identity.client.4.49.1.nupkg.sha512" | |||
| }, | |||
| "Microsoft.IdentityModel.Abstractions/6.22.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", | |||
| "path": "microsoft.netcore.platforms/1.1.0", | |||
| "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" | |||
| "sha512": "sha512-iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ==", | |||
| "path": "microsoft.identitymodel.abstractions/6.22.0", | |||
| "hashPath": "microsoft.identitymodel.abstractions.6.22.0.nupkg.sha512" | |||
| }, | |||
| "Microsoft.NETCore.Platforms/3.1.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==", | |||
| "path": "microsoft.netcore.platforms/3.1.0", | |||
| "hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512" | |||
| }, | |||
| "Microsoft.NETCore.Targets/1.1.0": { | |||
| "type": "package", | |||
| @@ -774,6 +903,13 @@ | |||
| "path": "microsoft.win32.primitives/4.3.0", | |||
| "hashPath": "microsoft.win32.primitives.4.3.0.nupkg.sha512" | |||
| }, | |||
| "Microsoft.Win32.Registry/4.7.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-KSrRMb5vNi0CWSGG1++id2ZOs/1QhRqROt+qgbEAdQuGjGrFcl4AOl4/exGPUYz2wUnU42nvJqon1T3U0kPXLA==", | |||
| "path": "microsoft.win32.registry/4.7.0", | |||
| "hashPath": "microsoft.win32.registry.4.7.0.nupkg.sha512" | |||
| }, | |||
| "NETStandard.Library/1.6.1": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| @@ -830,6 +966,13 @@ | |||
| "path": "runtime.native.system/4.3.0", | |||
| "hashPath": "runtime.native.system.4.3.0.nupkg.sha512" | |||
| }, | |||
| "runtime.native.System.Data.SqlClient.sni/4.7.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-9kyFSIdN3T0qjDQ2R0HRXYIhS3l5psBzQi6qqhdLz+SzFyEy4sVxNOke+yyYv8Cu8rPER12c3RDjLT8wF3WBYQ==", | |||
| "path": "runtime.native.system.data.sqlclient.sni/4.7.0", | |||
| "hashPath": "runtime.native.system.data.sqlclient.sni.4.7.0.nupkg.sha512" | |||
| }, | |||
| "runtime.native.System.IO.Compression/4.3.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| @@ -914,6 +1057,27 @@ | |||
| "path": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0", | |||
| "hashPath": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" | |||
| }, | |||
| "runtime.win-arm64.runtime.native.System.Data.SqlClient.sni/4.4.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-LbrynESTp3bm5O/+jGL8v0Qg5SJlTV08lpIpFesXjF6uGNMWqFnUQbYBJwZTeua6E/Y7FIM1C54Ey1btLWupdg==", | |||
| "path": "runtime.win-arm64.runtime.native.system.data.sqlclient.sni/4.4.0", | |||
| "hashPath": "runtime.win-arm64.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512" | |||
| }, | |||
| "runtime.win-x64.runtime.native.System.Data.SqlClient.sni/4.4.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-38ugOfkYJqJoX9g6EYRlZB5U2ZJH51UP8ptxZgdpS07FgOEToV+lS11ouNK2PM12Pr6X/PpT5jK82G3DwH/SxQ==", | |||
| "path": "runtime.win-x64.runtime.native.system.data.sqlclient.sni/4.4.0", | |||
| "hashPath": "runtime.win-x64.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512" | |||
| }, | |||
| "runtime.win-x86.runtime.native.System.Data.SqlClient.sni/4.4.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-YhEdSQUsTx+C8m8Bw7ar5/VesXvCFMItyZF7G1AUY+OM0VPZUOeAVpJ4Wl6fydBGUYZxojTDR3I6Bj/+BPkJNA==", | |||
| "path": "runtime.win-x86.runtime.native.system.data.sqlclient.sni/4.4.0", | |||
| "hashPath": "runtime.win-x86.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512" | |||
| }, | |||
| "System.AppContext/4.3.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| @@ -949,6 +1113,13 @@ | |||
| "path": "system.console/4.3.0", | |||
| "hashPath": "system.console.4.3.0.nupkg.sha512" | |||
| }, | |||
| "System.Data.SqlClient/4.8.5": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-fRqxut4lrndPHrXD+ht1XRmCL3obuKldm4XjCRYS9p5f7FSR7shBxAwTkDrpFMsHC9BhNgjjmUtiIjvehn5zkg==", | |||
| "path": "system.data.sqlclient/4.8.5", | |||
| "hashPath": "system.data.sqlclient.4.8.5.nupkg.sha512" | |||
| }, | |||
| "System.Diagnostics.Debug/4.3.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| @@ -1173,6 +1344,13 @@ | |||
| "path": "system.runtime.numerics/4.3.0", | |||
| "hashPath": "system.runtime.numerics.4.3.0.nupkg.sha512" | |||
| }, | |||
| "System.Security.AccessControl/4.7.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==", | |||
| "path": "system.security.accesscontrol/4.7.0", | |||
| "hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512" | |||
| }, | |||
| "System.Security.Cryptography.Algorithms/4.3.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| @@ -1222,6 +1400,13 @@ | |||
| "path": "system.security.cryptography.x509certificates/4.3.0", | |||
| "hashPath": "system.security.cryptography.x509certificates.4.3.0.nupkg.sha512" | |||
| }, | |||
| "System.Security.Principal.Windows/4.7.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||
| "sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==", | |||
| "path": "system.security.principal.windows/4.7.0", | |||
| "hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512" | |||
| }, | |||
| "System.Text.Encoding/4.3.0": { | |||
| "type": "package", | |||
| "serviceable": true, | |||