| Autor | SHA1 | Zpráva | Datum |
|---|---|---|---|
|
|
9cc93f997b | Hard File Directories | před 3 roky |
|
|
18314c4b14 | Changing HDD | před 3 roky |
|
|
7a877c683f | Latest Releases | před 3 roky |
|
|
1b7f5527ac | Build for internal use | před 3 roky |
|
|
e630527801 | Fixed Base URL | před 3 roky |
|
|
d814e16351 | API Integration Builds | před 3 roky |
|
|
424abdb108 | Configured for Internal Use | před 3 roky |
|
|
2458493002 | Successful API Integration | před 3 roky |
| @@ -4,6 +4,7 @@ using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using System.Data.SqlClient; | |||
| using System.Data; | |||
| using jdis_import.RESTObjects; | |||
| namespace jdis_import | |||
| { | |||
| @@ -50,22 +51,29 @@ namespace jdis_import | |||
| 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); | |||
| //int? id = 0; | |||
| Dictionary<string, string> search = new Dictionary<string, string>(); | |||
| search.Add("search", serialnumber); | |||
| RESTService svc = new RESTService(); | |||
| List<Equipment> machines = svc.RestGet<Equipment>("Equipments.svc", search); | |||
| if (machines.Count > 0) return machines.LastOrDefault().ID; | |||
| else return 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() | |||
| @@ -0,0 +1,60 @@ | |||
| Date 27JAN2023 08:40:05 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316656 Seg. 01 Opn Dt 20JAN2023 | |||
| Auth by Phone 905-265-7400 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S NPL CANADA INC. Cust No. 95300952 S NPL CANADA INC. | |||
| O 1 ROYAL GATE BLVD Pur-Ord. REQ H REMIT PAYMENTS TO: | |||
| L SUITE E 2ND FLOOR P-% 0.0 L-% 0.0 I BRANDT 1655 BRITANIA RD, | |||
| D VAUGHAN, ON L4L 8Z7 P MISSISSAUGA, ON L4W 1 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 310SL 1T0310SLTNF417281 20308 .0 F | |||
| 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 | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR PM | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: MISPM2 T | |||
| PROMISE DATE: 30JAN2023 T | |||
| SPECIAL INSTRUCTIONS: FINCH AT MILADY TORONTO AT AIRPORT T | |||
| BLACK CAR T | |||
| CONTACT: JODY LANGDON 905-693-5449 T | |||
| EMAIL: MAHMAD@NPLCANADA.CA T | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 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,60 @@ | |||
| Date 27JAN2023 11:23:49 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316656 Seg. 01 Opn Dt 20JAN2023 | |||
| Auth by Phone 905-265-7400 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S NPL CANADA INC. Cust No. 95300952 S NPL CANADA INC. | |||
| O 1 ROYAL GATE BLVD Pur-Ord. REQ H REMIT PAYMENTS TO: | |||
| L SUITE E 2ND FLOOR P-% 0.0 L-% 0.0 I BRANDT 1655 BRITANIA RD, | |||
| D VAUGHAN, ON L4L 8Z7 P MISSISSAUGA, ON L4W 1 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 310SL 1T0310SLTNF417281 20308 .0 F | |||
| 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 | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR PM | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: MISPM2 T | |||
| PROMISE DATE: 30JAN2023 T | |||
| SPECIAL INSTRUCTIONS: FINCH @MILADY TORONTO AIRPORT BLK CAR T | |||
| CONTACT: JODY LANGDON 905-693-5449 T | |||
| EMAIL: MAHMAD@NPLCANADA.CA T | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 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,60 @@ | |||
| Date 30JAN2023 08:20:57 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316705 Seg. 01 Opn Dt 24JAN2023 | |||
| Auth by Phone 416-477-2803 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S SPK RENTALS LTD. Cust No. 95301925 S SPK RENTALS LTD. | |||
| O 5878 HIGHWAY 9 Pur-Ord. REQ H P.O. BOX 135 | |||
| L P-% 0.0 L-% 0.0 I | |||
| D SCHOMBERG, ON L0G 1T0 P SCHOMBERG, ON L0G 1T0 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 135G 1FF135GXJJF500961 135G FT4 E .0 F | |||
| 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 PM | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: MISPM2 T | |||
| PROMISE DATE: 31JAN2023 T | |||
| SPECIAL INSTRUCTIONS: JANE AND TROUTBROOKE T | |||
| CONTACT: NINO 416-771-3236 T | |||
| EMAIL: NINO@SPKRENTALS.CA T | |||
| .50 01-24 R/T 53092 REPAIR 225.00 112.50 | |||
| SEG # 01 TOTAL = .00 P .50 LH 112.50 L .00 M 112.50 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Total Labor 112.50 * | |||
| * Non-Taxable 112.50 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 14.63 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 127.13 * | |||
| **************************************** | |||
| @@ -0,0 +1,61 @@ | |||
| Date 24JAN2023 13:54:05 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3395086 Seg. 01 Opn Dt 24JAN2023 | |||
| Auth by ADRIAN GREENE Phone 204-663-0064 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S BIRD'S HILL GRAVEL & STON Cust No. 302312 S | |||
| O 1 TERRACON PL Pur-Ord. REQUIRED H NO PARTS ON ACCOUNT!! | |||
| L P-% 0.0 L-% 0.0 I USE , C.P.B. equipment | |||
| D WINNIPEG, MB R2J 4B3 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 844L 1DW844LXJNL714877 L71 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0302 Lbr Tx-0302 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR SERVICE | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: WINPM1 T | |||
| PROMISE DATE: 26JAN2023 T | |||
| SPECIAL INSTRUCTIONS: TBD T | |||
| CONTACT: ADRIAN GREENE 604-777-2233 T | |||
| EMAIL: AGREENE@GLACIALAGG.CA T | |||
| 1 1 RE572785 OIL FILTER XY 145.63 .00 | |||
| 1 1 RE532952 FILTER ELEMXY 183.43 .00 | |||
| 1 1 DZ112918 FILTER ELEMXY 226.86 .00 | |||
| 1 1 AM39653 OIL FILTER XY 19.39 .00 | |||
| 6 6 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 | |||
| INITIAL 500HR + MISC ITEMS NOT COVERED BY PM INTERVAL | |||
| 2 2 AT489922 FILTER ELEMXY 206.08 .00 | |||
| 1 1 AT311066 AIR FILTER XY 279.52 .00 | |||
| 1 1 AT311067 AIR FILTER XY 139.13 .00 | |||
| 1 1 AT191102 AIR FILTER XY 30.89 .00 | |||
| 1 1 AT307501 AIR FILTER XY 25.41 .00 | |||
| 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 * | |||
| * * | |||
| * Backordered Parts 1,775.26 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,109 @@ | |||
| Date 24JAN2023 14:58:16 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3381594 Seg. 01 Opn Dt 24JAN2023 | |||
| Auth by CHRIS BUNES Phone 403-255-2600 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S BURNCO ROCK PRODUCTS LTD. Cust No. 40001045 S | |||
| O 5055 11 STREET NE Pur-Ord. REQUIRED H EMAIL ALL INVOICES TO: | |||
| L P-% 0.0 L-% 0.0 I payableinvoices@burnco.co | |||
| D CALGARY, AB T2E 8N4 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 944K 1DW944KXHKF695786 L394 .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 | |||
| ------------------------------------------------------------------------------- | |||
| 600 HR SERVICE | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: CGYPM1 T | |||
| PROMISE DATE: 04FEB2023 T | |||
| SPECIAL INSTRUCTIONS: BLV PIT T | |||
| CONTACT: CHRIS BUNES 403-990-8659 T | |||
| EMAIL: CHRIS.BUNES@BURNCO.COM T | |||
| 1 1 RE572785 OIL FILTER XY 145.63 .00 | |||
| 1 1 RE539465 FILTER ELEMXY 180.50 .00 | |||
| 1 1 DZ112918 FILTER ELEMXY 226.86 .00 | |||
| 1 1 T225008 BREATHER XY 46.38 .00 | |||
| 1 1 AT386551 FILTER ELEMXY 297.18 .00 | |||
| 1 1 HXE11091 FILTER ELEMXY 313.32 .00 | |||
| 1 1 AT191102 AIR FILTER XY 30.89 .00 | |||
| 1 1 AT307501 AIR FILTER XY 25.41 .00 | |||
| 3 3 AT346594 FLUID KIT XY 52.14 .00 | |||
| 4 4 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 24JAN2023 14:58:16 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 48 Work Order 3381594 Seg. 03 Opn Dt 24JAN2023 | |||
| Auth by CHRIS BUNES Phone 403-255-2600 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S BURNCO ROCK PRODUCTS LTD. Cust No. 40001045 S | |||
| O 5055 11 STREET NE Pur-Ord. REQUIRED H EMAIL ALL INVOICES TO: | |||
| L P-% 0.0 L-% 0.0 I payableinvoices@burnco.co | |||
| D CALGARY, AB T2E 8N4 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 944K 1DW944KXHKF695786 L394 .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 | |||
| ------------------------------------------------------------------------------- | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Backordered Parts 1,631.15 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 26JAN2023 07:45:51 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 58 Work Order 4807773 Seg. 01 Opn Dt 25JAN2023 | |||
| Auth by Phone 905-335-5250 Inv Cls Dt | |||
| INTERNAL Slprn | |||
| S NELSON AGGREGATE CO. Cust No. 95800456 S NELSON AGGREGATE CO. | |||
| O 2433 2 SIDE ROAD Pur-Ord. H 2433 2 SIDE ROAD | |||
| L P-% 0.0 L-% 0.0 I | |||
| D BURLINGTON, ON L7P 0G8 P BURLINGTON, ON L7P 0G8 | |||
| G/L # 988-88-8888 Stock# 00000000 Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 844L 1DW844LXHLF704949 O-402 5417.0 F | |||
| Prt Cls-PC Lbr Cls-IIN Price Cd-L Prt Tx-0101 Lbr Tx-0101 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| FIELD TRAVEL- ONIEDA PIT DRY LAKE RD | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: STCPM1 T | |||
| PROMISE DATE: 26JAN2023 T | |||
| SPECIAL INSTRUCTIONS: DRY LAKE RD T | |||
| CONTACT: NICK 905-335-5250 T | |||
| EMAIL: TBD 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 | |||
| 500 HOUR PM SERVICE | |||
| 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 | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,115 @@ | |||
| Date 26JAN2023 11:02:35 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 57 Work Order 4707176 Seg. 01 Opn Dt 17JAN2023 | |||
| Auth by Phone 514-494-9898 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S LES SERVICES ENVIRONNEMEN Cust No. 96100812 S LES SERVICES ENVIRONNEMEN | |||
| O 2187 MONTEE MASSON Pur-Ord. H 2187 MTEE. MASSON | |||
| L P-% 0.0 L-% 0.0 I | |||
| D LAVAL, QC H7E 4P2 P LAVAL, QC H7E 4P2 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 644K 1DW644KZTHD680377 L-6441 8537.0 H S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0606 Lbr Tx-0606 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| TRAVEL TO SITE--LAMBTON | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: LDNPM1 T | |||
| PROMISE DATE: 20JAN2023 T | |||
| SPECIAL INSTRUCTIONS: LAMBTON T | |||
| CONTACT: BRYAN T | |||
| EMAIL: HDREISE@BRANDT.CA T | |||
| 1.25 01-20 R/T 57020 TRAVEL 240.00 300.00 | |||
| 1.75 01-20 O/T 57020 TRAVEL 290.00 507.50 | |||
| 1.75- 01-20 O/T 57020 TRAVEL 290.00 507.50- | |||
| 1.00 01-20 O/T 57020 TRAVEL 290.00 290.00 | |||
| SEG # 01 TOTAL = .00 P 2.25 LH 590.00 L .00 M 590.00 T | |||
| 1000 HR SERVICE | |||
| 2 2 AH128449 HYDR 141.58 283.16 | |||
| 1 1 RE504836 OIL 38.76 38.76 | |||
| 1 1 R502513 SEAL 11.86 11.86 | |||
| 1 1 RE541922 FILT 64.21 64.21 | |||
| 1 1 RE522878 FILT 64.26 64.26 | |||
| 1 1 AT365870 FILT 82.09 82.09 | |||
| 1 1 AT223493 FUEL 21.83 21.83 | |||
| 1 1 T225008 BREA 46.38 46.38 | |||
| 1 1 AT300487 FILT 126.79 126.79 | |||
| 1 1 AT314583 FILT 79.50 79.50 | |||
| 1 1 M89679 EJEC 35.08 35.08 | |||
| 1 1 AT191102 AIR 30.89 30.89 | |||
| 1 1 AT307501 AIR 25.41 25.41 | |||
| 1 1 TY27788 SCAN 150.82 150.82 | |||
| 5 5 AT346594 FLUI 52.14 260.70 | |||
| 5 5 AT315231 TEST 8.27 41.35 | |||
| 2 2 TY26679 PLUS 226.82 453.64 | |||
| 20 20 WDF WAST .10 2.00 | |||
| 1 1 TY26992 HY-G 10.38 10.38 | |||
| 5 5 GREASE 1LB 11.44 57.20 | |||
| .50 01-18 R/T 57024 REPAIR 205.00 102.50 | |||
| 2.25 01-20 R/T 57020 FIELD 240.00 540.00 | |||
| Date 26JAN2023 11:02:35 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 57 Work Order 4707176 Seg. 02 Opn Dt 17JAN2023 | |||
| Auth by Phone 514-494-9898 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S LES SERVICES ENVIRONNEMEN Cust No. 96100812 S LES SERVICES ENVIRONNEMEN | |||
| O 2187 MONTEE MASSON Pur-Ord. H 2187 MTEE. MASSON | |||
| L P-% 0.0 L-% 0.0 I | |||
| D LAVAL, QC H7E 4P2 P LAVAL, QC H7E 4P2 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 644K 1DW644KZTHD680377 L-6441 8537.0 H S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0606 Lbr Tx-0606 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 2.25- 01-20 R/T 57020 FIELD 240.00 540.00- | |||
| 1.50 01-20 R/T 57020 FIELD 240.00 360.00 | |||
| SEG # 02 TOTAL = 1,886.31 P 2.00 LH 462.50 L .00 M 2,348.81 T | |||
| INSTALL WIPER MOTOR - PART SUPPLIED BY CUSTOMER | |||
| 1.25 01-20 R/T 57020 FIELD 240.00 300.00 | |||
| .25 01-20 O/T 57020 FIELD 290.00 72.50 | |||
| .75 01-20 R/T 57020 FIELD 240.00 180.00 | |||
| 1.25- 01-20 R/T 57020 FIELD 240.00 300.00- | |||
| SEG # 03 TOTAL = .00 P 1.00 LH 252.50 L .00 M 252.50 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 1,886.31 * | |||
| * Total Labor 1,305.00 * | |||
| * Non-Taxable 1,305.00 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 414.88 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 3,606.19 * | |||
| **************************************** | |||
| @@ -0,0 +1,111 @@ | |||
| Date 27JAN2023 10:33:05 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3371567 Seg. 01 Opn Dt 27JAN2023 | |||
| Auth by MATT MACDOUGALL Phone 604-520-5909 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S MATCON EXCAVATION AND SHO Cust No. 14003746 S | |||
| O 2208 HARTLEY AVE Pur-Ord. H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D COQUITLAM, BC V2K 6X3 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 524L 1DW524LZVKF700632 019001 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 2000 HR SERVICE | |||
| PM INTERVAL: 2000 HR T | |||
| EMPID: SRYPM1 T | |||
| PROMISE DATE: 28JAN2023 T | |||
| SPECIAL INSTRUCTIONS: AT THE BRANDT SHOP T | |||
| CONTACT: MATT MACDOUGALL T | |||
| EMAIL: MATTM@MATCON.CA T | |||
| 1 1 RE539279 OIL FILTER XY 49.50 .00 | |||
| 1 1 R502513 SEAL XY 11.86 .00 | |||
| 1 1 DZ115391 FILTER ELEMXY 75.38 .00 | |||
| 1 1 DZ115392 FILTER ELEMXY 83.19 .00 | |||
| 2 2 AT367635 FILTER ELEMXY 200.71 .00 | |||
| 1 1 M89679 EJECTOR XY 35.08 .00 | |||
| 5 5 AT346594 FLUID KIT XY 52.14 .00 | |||
| 1 1 AM39653 OIL FILTER 19.39 19.39 | |||
| 1 1 AT468647 OIL FILTER 104.65 104.65 | |||
| SEG # 01 TOTAL = 124.04 P .00 LH .00 L .00 M 124.04 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 | |||
| 1 1 AT178516 FILTER ELEMXY 112.96 .00 | |||
| 1 1 AT178517 FILTER ELEMXY 91.61 .00 | |||
| 1 1 AT191102 AIR FILTER XY 30.89 .00 | |||
| 1 1 AT307501 AIR FILTER XY 25.41 .00 | |||
| 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 27JAN2023 10:33:05 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 48 Work Order 3371567 Seg. 03 Opn Dt 27JAN2023 | |||
| Auth by MATT MACDOUGALL Phone 604-520-5909 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S MATCON EXCAVATION AND SHO Cust No. 14003746 S | |||
| O 2208 HARTLEY AVE Pur-Ord. H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D COQUITLAM, BC V2K 6X3 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 524L 1DW524LZVKF700632 019001 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 124.04 * | |||
| * Backordered Parts 1,178.00 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * GST/HST 6.20 * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > 130.24 * | |||
| **************************************** | |||
| @@ -0,0 +1,30 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using System.IO; | |||
| namespace jdis_import | |||
| { | |||
| public class JDISLog | |||
| { | |||
| public static void WriteToLog(string logFile, string msg) | |||
| { | |||
| using (StreamWriter sw = File.AppendText(logFile)) | |||
| { | |||
| sw.WriteLine(msg); | |||
| } | |||
| } | |||
| public static void Begin(string logFile) | |||
| { | |||
| using (StreamWriter sw = File.AppendText(logFile)) | |||
| { | |||
| sw.WriteLine(); | |||
| sw.WriteLine("###########################################################################"); | |||
| sw.WriteLine(string.Format("Import Began at {0} {1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToLongTimeString())); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,78 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using System.IO; | |||
| using Newtonsoft.Json; | |||
| namespace jdis_import | |||
| { | |||
| public class JSONMethods | |||
| { | |||
| public static JSONSetting GetSettings() | |||
| { | |||
| JSONSetting settings = new JSONSetting(); | |||
| string abPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Settings.json"); | |||
| Console.WriteLine(abPath); | |||
| string text = File.ReadAllText(abPath); | |||
| settings = JsonConvert.DeserializeObject<JSONSetting>(text); | |||
| return settings; | |||
| } | |||
| } | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class JSONSetting | |||
| { | |||
| private bool _local = true; | |||
| [JsonProperty(PropertyName = "Remote")] | |||
| public bool Remote { get; set; } | |||
| [JsonProperty(PropertyName = "LogFile")] | |||
| public string LogFile { get; set; } | |||
| [JsonProperty(PropertyName = "OSs")] | |||
| public List<OS> OSs { get; set; } | |||
| [JsonProperty(PropertyName = "Email")] | |||
| public Email Email { get; set; } | |||
| public bool Local { get { return _local; } set { _local = value; } } | |||
| [JsonProperty(PropertyName = "Prelub")] | |||
| public Prelub Prelub { get; set; } | |||
| } | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class OS | |||
| { | |||
| [JsonProperty(PropertyName = "Name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty(PropertyName = "Fail")] | |||
| public string Fail { get; set; } | |||
| [JsonProperty(PropertyName = "Success")] | |||
| public string Success { get; set; } | |||
| [JsonProperty(PropertyName = "Log")] | |||
| public string Log { get; set; } | |||
| [JsonProperty(PropertyName = "Temp")] | |||
| public string Temp { get; set; } | |||
| } | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class Email | |||
| { | |||
| [JsonProperty(PropertyName = "Username")] | |||
| public string Username { get; set; } | |||
| [JsonProperty(PropertyName = "Password")] | |||
| public string Password { get; set; } | |||
| [JsonProperty(PropertyName = "Mailbox")] | |||
| public int Mailbox { get; set; } | |||
| [JsonProperty(PropertyName = "Url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty(PropertyName = "Filter")] | |||
| public string Filter { get; set; } | |||
| } | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class Prelub | |||
| { | |||
| [JsonProperty(PropertyName = "Check")] | |||
| public string Check { get; set; } | |||
| [JsonProperty(PropertyName = "LocalService")] | |||
| public string LocalService { get; set; } | |||
| [JsonProperty(PropertyName = "RemoteService")] | |||
| public string RemoteService { get; set; } | |||
| public string ActiveService { get; set; } | |||
| } | |||
| } | |||
| @@ -9,6 +9,8 @@ using System.Data; | |||
| using System.Data.SqlClient; | |||
| using System.Reflection; | |||
| using jdis_import.RESTObjects; | |||
| using System.Linq; | |||
| using System.Net; | |||
| /* | |||
| Secret Value up-8Q~y46~JyQZjJlsAJ-zpXpglpmuPIJ1Gx3a2O | |||
| @@ -22,6 +24,15 @@ namespace jdis_import | |||
| { | |||
| class Program | |||
| { | |||
| private static JSONSetting _settings; | |||
| private static string _os, _logDir, _logFile, _successDir, _failureDir, _downloadDir; | |||
| private static bool _runAPI = true; | |||
| private static RESTService _rservice; | |||
| private static List<User> _users; | |||
| private static Priority _priority; | |||
| private static Reason _reason; | |||
| private static Status _status; | |||
| private static List<Equipment> _machines; | |||
| private static List<Customer> _customers; | |||
| private static List<Make> _makes; | |||
| private static List<Product> _products; | |||
| @@ -34,28 +45,259 @@ namespace jdis_import | |||
| private static string _workOrderNumber = string.Empty; | |||
| private static List<string> _sqlMessages = new List<string>(); | |||
| private static bool _newMachine = false; | |||
| private static bool _newMake = false; | |||
| private static bool _newModel = false; | |||
| private static bool _newCustomer = false; | |||
| private static bool _quoted = false; | |||
| public static string ExeDir { get { return _exeDir; } } | |||
| 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; | |||
| private static Customer CreateNewCustomer(CustomerImport c, ToDo todo) | |||
| { | |||
| Customer cust = new Customer(); | |||
| cust.Name = c.Name; | |||
| cust.Address = c.Addr1; | |||
| cust.Address2 = c.Addr2; | |||
| cust.City = c.City; | |||
| cust.State = c.State; | |||
| cust.CreateDate = DateTime.Now; | |||
| cust.CreateUserID = -1; | |||
| cust.UpdateDate = DateTime.Now; | |||
| cust.UpdateUserID = -1; | |||
| cust.IsActive = true; | |||
| cust.Number = c.Number; | |||
| cust.ZipCode = c.Zip; | |||
| string json = Serialize.ToJson<Customer>(cust); | |||
| cust = _rservice.PostRest<Customer>(json, "customers.svc"); | |||
| return cust; | |||
| } | |||
| private static Model CreateNewModel(Product defaultP, EquipmentImport eq, ToDo todo) | |||
| { | |||
| Model mdl = new Model(); | |||
| //Find the Make and assign the default Product | |||
| mdl.Name = eq.Model.Trim(); | |||
| mdl.IsActive = true; | |||
| mdl.CreateDate = DateTime.Now; | |||
| mdl.CreateUserID = -1; | |||
| mdl.UpdateDate = DateTime.Now; ; | |||
| mdl.UpdateUserID = -1; | |||
| mdl.Product = defaultP; | |||
| Make mk = (from x in _makes where x.Name.Trim() == eq.Make.Trim() select x).FirstOrDefault(); | |||
| if (mk == null) | |||
| { | |||
| //Create new Make | |||
| mk.Name = eq.Make.Trim(); | |||
| mk.CreateDate = DateTime.Now; | |||
| mk.CreateUserID = -1; | |||
| mk.UpdateDate = DateTime.Now; | |||
| mk.UpdateUserID = -1; | |||
| mk.IsActive = true; | |||
| mk.Description = eq.Make.Trim(); | |||
| string mkJson = Serialize.ToJson<Make>(mk); | |||
| mk = _rservice.PostRest<Make>(mkJson, "makes.svc"); | |||
| } | |||
| mdl.Make = mk; | |||
| string json = Serialize.ToJson<Model>(mdl); | |||
| mdl = _rservice.PostRest<Model>(json, "models.svc"); | |||
| return mdl; | |||
| } | |||
| private static Equipment CreateNewMachine(EquipmentImport eq, Model mdl, Customer cust, ToDo todo) | |||
| { | |||
| Equipment newMachine = new Equipment(); | |||
| newMachine.Model = mdl; | |||
| newMachine.Make = mdl.Make; | |||
| newMachine.Product = mdl.Product; | |||
| newMachine.BarcodeID = null; | |||
| newMachine.CreateDate = DateTime.Now; | |||
| newMachine.UpdateDate = DateTime.Now; | |||
| newMachine.UpateUserID = -1; | |||
| newMachine.CreateUserID = -1; | |||
| newMachine.Description = eq.SerialNumber; | |||
| newMachine.IsActive = true; | |||
| newMachine.LastServiceDate = null; | |||
| newMachine.Location = null; | |||
| newMachine.ManufacturerYear = "2000"; | |||
| newMachine.MeterReading = eq.MeterReading; | |||
| newMachine.Number = eq.EquipmentNumber; | |||
| newMachine.Odometer = null; | |||
| newMachine.SerialNumber = eq.SerialNumber; | |||
| newMachine.Customer = cust; | |||
| string eqJson = Serialize.ToJson<Equipment>(newMachine); | |||
| newMachine = _rservice.PostRest<Equipment>(eqJson, "Equipments.svc"); | |||
| return newMachine; | |||
| } | |||
| public static void APIPush(CustomerImport c, WorkOrderImport wo, List<PartImport> parts, EquipmentImport eq, ToDo todo) | |||
| { | |||
| Equipment machine = new Equipment(); | |||
| Model mdl = _models.Find(x => x.Name.Trim() == eq.Model.Trim()); | |||
| Product defaultP = _products.Find(x => x.ID == 14); | |||
| //Customer cust = new Customer(); | |||
| Customer cust = IsNewCustomer(c.Name); | |||
| if (cust == null) | |||
| cust = CreateNewCustomer(c, todo); | |||
| List<Equipment> equipment = IsNewMachine(eq.SerialNumber); | |||
| _newMachine = equipment.Count == 0; | |||
| if (_newMachine) | |||
| { | |||
| bool isNewModel = mdl == null; | |||
| if (isNewModel) | |||
| { | |||
| string sModel = eq.Model.Trim().Substring(0, eq.Model.Length - 1); | |||
| mdl = (from x in _models where x.Name.Contains(sModel) orderby x.ID select x).LastOrDefault(); | |||
| if (mdl == null) | |||
| mdl = CreateNewModel(defaultP, eq, todo); | |||
| else | |||
| machine = CreateNewMachine(eq, mdl, cust, todo); | |||
| } | |||
| else | |||
| { | |||
| machine = CreateNewMachine(eq, mdl, cust, todo); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| machine = equipment.FindAll(x => x.SerialNumber == eq.SerialNumber).LastOrDefault(); | |||
| machine.Customer = cust; | |||
| } | |||
| //Find the Template | |||
| Template template = _templates.Find(x => x.InspectionLevel.ID == Convert.ToInt32(wo.InspectionLevel) && x.InspectionType.ID == Convert.ToInt32(wo.InspectionType) && x.Name == eq.Model); | |||
| if (template == null) | |||
| { | |||
| //Search by model prefix and get the last one | |||
| string prefix = eq.Model.Trim(); | |||
| prefix = prefix.Substring(0, prefix.Length - 1); | |||
| template = (from x in _templates where x.InspectionLevel.ID == Convert.ToInt32(wo.InspectionLevel) && x.InspectionType.ID == Convert.ToInt32(wo.InspectionType) && x.Name.Contains(prefix) orderby x.ID select x).LastOrDefault(); | |||
| if (template == null || template.ID == 0) | |||
| { | |||
| todo.Success = false; | |||
| todo.Validation = todo.Validation + " No template for this model."; | |||
| } | |||
| } | |||
| User user = _users.Find(x => x.Number == wo.TechnicianUserID.Trim()); | |||
| WorkOrder workorder = new WorkOrder(); | |||
| workorder.Number = wo.Number; | |||
| workorder.Technician = user; | |||
| workorder.Reason = _reason; | |||
| workorder.Priority = _priority; | |||
| workorder.Status = _status; | |||
| workorder.CreateDate = DateTime.Now; | |||
| workorder.CreateUserID = -1; | |||
| workorder.Equipment = machine; | |||
| workorder.Customer = cust; | |||
| workorder.MeterReading = Convert.ToDecimal(eq.MeterReading); | |||
| workorder.ScheduledStartDate = wo.OpnDt; | |||
| workorder.ScheduledEndDate = wo.OpnDt.AddDays(1d); | |||
| workorder.UpdateDate = DateTime.Now; | |||
| workorder.UpdateUserID = -1; | |||
| string woJson = Serialize.ToJson<WorkOrder>(workorder); | |||
| //Console.WriteLine("WorkOrder Object"); | |||
| //Console.WriteLine(); | |||
| //Console.WriteLine(woJson); | |||
| JDISLog.WriteToLog(_logFile, string.Format("Creating Work Order: {0}", workorder.Number)); | |||
| workorder = _rservice.PostRest<WorkOrder>(woJson, "workorders.svc"); | |||
| if (template == null || template.ID == 0) | |||
| { | |||
| todo.Validation = todo.Validation + Environment.NewLine + string.Format("Work Order {0} was created but there is no template matching model # {1}", workorder.Number, mdl.Name); | |||
| todo.Success = false; | |||
| } | |||
| else | |||
| { | |||
| JDISLog.WriteToLog(_logFile, String.Format("Creating Inspections for Workorder {0}", workorder.Number)); | |||
| Dictionary<string, string> tps = new Dictionary<string, string>(); | |||
| tps.Add("create", string.Format("{0}/{1}/{2}", template.ID, workorder.ID, -1)); | |||
| Inspection i = _rservice.RestGet<Inspection>(true, "inspections.svc", tps); | |||
| tps["create"] = string.Format("{0}/{1}/{2}", 1691, workorder.ID, -1); | |||
| Inspection sta = _rservice.RestGet<Inspection>(true, "inspections.svc", tps); | |||
| if (i != null && i.ID != 0) | |||
| { | |||
| todo.Success = true; | |||
| } | |||
| } | |||
| } | |||
| private static Customer IsNewCustomer(string name) | |||
| { | |||
| List<Customer> list = _customers.FindAll(x => x.Name.Trim() == name.Trim()); | |||
| if (list.Count > 1) | |||
| return list.LastOrDefault(); | |||
| else if (list.Count == 1) | |||
| return list[0]; | |||
| else return null; | |||
| } | |||
| private static List<Equipment> IsNewMachine(string serial) | |||
| { | |||
| Dictionary<string, string> ps = new Dictionary<string, string>(); | |||
| ps.Add("search", serial); | |||
| _machines = _rservice.RestGet<Equipment>("equipments.svc", ps); | |||
| return _machines; | |||
| } | |||
| private static void ListsAndDefaults() | |||
| { | |||
| _rservice = new RESTService(); | |||
| _rservice.BaseUrl = _settings.Prelub.ActiveService; | |||
| _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"); | |||
| _users = _rservice.RestGet<User>("users.svc"); | |||
| _status = new Status(); | |||
| _status.ID = 1; | |||
| _status.Name = "Open"; | |||
| _priority = new Priority(); | |||
| _priority.ID = 3; | |||
| _priority.Name = "Medium"; | |||
| _reason = new Reason(); | |||
| _reason.ID = 9; | |||
| _reason.Name = "Cust. Request"; | |||
| _reason.IsActive = true; | |||
| _reason.CreateDate = new DateTime(2013, 10, 1, 9, 23, 7); | |||
| _reason.CreateUserID = -1; | |||
| _reason.UpdateDate = new DateTime(2013, 10, 1, 9, 23, 7); | |||
| _reason.UpdateUserID = -1; | |||
| } | |||
| static async System.Threading.Tasks.Task IsLocalNetwork() | |||
| { | |||
| var client = new System.Net.Http.HttpClient(); | |||
| try | |||
| { | |||
| var result = await client.GetAsync(_settings.Prelub.Check); | |||
| _settings.Prelub.ActiveService = _settings.Prelub.LocalService; | |||
| } | |||
| catch | |||
| { | |||
| _settings.Prelub.ActiveService = _settings.Prelub.RemoteService; | |||
| } | |||
| } | |||
| 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"); | |||
| Console.WriteLine("Web APIs have loaded."); | |||
| _exeDir = Environment.CurrentDirectory; | |||
| _settings = JSONMethods.GetSettings(); | |||
| await IsLocalNetwork(); | |||
| if (IsWindows()) _os = "Windows"; | |||
| else if (IsMacOS()) _os = "Mac"; | |||
| else if (IsLinux()) _os = "Linux"; | |||
| SetupDirectories(); | |||
| JDISLog.Begin(_logFile); | |||
| ListsAndDefaults(); | |||
| //Console.WriteLine("Web APIs have loaded."); | |||
| JDISLog.WriteToLog(_logFile, string.Format("Default data loaded..... {0} {1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToLongTimeString())); | |||
| _exeDir = Environment.CurrentDirectory; | |||
| 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"]) | |||
| @@ -64,7 +306,8 @@ namespace jdis_import | |||
| var ewsScopes = new string[] { "https://outlook.office365.com/.default" }; | |||
| try | |||
| { | |||
| Console.WriteLine("Connecting To Exchange."); | |||
| //Console.WriteLine("Connecting To Exchange."); | |||
| JDISLog.WriteToLog(_logFile, string.Format("Connectiong to Exchange Server....{0} {1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToLongTimeString())); | |||
| var authResult = await cca.AcquireTokenForClient(ewsScopes) | |||
| .ExecuteAsync(); | |||
| @@ -72,8 +315,7 @@ namespace jdis_import | |||
| 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"); | |||
| 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>(); | |||
| @@ -87,8 +329,17 @@ namespace jdis_import | |||
| view.PropertySet = new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject, ItemSchema.DateTimeReceived); | |||
| view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending); | |||
| view.Traversal = ItemTraversal.Shallow; | |||
| Console.WriteLine("Line 90: Finding emails."); | |||
| //Console.WriteLine("Line 90: Finding emails."); | |||
| FindItemsResults<Item> findResults = ewsClient.FindItems(fid, searchFilter, view); | |||
| List<EmailMessage> messages = new List<EmailMessage>(); | |||
| foreach (EmailMessage message in findResults.Items) | |||
| { | |||
| message.Load(); | |||
| if (!message.IsRead) | |||
| messages.Add(message); | |||
| } | |||
| JDISLog.WriteToLog(_logFile, string.Format("Found {0} emails", messages.Count)); | |||
| foreach (EmailMessage msg in findResults.Items) | |||
| { | |||
| msg.Load(); | |||
| @@ -103,12 +354,13 @@ namespace jdis_import | |||
| { | |||
| 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; | |||
| string fileAttachmentPath = Path.Combine(_exeDir, fAttachment.Name); | |||
| string fileAttachmentPath = Path.Combine(_downloadDir, fAttachment.Name); | |||
| File.WriteAllBytes(fileAttachmentPath, fAttachment.Content); | |||
| msg.IsRead = true; | |||
| msg.Update(ConflictResolutionMode.AlwaysOverwrite); | |||
| @@ -117,12 +369,11 @@ namespace jdis_import | |||
| } | |||
| } | |||
| } | |||
| Console.WriteLine("Beginning Import."); | |||
| //Console.WriteLine("Beginning Import."); | |||
| JDISLog.WriteToLog(_logFile, string.Format("Importing JDIS files....{0} {1}", DateTime.Now.ToShortDateString(), DateTime.Now.ToLongDateString())); | |||
| foreach (ToDo import in list) | |||
| { | |||
| //System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls; | |||
| //Start Importing | |||
| BeginImport(import); | |||
| GetInspectionTypes(); | |||
| ReadFile(import); | |||
| @@ -130,35 +381,38 @@ namespace jdis_import | |||
| foreach (ToDo sendMsg in list) | |||
| { | |||
| EmailMessage msgToSend = new EmailMessage(ewsClient); | |||
| JDISLog.WriteToLog(_logFile, string.Format("Sending Message to: {0}\r\nFor Work Order: {1}\r\nJDIS File: {2}", sendMsg.Sender, sendMsg.WorkOrderNumber, sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1).Trim())); | |||
| string body = "JDIS File: {0} Work Order:{1} {2}"; | |||
| if (sendMsg.Success) | |||
| { | |||
| body = string.Format(body, sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1).Trim(), sendMsg.WorkOrder, "Was Imported Successfully"); | |||
| body = string.Format(body, sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1).Trim(), sendMsg.WorkOrderNumber, "Was Imported Successfully"); | |||
| } | |||
| else | |||
| { | |||
| body = string.Format(body, sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1).Trim(), sendMsg.WorkOrder, string.Format("Had Errors while importing: {0}", sendMsg.Validation)); | |||
| msgToSend.Attachments.AddFileAttachment(Path.Combine(_exeDir, sendMsg.FileName)); | |||
| body = string.Format(body, sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1).Trim(), sendMsg.WorkOrderNumber, string.Format("Had Errors while importing: {0}", sendMsg.Validation)); | |||
| msgToSend.Attachments.AddFileAttachment(Path.Combine(_downloadDir, sendMsg.FileName)); | |||
| } | |||
| msgToSend.Subject = sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1); | |||
| string fileNameOnly = sendMsg.FileName.Substring(sendMsg.FileName.LastIndexOf("/") + 1); | |||
| msgToSend.Subject = fileNameOnly; | |||
| msgToSend.ToRecipients.Add(new EmailAddress(sendMsg.Sender)); | |||
| msgToSend.CcRecipients.Add(new EmailAddress("mcarman@rpmindustries.com")); | |||
| msgToSend.Body = body; | |||
| msgToSend.SendAndSaveCopy(); | |||
| string pathToFile = Path.Combine(_exeDir, sendMsg.FileName); | |||
| if (sendMsg.Success) File.Move(pathToFile, Path.Combine(_exeDir, "Success", sendMsg.FileName)); | |||
| else File.Move(sendMsg.FileName, Path.Combine(_exeDir, "Fail", sendMsg.FileName)); | |||
| string pathToFile = Path.Combine(_downloadDir, sendMsg.FileName); | |||
| if (sendMsg.Success) File.Move(pathToFile, Path.Combine(_successDir, fileNameOnly)); | |||
| else File.Move(sendMsg.FileName, Path.Combine(_failureDir, fileNameOnly)); | |||
| } | |||
| } | |||
| catch (MsalException ex) | |||
| { | |||
| Console.WriteLine($"Error acquiring access token: {ex}"); | |||
| //Console.WriteLine($"Error acquiring access token: {ex}"); | |||
| JDISLog.WriteToLog(_logFile, $"Error acquiring access token: {ex}"); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| Console.WriteLine($"Error: {ex}"); | |||
| //Console.WriteLine($"Error: {ex}"); | |||
| JDISLog.WriteToLog(_logFile, $"Error: {ex}"); | |||
| } | |||
| if (System.Diagnostics.Debugger.IsAttached) | |||
| @@ -177,37 +431,58 @@ namespace jdis_import | |||
| } | |||
| private static void SetupDirectories() | |||
| { | |||
| string path = Path.Combine(_exeDir, "Success"); | |||
| if (!Directory.Exists(path)) | |||
| Directory.CreateDirectory(path); | |||
| path = Path.Combine(_exeDir, "Fail"); | |||
| if (!Directory.Exists(path)) | |||
| Directory.CreateDirectory(path); | |||
| path = Path.Combine(_exeDir, "Log"); | |||
| if (!Directory.Exists(path)) | |||
| Directory.CreateDirectory(path); | |||
| OS os = new OS(); | |||
| switch (_os) | |||
| { | |||
| case "Windows": | |||
| os = _settings.OSs.Find(x => x.Name == "WINDOWS"); | |||
| _logDir = os.Log.Replace("/", "\\"); | |||
| _logFile = Path.Combine(os.Log.Replace("/", "\\"), "jdis.log"); | |||
| _successDir = os.Success.Replace("/", "\\"); | |||
| _failureDir = os.Fail.Replace("/", "\\"); | |||
| _downloadDir = os.Temp.Replace("/", "\\"); | |||
| break; | |||
| case "Mac": | |||
| os = _settings.OSs.Find(x => x.Name == "OSX"); | |||
| _logDir = os.Log; | |||
| _logFile = Path.Combine(os.Log, "jdis.log"); | |||
| _successDir = os.Success; | |||
| _failureDir = os.Fail; | |||
| _downloadDir = os.Temp; | |||
| break; | |||
| case "Linux": | |||
| os = _settings.OSs.Find(x => x.Name == "LINUX"); | |||
| _logDir = os.Log; | |||
| _logFile = Path.Combine(os.Log, "jdis.log"); | |||
| _successDir = os.Success; | |||
| _failureDir = os.Fail; | |||
| _downloadDir = os.Temp; | |||
| break; | |||
| default: | |||
| break; | |||
| } | |||
| if (!Directory.Exists(_logDir)) Directory.CreateDirectory(_logDir); | |||
| if (!Directory.Exists(_failureDir)) Directory.CreateDirectory(_failureDir); | |||
| if (!Directory.Exists(_successDir)) Directory.CreateDirectory(_successDir); | |||
| //string path = Path.Combine(_exeDir, "Success"); | |||
| //if (!Directory.Exists(path)) | |||
| // Directory.CreateDirectory(path); | |||
| //path = Path.Combine(_exeDir, "Fail"); | |||
| //if (!Directory.Exists(path)) | |||
| // Directory.CreateDirectory(path); | |||
| //path = Path.Combine(_exeDir, "Log"); | |||
| //if (!Directory.Exists(path)) | |||
| // Directory.CreateDirectory(path); | |||
| } | |||
| public static void GetInspectionTypes() | |||
| { | |||
| List<InspectionType> list = _rservice.RestGet<InspectionType>("inspectiontypes.svc"); | |||
| InspectionType = new Dictionary<string, int>(); | |||
| SqlConnection con = new SqlConnection("Data Source=192.168.0.7;Initial Catalog=Connexion_Brandt;User ID=mobilepmuser;Password=data4techs;Encrypt=No;TrustServerCertificate=true;Persist Security Info=True;"); | |||
| 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(); | |||
| foreach (InspectionType t in list) | |||
| { | |||
| InspectionType.Add(t.Name, t.ID); | |||
| } | |||
| } | |||
| private static string frmtString | |||
| @@ -477,15 +752,15 @@ namespace jdis_import | |||
| } | |||
| private static void ReadFile(ToDo todo) | |||
| { | |||
| string file = Path.Combine(_exeDir, todo.FileName);// todo.FileName; | |||
| string file = Path.Combine(_downloadDir, todo.FileName);// todo.FileName; | |||
| todo.FileName = file; | |||
| 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 307: " + file); | |||
| //Console.WriteLine("Line 306: " + file); | |||
| //Console.WriteLine("Line 307: " + file); | |||
| string filemove = string.Empty; | |||
| string filetxt = string.Empty; | |||
| string inspectionLevel = string.Empty; | |||
| @@ -522,7 +797,7 @@ namespace jdis_import | |||
| string strWONum = currentline.Substring(currentline.IndexOf("Work Order") + 10, 12); | |||
| strWONum = strWONum.Trim(); | |||
| wo.Number = strWONum; | |||
| todo.WorkOrder = strWONum; | |||
| todo.WorkOrderNumber = strWONum; | |||
| _workOrderNumber = strWONum; | |||
| string strSeg = currentline.Substring(currentline.IndexOf("Seg.") + 4, 25); | |||
| strSeg = strSeg.Trim(); | |||
| @@ -579,7 +854,7 @@ namespace jdis_import | |||
| 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(); | |||
| strService = strService.Substring(0, strService.IndexOf(" ") + 1).Trim(); | |||
| if (strService.IndexOf(" ") > 0) | |||
| strService = strService.Substring(0, strService.IndexOf(" ")).Trim(); | |||
| if (InspectionType.ContainsKey(strService)) | |||
| @@ -661,180 +936,189 @@ namespace jdis_import | |||
| parts.Add(p); | |||
| } | |||
| static void conn_InfoMsg(object sender, SqlInfoMessageEventArgs e) | |||
| //Put API Integration here | |||
| if (_runAPI) | |||
| { | |||
| _sqlMessages.Add(e.Message); | |||
| APIPush(c, wo, parts, eq, todo); | |||
| } | |||
| foreach (PartImport prt in parts) | |||
| else | |||
| { | |||
| 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)) | |||
| static void conn_InfoMsg(object sender, SqlInfoMessageEventArgs e) | |||
| { | |||
| exceptions.Add(obj); | |||
| //throw new ApplicationException("Serial Number is missing."); | |||
| _sqlMessages.Add(e.Message); | |||
| } | |||
| else list.Add(obj); | |||
| if (list.Count == 0) | |||
| foreach (PartImport prt in parts) | |||
| { | |||
| 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())); | |||
| 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; | |||
| 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(); | |||
| delcmd.ExecuteNonQuery(); | |||
| } | |||
| catch (Exception dex) | |||
| { | |||
| throw new Exception(dex.Message); | |||
| } | |||
| delcmd.Connection.Close(); | |||
| delcmd.Dispose(); | |||
| } | |||
| catch (Exception dex) | |||
| catch (Exception exSql) | |||
| { | |||
| 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; | |||
| filemove = Path.Combine("Fail", todo.FileName); | |||
| //File.Move(todo.FileName, filemove); | |||
| //MailSvc.SendResponse(msg, _workOrderNumber); | |||
| 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; | |||
| filemove = Path.Combine("Fail", todo.FileName); | |||
| //File.Move(todo.FileName, filemove); | |||
| //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) | |||
| } | |||
| Console.WriteLine("Line 584: " + filemove); | |||
| if (File.Exists(filemove)) File.Delete(filemove); | |||
| //File.Move(file, filemove); | |||
| if (_log) | |||
| { | |||
| foreach (CSVObject csvobj in exceptions) | |||
| 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) | |||
| { | |||
| 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); | |||
| 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**********************"); | |||
| } | |||
| } | |||
| if (_sqlMessages.Count > 0) | |||
| using (SqlConnection doublecheck = new SqlConnection(_connection)) | |||
| { | |||
| 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()); | |||
| 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()); | |||
| cmddoublecheck.Dispose(); | |||
| if (rslt > 0) | |||
| { | |||
| todo.Success = true; | |||
| //MailSvc.SendResponse("Work Order was imported successfully.", wo.Number); | |||
| 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 | |||
| { | |||
| //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; | |||
| 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); | |||
| } | |||
| 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) | |||
| { | |||
| @@ -895,6 +1179,15 @@ namespace jdis_import | |||
| } | |||
| } | |||
| public static bool IsWindows() => | |||
| System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows); | |||
| public static bool IsMacOS() => | |||
| System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX); | |||
| public static bool IsLinux() => | |||
| System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux); | |||
| } | |||
| public class ToDo | |||
| @@ -906,6 +1199,6 @@ namespace jdis_import | |||
| public string FileName { get; set; } | |||
| public string Validation { get; set; } | |||
| public string WorkOrder { get; set; } | |||
| public string WorkOrderNumber { get; set; } | |||
| } | |||
| } | |||
| @@ -31,6 +31,8 @@ namespace jdis_import.RESTObjects | |||
| public string Phone2 { get; set; } | |||
| [JsonProperty(PropertyName = "Fax")] | |||
| public string Fax { get; set; } | |||
| [JsonProperty(PropertyName = "ZipCode")] | |||
| public string ZipCode { get; set; } | |||
| [JsonProperty(PropertyName = "CreateDate")] | |||
| public DateTime CreateDate { get; set; } | |||
| [JsonProperty(PropertyName = "CreateUserID")] | |||
| @@ -0,0 +1,59 @@ | |||
| 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 Equipment | |||
| { | |||
| [JsonProperty(PropertyName = "CreateDate")] | |||
| public DateTime CreateDate { get; set; } | |||
| [JsonProperty(PropertyName = "CreateUserID")] | |||
| public int CreateUserID { get; set; } | |||
| [JsonProperty(PropertyName = "BarcodeID")] | |||
| public int? BarcodeID { 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 = "LastServiceDate")] | |||
| public DateTime? LastServiceDate { get; set; } | |||
| [JsonProperty(PropertyName = "Location")] | |||
| public string Location { get; set; } | |||
| [JsonProperty(PropertyName = "ManufacturerYear")] | |||
| public string ManufacturerYear { get; set; } | |||
| [JsonProperty(PropertyName = "MeterReading")] | |||
| public string MeterReading { get; set; } | |||
| [JsonProperty(PropertyName = "Number")] | |||
| public string Number { get; set; } | |||
| [JsonProperty(PropertyName = "Odometer")] | |||
| public string Odometer { get; set; } | |||
| [JsonProperty(PropertyName = "SerialNumber")] | |||
| public string SerialNumber { get; set; } | |||
| [JsonProperty(PropertyName = "UpdateDate")] | |||
| public DateTime? UpdateDate { get; set; } | |||
| [JsonProperty(PropertyName = "UpdateUserID")] | |||
| public int? UpateUserID { 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 = "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 = "Model")] | |||
| public Model Model { get; set; } | |||
| [JsonProperty(PropertyName = "ModelID")] | |||
| public int ModelID { get { return this.Model != null ? this.Model.ID : 0; } set { value = this.Model != null ? this.Model.ID : 0; } } | |||
| [JsonProperty(PropertyName = "Customer")] | |||
| public Customer Customer { get; set; } | |||
| [JsonProperty(PropertyName = "CustomerID")] | |||
| public int CustomerID { get { return this.Customer != null ? this.Customer.ID : 0; } set { value = this.Customer != null ? this.Customer.ID : 0; } } | |||
| } | |||
| } | |||
| @@ -0,0 +1,15 @@ | |||
| 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 Inspection | |||
| { | |||
| [JsonProperty(PropertyName = "ID")] | |||
| public int ID { get; set; } | |||
| } | |||
| } | |||
| @@ -6,6 +6,7 @@ using Newtonsoft.Json; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class InspectionLevel | |||
| { | |||
| [JsonProperty(PropertyName = "CreateDate")] | |||
| @@ -6,6 +6,7 @@ using Newtonsoft.Json; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class InspectionType | |||
| { | |||
| [JsonProperty(PropertyName = "CreateDate")] | |||
| @@ -6,6 +6,7 @@ using Newtonsoft.Json; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class Model | |||
| { | |||
| [JsonProperty(PropertyName = "CreateDate")] | |||
| @@ -0,0 +1,18 @@ | |||
| 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 Priority | |||
| { | |||
| [JsonProperty(PropertyName = "ID")] | |||
| public int ID { get; set; } | |||
| [JsonProperty(PropertyName = "Name")] | |||
| public string Name { get; set; } | |||
| } | |||
| } | |||
| @@ -6,6 +6,7 @@ using Newtonsoft.Json; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class Product | |||
| { | |||
| @@ -1,6 +1,7 @@ | |||
| using System.Globalization; | |||
| using Newtonsoft.Json; | |||
| using Newtonsoft.Json.Converters; | |||
| using System; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| @@ -41,7 +42,9 @@ namespace jdis_import.RESTObjects | |||
| { | |||
| public static T FromJson<T>(string json) | |||
| { | |||
| //Console.WriteLine(json); | |||
| return JsonConvert.DeserializeObject<T>(json, Converter.Settings); | |||
| } | |||
| } | |||
| public static class Serialize | |||
| @@ -10,8 +10,9 @@ namespace jdis_import.RESTObjects | |||
| { | |||
| public class RESTService | |||
| { | |||
| private string _baseUrl = "http://servicesbrandt.rpmindustries.com:8081"; | |||
| private string _baseUrl = @"http://servicesbrandt.rpmindustries.com:8081"; | |||
| private HttpClient _httpClient; | |||
| public string BaseUrl { get { return _baseUrl; } set { _baseUrl = value; } } | |||
| public RESTService() | |||
| { | |||
| @@ -49,10 +50,76 @@ namespace jdis_import.RESTObjects | |||
| RestResponse response = client.Execute(request); | |||
| return response.Content; | |||
| } | |||
| public List<T> RestGet<T>(string endpoint) | |||
| public T RestGet<T>(bool single, string endpoint, Dictionary<string, string> parameters = null) | |||
| { | |||
| RESTResponse<T> rest = new RESTResponse<T>(); | |||
| string url = _baseUrl + "/" + endpoint + "/"; | |||
| if (parameters != null) | |||
| { | |||
| foreach (KeyValuePair<string, string> kvp in parameters) | |||
| { | |||
| url = url + kvp.Key + "/" + kvp.Value; | |||
| } | |||
| } | |||
| RestClient client = new RestClient(url); | |||
| RestRequest request = new RestRequest(); | |||
| request.AddHeader("Accept", "application/json"); | |||
| request.Method = Method.Get; | |||
| RestResponse response = client.Execute(request); | |||
| rest = Deserialize.FromJson<RESTResponse<T>>(response.Content); | |||
| return rest.data; | |||
| } | |||
| public T PostRest<T>(string json, string endpoint) | |||
| { | |||
| RESTResponse<T> rest = new RESTResponse<T>(); | |||
| string url = _baseUrl + "/" + endpoint + "/"; | |||
| RestClient client = new RestClient(url); | |||
| Console.WriteLine(); | |||
| Console.WriteLine(); | |||
| Console.WriteLine(); | |||
| Console.WriteLine(json); | |||
| RestRequest request = new RestRequest(); | |||
| request.Method = Method.Post; | |||
| request.RequestFormat = DataFormat.Json; | |||
| request.AddBody(json); | |||
| request.AddHeader("Accept", "application/json"); | |||
| RestResponse response = client.Execute(request); | |||
| Console.WriteLine(); | |||
| Console.WriteLine(); | |||
| Console.WriteLine(response.Content); | |||
| rest = Deserialize.FromJson<RESTResponse<T>>(response.Content); | |||
| return rest.data; | |||
| } | |||
| public T PostRest<T>(string json, string endpoint, Dictionary<string, string> parameters) | |||
| { | |||
| RESTResponse<T> rest = new RESTResponse<T>(); | |||
| string url = _baseUrl + "/" + endpoint + "/"; | |||
| foreach (KeyValuePair<string, string> kvp in parameters) | |||
| { | |||
| url = url + kvp.Key + "/" + kvp.Value; | |||
| } | |||
| RestClient client = new RestClient(url); | |||
| RestRequest request = new RestRequest(url, Method.Post); | |||
| request.AddBody(json); | |||
| request.AddHeader("Accept", "application/json"); | |||
| RestResponse response = client.Execute(request); | |||
| rest = Deserialize.FromJson<RESTResponse<T>>(response.Content); | |||
| return rest.data; | |||
| } | |||
| public List<T> RestGet<T>(string endpoint, Dictionary<string, string> parameters = null) | |||
| { | |||
| RESTResponse<List<T>> rest = new RESTResponse<List<T>>(); | |||
| string url = _baseUrl + "/" + endpoint + "/"; | |||
| if (parameters != null) | |||
| { | |||
| foreach (KeyValuePair<string, string> kvp in parameters) | |||
| { | |||
| url = url + kvp.Key + "/" + kvp.Value; | |||
| } | |||
| } | |||
| RestClient client = new RestClient(url); | |||
| @@ -0,0 +1,36 @@ | |||
| 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 Reason | |||
| { | |||
| [JsonProperty(PropertyName = "ID")] | |||
| public int ID { get; set; } | |||
| [JsonProperty(PropertyName = "Name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty(PropertyName = "Description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty(PropertyName = "IsActive")] | |||
| public bool IsActive { 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; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| 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 Status | |||
| { | |||
| [JsonProperty(PropertyName = "ID")] | |||
| public int ID { get; set; } | |||
| [JsonProperty(PropertyName = "Name")] | |||
| public string Name { get; set; } | |||
| } | |||
| } | |||
| @@ -6,6 +6,7 @@ using Newtonsoft.Json; | |||
| namespace jdis_import.RESTObjects | |||
| { | |||
| [JsonObject(MemberSerialization.OptIn)] | |||
| public class Template | |||
| { | |||
| [JsonProperty(PropertyName = "CreateDate")] | |||
| @@ -0,0 +1,18 @@ | |||
| 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 User | |||
| { | |||
| [JsonProperty(PropertyName = "ID")] | |||
| public int ID { get; set; } | |||
| [JsonProperty(PropertyName = "Number")] | |||
| public string Number { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,112 @@ | |||
| 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 WorkOrder | |||
| { | |||
| [JsonProperty(PropertyName = "ID")] | |||
| public int ID { get; set; } | |||
| [JsonProperty(PropertyName = "CustomerID")] | |||
| public int CustomerID { get { return this.Customer != null ? this.Customer.ID : 0; } set { value = this.Customer != null ? this.Customer.ID : 0; } } | |||
| [JsonProperty(PropertyName = "PriorityID")] | |||
| public int PriorityID | |||
| { | |||
| get { return this.Priority != null ? this.Priority.ID : 0; } | |||
| set { value = this.Priority != null ? this.Priority.ID : 0; } | |||
| } | |||
| [JsonProperty(PropertyName = "StatusID")] | |||
| public int StatusID | |||
| { | |||
| get { return this.Status != null ? this.Status.ID : 0; } | |||
| set { value = this.Status != null ? this.Status.ID : 0; } | |||
| } | |||
| [JsonProperty(PropertyName = "EquipmentID")] | |||
| public int EquipmentID | |||
| { | |||
| get { return this.Equipment != null ? this.Equipment.ID : 0; } | |||
| set { value = this.Equipment != null ? this.Equipment.ID : 0; } | |||
| } | |||
| [JsonProperty(PropertyName = "ReasonID")] | |||
| public int? ReasonID | |||
| { | |||
| get { return this.Reason != null ? this.Reason.ID : null; } | |||
| set { value = this.Reason != null ? this.Reason.ID : null; } | |||
| } | |||
| [JsonProperty(PropertyName = "IncompleteReasonID")] | |||
| public int? IncompleteReasonID { get; set; } | |||
| [JsonProperty(PropertyName = "TechnicianUserID")] | |||
| public int TechnicianUserID | |||
| { | |||
| get { return this.Technician != null ? this.Technician.ID : 0; } | |||
| set { value = this.Technician != null ? this.Technician.ID : 0; } | |||
| } | |||
| [JsonProperty(PropertyName = "Number")] | |||
| public string Number { get; set; } | |||
| [JsonProperty(PropertyName = "MeterReading")] | |||
| public decimal? MeterReading { get; set; } | |||
| [JsonProperty(PropertyName = "Odometer")] | |||
| public decimal? Odometer { get; set; } | |||
| [JsonProperty(PropertyName = "SpecialInstructions")] | |||
| public string SpecialInstructions { get; set; } | |||
| [JsonProperty(PropertyName = "ScheduledStartDate")] | |||
| public DateTime ScheduledStartDate { get; set; } | |||
| [JsonProperty(PropertyName = "ScheduledEndDate")] | |||
| public DateTime ScheduledEndDate { get; set; } | |||
| [JsonProperty(PropertyName = "StartDate")] | |||
| public DateTime? StartDate { get; set; } | |||
| [JsonProperty(PropertyName = "EndDate")] | |||
| public DateTime? EndDate { get; set; } | |||
| [JsonProperty(PropertyName = "ApprovedDate")] | |||
| public DateTime? ApprovedDate { 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; } | |||
| [JsonProperty(PropertyName = "Customer")] | |||
| public Customer Customer { get; set; } | |||
| [JsonProperty(PropertyName = "Priority")] | |||
| public Priority Priority { get; set; } | |||
| [JsonProperty(PropertyName = "Status")] | |||
| public Status Status { get; set; } | |||
| [JsonProperty(PropertyName = "Equipment")] | |||
| public Equipment Equipment { get; set; } | |||
| [JsonProperty(PropertyName = "Reason")] | |||
| public Reason Reason { get; set; } | |||
| [JsonProperty(PropertyName = "Technician")] | |||
| public User Technician { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,39 @@ | |||
| { | |||
| "OSs": [ | |||
| { | |||
| "Name": "Linux", | |||
| "Fail": "/var/log/failures/", | |||
| "Success": "/var/log/successes/", | |||
| "Log": "/var/log/", | |||
| "Temp": "/var/tmp/" | |||
| }, | |||
| { | |||
| "Name": "Windows", | |||
| "Fail": "C:/log/failures", | |||
| "Success": "C:/log/successes/", | |||
| "Log": "C:/log/", | |||
| "Temp": "C:/tmp/" | |||
| }, | |||
| { | |||
| "Name": "OSX", | |||
| "Fail": "/var/log/failures/", | |||
| "Success": "/var/log/successes/", | |||
| "Log": "/var/log/", | |||
| "Temp": "/var/tmp/" | |||
| } | |||
| ], | |||
| "Email": { | |||
| "Username": "mcarman@prelub.com", | |||
| "Password": "Gr@nt@cc3$$", | |||
| "Mailbox": 4, | |||
| "Url": "https://outlook.office365.com/ews/Exchange.asmx", | |||
| "Filter": "United Rentals, Inc:" | |||
| }, | |||
| "Remote": false, | |||
| "Log File": "jdis_import.log", | |||
| "Prelub": { | |||
| "Check": "http://brandt.rpmindustries.com:8080", | |||
| "LocalService": "http://servicesbrandt.rpmindustries.com:8081", | |||
| "RemoteService": "https://servicesbrandt.rpmindustries.com" | |||
| } | |||
| } | |||
| @@ -0,0 +1,61 @@ | |||
| Date 16JAN2023 14:10:00 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3381589 Seg. 01 Opn Dt 16JAN2023 | |||
| Auth by KEVIN HICKEY Phone 403-255-2600 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S BURNCO ROCK PRODUCTS LTD. Cust No. 40001045 S | |||
| O 5055 11 STREET NE Pur-Ord. REQUIRED H EMAIL ALL INVOICES TO: | |||
| L P-% 0.0 L-% 0.0 I payableinvoices@burnco.co | |||
| D CALGARY, AB T2E 8N4 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 824L 1DW824LXCMF709408 L403 .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 | |||
| ------------------------------------------------------------------------------- | |||
| 600 HR SERVICE | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: CGYPM1 T | |||
| PROMISE DATE: 22JAN2023 T | |||
| SPECIAL INSTRUCTIONS: CANMORE SITE T | |||
| CONTACT: KEVIN HICKEY 403-589-1367 T | |||
| EMAIL: KEVIN.HICKEY@BURNCO.COM T | |||
| 1 1 DZ118283 FILTER KIT XY 55.96 .00 | |||
| 1 1 RE539465 FILTER ELEMXY 180.50 .00 | |||
| 1 1 DZ112918 FILTER ELEMXY 226.86 .00 | |||
| 1 1 AT223493 FUEL FILTERXY 21.83 .00 | |||
| 1 1 T225008 BREATHER XY 46.38 .00 | |||
| 1 1 AM39653 OIL FILTER XY 19.39 .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 | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Backordered Parts 550.92 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,61 @@ | |||
| Date 26JAN2023 14:37:15 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3376917 Seg. 01 Opn Dt 26JAN2023 | |||
| Auth by MARLIN SAWATSKY Phone 403-232-6900 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S STRAD CANADA INC. Cust No. 67782552 S STRAD CANADA INC. | |||
| O ATTN: A/P 650-440 2 AVE SPur-Ord. REQUIRED H MUST HAVE PO ON ALL INVOI | |||
| L P-% 0.0 L-% 0.0 I 2974-37 AVE E | |||
| D CALGARY, AB T2P 5E9 P WHITECOURT, AB T7S 0A2 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 250G 1FF250GXHJF610787 932063 .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 | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR SERVICE | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: EDMPM1 T | |||
| PROMISE DATE: 27JAN2023 T | |||
| SPECIAL INSTRUCTIONS: 2315 5A STREET NISKU AB CALL MARLIN T | |||
| PRIOR TO GOING OUT TO SITE T | |||
| CONTACT: MARLIN SAWATSKY 780-918-7849 T | |||
| EMAIL: MSAWATSKY@STRADINC.COM T | |||
| 1 1 RE539279 OIL FILTXY 49.50 .00 | |||
| 1 1 RE556406 FILTER KXY 212.53 .00 | |||
| 1 1 AT365870 FILTER EXY 82.09 .00 | |||
| 1 1 AT300487 FILTER EXY 126.79 .00 | |||
| 1 1 AT314583 FILTER EXY 79.50 .00 | |||
| 1 1 4S00686R FILTER XY 130.99 .00 | |||
| 1 1 FYA00001490R AIR FILTXY 85.37 .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 | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Backordered Parts 766.77 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,115 @@ | |||
| Date 27JAN2023 08:06:04 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 58 Work Order 4807703 Seg. 01 Opn Dt 18JAN2023 | |||
| Auth by Phone 905-547-8888 Inv Cls Dt | |||
| INTERNAL Slprn | |||
| S TRIPLE M METAL LIMITED Cust No. 95800988 S TRIPLE M METAL LIMITED | |||
| O 670 STRATHEARNE AVENUE Pur-Ord. H 670 STRATHEARNE AVENUE | |||
| L P-% 0.0 L-% 0.0 I | |||
| D HAMILTON, ON L8H 7N7 P HAMILTON, ON L8H 7N7 | |||
| G/L # 988-88-8888 Stock# 00000000 Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 844L 1DW844LXHLF705700 WL-75 11224.0 F | |||
| Prt Cls-PC Lbr Cls-IIN Price Cd-L Prt Tx-0101 Lbr Tx-0101 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| FILED TRAVEL-DOFASCO | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: STCPM1 T | |||
| PROMISE DATE: 28JAN2023 T | |||
| SPECIAL INSTRUCTIONS: DOFASCO T | |||
| CONTACT: ADAM 905-536-4551 T | |||
| EMAIL: TBD T | |||
| 2.25 01-20 R/T 58025 TRAVEL 240.00 540.00 | |||
| 2.25- 01-20 R/T 58025 TRAVEL 240.00 540.00- | |||
| .50 01-20 R/T 58025 TRAVEL 240.00 120.00 | |||
| .75 01-20 R/T 58025 TRAVEL 240.00 180.00 | |||
| SEG # 01 TOTAL = .00 P 1.25 LH 300.00 L .00 M 300.00 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| PREFORM 1000 HR SERVICE (PM) | |||
| 2 2 AT489922 FILTER 206.08 412.16 | |||
| 1 1 RE572785 OIL FI 145.63 145.63 | |||
| 1 1 RE539465 FILTER 180.50 180.50 | |||
| 1 1 DZ112918 FILTER 226.86 226.86 | |||
| 1 1 AT311066 AIR FI 279.52 279.52 | |||
| 1 1 AT311067 AIR FI 139.13 139.13 | |||
| 1 1 H216169 BREATH 50.48 50.48 | |||
| 40 40 245081000L 1000L 6.76 270.40 | |||
| 1 1 62841000L 1000L 10.22 10.22 | |||
| 5 5 AT346594 FLUID 52.14 260.70 | |||
| 5 5 AT315231 TEST/M 8.27 41.35 | |||
| .50 01-18 R/T 58026 FIELD 240.00 120.00 | |||
| 8.00 01-20 R/T 58025 FIELD 240.00 1920.00 | |||
| .25 01-20 O/T 58025 FIELD 290.00 72.50 | |||
| 8.00- 01-20 R/T 58025 FIELD 240.00 1920.00- | |||
| 4.50 01-20 R/T 58025 FIELD 240.00 1080.00 | |||
| 1.00 01-20 R/T 58025 FIELD 240.00 240.00 | |||
| 1.00 01-20 R/T 58025 FIELD 240.00 240.00 | |||
| 4.50- 01-20 R/T 58025 FIELD 240.00 1080.00- | |||
| .25- 01-20 O/T 58025 FIELD 290.00 72.50- | |||
| 3.25 01-20 R/T 58025 FIELD 240.00 780.00 | |||
| Date 27JAN2023 08:06:04 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 58 Work Order 4807703 Seg. 02 Opn Dt 18JAN2023 | |||
| Auth by Phone 905-547-8888 Inv Cls Dt | |||
| INTERNAL Slprn | |||
| S TRIPLE M METAL LIMITED Cust No. 95800988 S TRIPLE M METAL LIMITED | |||
| O 670 STRATHEARNE AVENUE Pur-Ord. H 670 STRATHEARNE AVENUE | |||
| L P-% 0.0 L-% 0.0 I | |||
| D HAMILTON, ON L8H 7N7 P HAMILTON, ON L8H 7N7 | |||
| G/L # 988-88-8888 Stock# 00000000 Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 844L 1DW844LXHLF705700 WL-75 11224.0 F | |||
| Prt Cls-PC Lbr Cls-IIN Price Cd-L Prt Tx-0101 Lbr Tx-0101 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 1.75 01-20 R/T 58025 FIELD 240.00 420.00 | |||
| 1.00- 01-20 R/T 58025 FIELD 240.00 240.00- | |||
| SEG # 02 TOTAL = 2,016.95 P 6.50 LH 1,560.00 L .00 M 3,576.95 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| **************************************** | |||
| * Taxable Parts 2,016.95 * | |||
| * * | |||
| * Total Labor 1,860.00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax 232.62 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 4,109.57 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 27JAN2023 08:32:23 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316599 Seg. 01 Opn Dt 17JAN2023 | |||
| Auth by Phone 416-738-4486 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S ASTRO EXCAVATING INC. Cust No. 95301649 S ASTRO EXCAVATING INC. | |||
| O 645 CORONATION DRIVE Pur-Ord. H 645 CORONATION DRIVE | |||
| L P-% 0.0 L-% 5.0 I | |||
| D SCARBOROUGH, ON M1E 2K4 P SCARBOROUGH, ON M1E 2 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 350GLC 1FF350GXCED810447 T3,13'1" A 9057.0 H F | |||
| 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 PM | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: MISPM1 T | |||
| PROMISE DATE: 30JAN2023 T | |||
| SPECIAL INSTRUCTIONS: 45 RICHMOND ST E T | |||
| CONTACT: DANIEL GOVE 416-985-3523 T | |||
| EMAIL: DANIEL@ASTROEXCAVATING.COM T | |||
| .50 01-18 R/T 53092 REPAIR 225.00 106.88 | |||
| SEG # 01 TOTAL = .00 P .50 LH 106.88 L .00 M 106.88 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Total Labor 106.88 * | |||
| * Non-Taxable 106.88 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 13.89 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 120.77 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 27JAN2023 08:35:25 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316544 Seg. 01 Opn Dt 13JAN2023 | |||
| Auth by Phone 519-737-1577 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S AMICO INFRASTRUCTURES INC Cust No. 95600170 S AMICO INFRASTRUCTURES INC | |||
| O 2199 BLACKACRE DRIVE Pur-Ord. REQ H 2199 BLACKACRE DRIVE | |||
| L P-% 0.0 L-% 0.0 I | |||
| D OLDCASTLE, ON N0R 1L0 P OLDCASTLE, ON N0R 1L0 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 750L 1T0750LXCLF385507 53104 10855.0 H F | |||
| 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 PM | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: MISPM2 T | |||
| PROMISE DATE: 30JAN2023 T | |||
| SPECIAL INSTRUCTIONS: 1461 HARWOOD AVE N AJAX T | |||
| CONTACT: JASON 519-796-2456 T | |||
| EMAIL: jason.blais@amico.build T | |||
| SEG # 01 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 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,111 @@ | |||
| Date 27JAN2023 10:33:05 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3371567 Seg. 01 Opn Dt 27JAN2023 | |||
| Auth by MATT MACDOUGALL Phone 604-520-5909 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S MATCON EXCAVATION AND SHO Cust No. 14003746 S | |||
| O 2208 HARTLEY AVE Pur-Ord. H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D COQUITLAM, BC V2K 6X3 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 524L 1DW524LZVKF700632 019001 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 2000 HR SERVICE | |||
| PM INTERVAL: 2000 HR T | |||
| EMPID: SRYPM1 T | |||
| PROMISE DATE: 28JAN2023 T | |||
| SPECIAL INSTRUCTIONS: AT THE BRANDT SHOP T | |||
| CONTACT: MATT MACDOUGALL T | |||
| EMAIL: MATTM@MATCON.CA T | |||
| 1 1 RE539279 OIL FILTER XY 49.50 .00 | |||
| 1 1 R502513 SEAL XY 11.86 .00 | |||
| 1 1 DZ115391 FILTER ELEMXY 75.38 .00 | |||
| 1 1 DZ115392 FILTER ELEMXY 83.19 .00 | |||
| 2 2 AT367635 FILTER ELEMXY 200.71 .00 | |||
| 1 1 M89679 EJECTOR XY 35.08 .00 | |||
| 5 5 AT346594 FLUID KIT XY 52.14 .00 | |||
| 1 1 AM39653 OIL FILTER 19.39 19.39 | |||
| 1 1 AT468647 OIL FILTER 104.65 104.65 | |||
| SEG # 01 TOTAL = 124.04 P .00 LH .00 L .00 M 124.04 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 | |||
| 1 1 AT178516 FILTER ELEMXY 112.96 .00 | |||
| 1 1 AT178517 FILTER ELEMXY 91.61 .00 | |||
| 1 1 AT191102 AIR FILTER XY 30.89 .00 | |||
| 1 1 AT307501 AIR FILTER XY 25.41 .00 | |||
| 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 27JAN2023 10:33:05 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 48 Work Order 3371567 Seg. 03 Opn Dt 27JAN2023 | |||
| Auth by MATT MACDOUGALL Phone 604-520-5909 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S MATCON EXCAVATION AND SHO Cust No. 14003746 S | |||
| O 2208 HARTLEY AVE Pur-Ord. H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D COQUITLAM, BC V2K 6X3 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 524L 1DW524LZVKF700632 019001 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 124.04 * | |||
| * Backordered Parts 1,178.00 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * GST/HST 6.20 * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > 130.24 * | |||
| **************************************** | |||
| @@ -0,0 +1,114 @@ | |||
| Date 27JAN2023 13:09:24 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316454 Seg. 01 Opn Dt 06JAN2023 | |||
| Auth by Phone 855-339-4933 Inv Cls Dt | |||
| INTERNAL Slprn | |||
| S CRH CANADA GROUP INC. Cust No. 95300431 S | |||
| O PO BOX 5400 Pur-Ord. CONT H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D CONCORD, ON L4K 1B6 P | |||
| G/L # 249-03-0053 Stock# PM673799 Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 724K 1DW724KZAGD673799 8609 10381.0 H F | |||
| Prt Cls-PC Lbr Cls-IIN Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 5000 HR PM | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: MISPM1 T | |||
| PROMISE DATE: 26JAN2023 T | |||
| SPECIAL INSTRUCTIONS: 650 COMMISSIONERS ST TORONTO T | |||
| CONTACT: ROBERT CABA 416-717-2558 T | |||
| EMAIL: ROBERT.CABA@CA.CRH.COM T | |||
| TRANS 39934397 B | |||
| R DIFF 39934417 B | |||
| F DIFF 39934416 B | |||
| ENGINE 39934415 B | |||
| PARK BRAKE 70064705 B | |||
| HYDRAULIC 39934425 B | |||
| 1 1 AH128449 HYDRAULI 141.58 141.58 | |||
| 1 1 DZ118283 FILTER K 42.30 42.30 | |||
| 1 1 RE525523 FILTER E 179.52 179.52 | |||
| 1 1 AT223493 FUEL FIL 21.83 21.83 | |||
| 1 1 AT223226 FILTER E 186.14 186.14 | |||
| 1 1 AT175224 FILTER E 105.15 105.15 | |||
| 1 1 T158495 VALVEVAL 40.29 40.29 | |||
| 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 | |||
| 2 2 245085L 5L-(4x5) 43.01 86.02 | |||
| 5 5 AT346594 FLUID KI 52.14 260.70 | |||
| 1 1 6341 14oz tub 10.45 10.45 | |||
| 7.50 01-26 R/T 53087 REPAIR 225.00 1687.50 | |||
| 1 01-27 1 SERVICE ACCESSORIES 151.88 151.88 | |||
| SEG # 01 TOTAL = 1,288.43 P 7.50 LH 1,687.50 L 151.88 M 3,127.81 T | |||
| FIELD SERVICE TRAVEL | |||
| 650 COMIISSIONERS ST, TORONTO ROBERT 416-717-2558 B | |||
| 2.50 01-26 R/T 53087 REPAIR 225.00 562.50 | |||
| 1.00 01-26 O/T 53087 REPAIR 285.00 285.00 | |||
| SEG # 02 TOTAL = .00 P 3.50 LH 847.50 L .00 M 847.50 T | |||
| Date 27JAN2023 13:09:24 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 53 Work Order 4316454 Seg. 02 Opn Dt 06JAN2023 | |||
| Auth by Phone 855-339-4933 Inv Cls Dt | |||
| INTERNAL Slprn | |||
| S CRH CANADA GROUP INC. Cust No. 95300431 S | |||
| O PO BOX 5400 Pur-Ord. CONT H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D CONCORD, ON L4K 1B6 P | |||
| G/L # 249-03-0053 Stock# PM673799 Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 724K 1DW724KZAGD673799 8609 10381.0 H F | |||
| Prt Cls-PC Lbr Cls-IIN Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 1,288.43 * | |||
| * Total Labor 2,535.00 * | |||
| * Non-Taxable 2,535.00 * | |||
| * Misc Charges 151.88 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 3,975.31 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 30JAN2023 08:20:57 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316705 Seg. 01 Opn Dt 24JAN2023 | |||
| Auth by Phone 416-477-2803 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S SPK RENTALS LTD. Cust No. 95301925 S SPK RENTALS LTD. | |||
| O 5878 HIGHWAY 9 Pur-Ord. REQ H P.O. BOX 135 | |||
| L P-% 0.0 L-% 0.0 I | |||
| D SCHOMBERG, ON L0G 1T0 P SCHOMBERG, ON L0G 1T0 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 135G 1FF135GXJJF500961 135G FT4 E .0 F | |||
| 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 PM | |||
| PM INTERVAL: 1000 HR T | |||
| EMPID: MISPM2 T | |||
| PROMISE DATE: 31JAN2023 T | |||
| SPECIAL INSTRUCTIONS: JANE AND TROUTBROOKE T | |||
| CONTACT: NINO 416-771-3236 T | |||
| EMAIL: NINO@SPKRENTALS.CA T | |||
| .50 01-24 R/T 53092 REPAIR 225.00 112.50 | |||
| SEG # 01 TOTAL = .00 P .50 LH 112.50 L .00 M 112.50 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Total Labor 112.50 * | |||
| * Non-Taxable 112.50 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 14.63 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 127.13 * | |||
| **************************************** | |||
| @@ -0,0 +1,115 @@ | |||
| Date 30JAN2023 13:12:01 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316479 Seg. 01 Opn Dt 10JAN2023 | |||
| Auth by Phone 905-466-8290 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S TELECON Cust No. 95302623 S | |||
| O 39 EASY STREET Pur-Ord. H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D PORT PERRY, ON L9L 0A1 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 27D 1FF027DXTEG260143 55550132 .0 F | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0801 Lbr Tx-0801 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR PM | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: MISPM1 T | |||
| PROMISE DATE: 31JAN2023 T | |||
| SPECIAL INSTRUCTIONS: WHITBY YARD 1850 BOUNDARY RD GATE CODE T | |||
| 1981 T | |||
| CONTACT: RAJ PAERSAUD 416-684-8475 T | |||
| EMAIL: raj.persaud@telecon.ca T | |||
| 1 1 6341 14oz 10.45 10.45 | |||
| 1 1 AT308568 FILT 128.21 128.21 | |||
| 1 1 4621929 O-RI 13.17 13.17 | |||
| 1 1 MIU801267 FUEL 25.91 25.91 | |||
| 1 1 MIU800645 FUEL 24.06 24.06 | |||
| 1 1 245085L 5L-( 43.01 43.01 | |||
| 1 1 M131802 FILT 41.51 41.51 | |||
| 4 4 AT346594 FLUI 52.14 208.56 | |||
| .50 01-10 R/T 53092 REPAIR 225.00 112.50 | |||
| 1.00 01-27 R/T 53087 REPAIR 225.00 225.00 | |||
| SEG # 01 TOTAL = 494.88 P 1.50 LH 337.50 L .00 M 832.38 T | |||
| FIELD SERVICE TRAVEL | |||
| 3.00 01-27 R/T 53087 REPAIR 225.00 675.00 | |||
| 1.00 01-27 O/T 53087 REPAIR 285.00 285.00 | |||
| SEG # 02 TOTAL = .00 P 4.00 LH 960.00 L .00 M 960.00 T | |||
| ORDER PARTS, WLL RETURN THEM (CAMERON HAS) | |||
| 1 1 6341 14oz tub 10.45 10.45 | |||
| 1 1 MIU800650 OIL FILT 26.20 26.20 | |||
| 1 1 AT308568 FILTER E 128.21 128.21 | |||
| 1 1 4621929 O-RING 13.17 13.17 | |||
| 1 1 MIU801267 FUEL FIL 25.91 25.91 | |||
| 1 1 MIU800645 FUEL FIL 24.06 24.06 | |||
| 1 1 245085L 5L-(4x5) 43.01 43.01 | |||
| 1 1 M131802 FILTER E 41.51 41.51 | |||
| 4 4 AT346594 FLUID KI 52.14 208.56 | |||
| 1 1 4641220 FILTER E 77.04 77.04 | |||
| Date 30JAN2023 13:12:01 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 53 Work Order 4316479 Seg. 03 Opn Dt 27JAN2023 | |||
| Auth by Phone 905-466-8290 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S TELECON Cust No. 95302623 S | |||
| O 39 EASY STREET Pur-Ord. H | |||
| L P-% 0.0 L-% 0.0 I | |||
| D PORT PERRY, ON L9L 0A1 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 27D 1FF027DXTEG260143 55550132 .0 F | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-0801 Lbr Tx-0801 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 1 1 4641221 FILTER E 83.59 83.59 | |||
| SEG # 03 TOTAL = 681.71 P .00 LH .00 L .00 M 681.71 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 1,176.59 * | |||
| * Total Labor 1,297.50 * | |||
| * Non-Taxable 1,297.50 * | |||
| * Misc Charges .00 * | |||
| * GST/HST 321.63 * | |||
| * Sales Tax .00 * | |||
| * (Carbon Tax Surcharge will be added) * | |||
| * TOTAL DUE > 2,795.72 * | |||
| **************************************** | |||
| @@ -0,0 +1,60 @@ | |||
| Date 30JAN2023 13:18:42 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 53 Work Order 4316656 Seg. 01 Opn Dt 20JAN2023 | |||
| Auth by Phone 905-265-7400 Inv Cls Dt | |||
| CHARGE Slprn | |||
| S NPL CANADA INC. Cust No. 95300952 S NPL CANADA INC. | |||
| O 1 ROYAL GATE BLVD Pur-Ord. REQ H REMIT PAYMENTS TO: | |||
| L SUITE E 2ND FLOOR P-% 0.0 L-% 0.0 I BRANDT 1655 BRITANIA RD, | |||
| D VAUGHAN, ON L4L 8Z7 P MISSISSAUGA, ON L4W 1 | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 310SL 1T0310SLTNF417281 20308 .0 F | |||
| 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 | |||
| ------------------------------------------------------------------------------- | |||
| 500 HR PM | |||
| PM INTERVAL: 500 HR T | |||
| EMPID: MISPM2 T | |||
| PROMISE DATE: 30JAN2023 T | |||
| SPECIAL INSTRUCTIONS: FINCH @MILADY TORONTO AIRPORT BLK CAR T | |||
| CONTACT: JODY LANGDON 905-693-5449 T | |||
| EMAIL: MAHMAD@NPLCANADA.CA T | |||
| 1 1 RE504836 OIL FILT 38.76 38.76 | |||
| 1 1 DZ115391 FILTER E 75.38 75.38 | |||
| 1 1 DZ115390 FILTER E 88.54 88.54 | |||
| 1 1 AT332908 FILTER E 76.03 76.03 | |||
| 1 1 AT332909 FILTER E 52.64 52.64 | |||
| 1 1 AT191102 AIR FILT 30.89 30.89 | |||
| 1 1 AT184590 AIR FILT 77.11 77.11 | |||
| 1 1 2450820L 20L - 36 158.15 158.15 | |||
| 5 5 AT346594 FLUID KI 52.14 260.70 | |||
| SEG # 01 TOTAL = 858.20 P .00 LH .00 L .00 M 858.20 T | |||
| Quoted TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| FIELD SERVICE TRAVEL | |||
| SEG # 02 TOTAL = .00 P .00 LH .00 L .00 M .00 T | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * Non-Taxable Parts 858.20 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * GST/HST 111.57 * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > 969.77 * | |||
| **************************************** | |||
| @@ -0,0 +1,114 @@ | |||
| Date 03FEB2023 15:58:26 ** WORK ORDER PREVIEW ** Page 1 | |||
| Location 48 Work Order 3376918 Seg. 01 Opn Dt 03FEB2023 | |||
| Auth by JULIA STECKHAHN Phone 403-514-4000 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S FORTIS ALBERTA INC Cust No. 62963901 S | |||
| O PO BOX 2570 Pur-Ord. H ACCOUNTSPAYABLE@FORTISCOR | |||
| L STATION M P-% 0.0 L-% 0.0 I COM | |||
| D CALGARY, AB T2P 5H4 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 744K 1DW744KXCED662037 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| 2000 HR SERVICE | |||
| PM INTERVAL: 2000 HR T | |||
| EMPID: EDMPM1 T | |||
| PROMISE DATE: 10FEB2023 T | |||
| SPECIAL INSTRUCTIONS: 10916 HWY 60 ACHESON AB T | |||
| LOADER IS NEXT DOOR AT THE MAIN WAREHOUSE IN THE QUONSET T | |||
| CONTACT: JULIA STECKHAHN 780-203-4925 T | |||
| EMAIL: JULIA.STECKHAHN@FORTISALBERTA.COM T | |||
| 1 1 DZ118283 FILTER KXY 55.96 .00 | |||
| 1 1 RE525523 FILTER EXY 179.52 .00 | |||
| 1 1 AT365869 FILTER EXY 103.19 .00 | |||
| 1 1 AT223493 FUEL FILXY 21.83 .00 | |||
| 1 1 AM39653 OIL FILTXY 19.39 .00 | |||
| 1 1 T225008 BREATHERXY 46.38 .00 | |||
| 1 1 T158495 VALVE XY 40.29 .00 | |||
| 2 2 AH128449 HYDRAULIXY 141.58 .00 | |||
| 2 2 AT468647 OIL FILTXY 104.65 .00 | |||
| 1 1 AT223226 FILTER EXY 186.14 .00 | |||
| 1 1 AT175224 FILTER EXY 105.15 .00 | |||
| 1 1 AT191102 AIR FILTXY 30.89 .00 | |||
| 1 1 AT307501 AIR FILTXY 25.41 .00 | |||
| 5 5 AT346594 FLUID KIXY 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 03FEB2023 15:58:26 ** WORK ORDER PREVIEW ** Page 2 | |||
| Location 48 Work Order 3376918 Seg. 03 Opn Dt 03FEB2023 | |||
| Auth by JULIA STECKHAHN Phone 403-514-4000 Inv Cls Dt | |||
| CHARGE Slprn 48 | |||
| S FORTIS ALBERTA INC Cust No. 62963901 S | |||
| O PO BOX 2570 Pur-Ord. H ACCOUNTSPAYABLE@FORTISCOR | |||
| L STATION M P-% 0.0 L-% 0.0 I COM | |||
| D CALGARY, AB T2P 5H4 P | |||
| G/L # Stock# Multi-use# | |||
| Make Model PIN Number Equipment Meter MC SFR | |||
| JD 744K 1DW744KXCED662037 .0 S | |||
| Prt Cls-PC Lbr Cls-ICL Price Cd-L Prt Tx-N001 Lbr Tx-N001 | |||
| Item Hrs/Ord Bk-Ord Ship Description/Comments RATE EXTENSION | |||
| ------------------------------------------------------------------------------- | |||
| **************************************** | |||
| * Taxable Parts .00 * | |||
| * * | |||
| * Backordered Parts 1,567.31 * | |||
| * Total Labor .00 * | |||
| * * | |||
| * Misc Charges .00 * | |||
| * * | |||
| * Sales Tax .00 * | |||
| * * | |||
| * TOTAL DUE > .00 * | |||
| **************************************** | |||
| @@ -0,0 +1,39 @@ | |||
| { | |||
| "OSs": [ | |||
| { | |||
| "Name": "Linux", | |||
| "Fail": "/var/log/failures/", | |||
| "Success": "/var/log/successes/", | |||
| "Log": "/var/log/", | |||
| "Temp": "/var/tmp/" | |||
| }, | |||
| { | |||
| "Name": "Windows", | |||
| "Fail": "C:/log/failures", | |||
| "Success": "C:/log/successes/", | |||
| "Log": "C:/log/", | |||
| "Temp": "C:/tmp/" | |||
| }, | |||
| { | |||
| "Name": "OSX", | |||
| "Fail": "/var/log/failures/", | |||
| "Success": "/var/log/successes/", | |||
| "Log": "/var/log/", | |||
| "Temp": "/var/tmp/" | |||
| } | |||
| ], | |||
| "Email": { | |||
| "Username": "mcarman@prelub.com", | |||
| "Password": "Gr@nt@cc3$$", | |||
| "Mailbox": 4, | |||
| "Url": "https://outlook.office365.com/ews/Exchange.asmx", | |||
| "Filter": "United Rentals, Inc:" | |||
| }, | |||
| "Remote": false, | |||
| "Log File": "jdis_import.log", | |||
| "Prelub": { | |||
| "Check": "http://brandt.rpmindustries.com:8080", | |||
| "LocalService": "http://servicesbrandt.rpmindustries.com:8081", | |||
| "RemoteService": "https://servicesbrandt.rpmindustries.com" | |||
| } | |||
| } | |||
| @@ -0,0 +1,39 @@ | |||
| { | |||
| "OSs": [ | |||
| { | |||
| "Name": "Linux", | |||
| "Fail": "/var/log/failures/", | |||
| "Success": "/var/log/successes/", | |||
| "Log": "/var/log/", | |||
| "Temp": "/var/tmp/" | |||
| }, | |||
| { | |||
| "Name": "Windows", | |||
| "Fail": "C:/log/failures", | |||
| "Success": "C:/log/successes/", | |||
| "Log": "C:/log/", | |||
| "Temp": "C:/tmp/" | |||
| }, | |||
| { | |||
| "Name": "OSX", | |||
| "Fail": "/var/log/failures/", | |||
| "Success": "/var/log/successes/", | |||
| "Log": "/var/log/", | |||
| "Temp": "/var/tmp/" | |||
| } | |||
| ], | |||
| "Email": { | |||
| "Username": "mcarman@prelub.com", | |||
| "Password": "Gr@nt@cc3$$", | |||
| "Mailbox": 4, | |||
| "Url": "https://outlook.office365.com/ews/Exchange.asmx", | |||
| "Filter": "United Rentals, Inc:" | |||
| }, | |||
| "Remote": false, | |||
| "Log File": "jdis_import.log", | |||
| "Prelub": { | |||
| "Check": "http://brandt.rpmindustries.com:8080", | |||
| "LocalService": "http://servicesbrandt.rpmindustries.com:8081", | |||
| "RemoteService": "https://servicesbrandt.rpmindustries.com" | |||
| } | |||
| } | |||