@@ -36,7 +36,7 @@ public class WorkOrderCreatedHandler(
3636
3737 public async Task Handle ( WorkOrderCreated message )
3838 {
39- var pdfHash = await GeneratePdf ( message . PicturesOfTasks ) . ConfigureAwait ( false ) ;
39+ // var pdfHash = await GeneratePdf(message.PicturesOfTasks).ConfigureAwait(false);
4040 await DeployEform (
4141 message . PropertyWorkers ,
4242 message . EformId ,
@@ -46,7 +46,7 @@ await DeployEform(
4646 message . WorkorderCaseId ,
4747 message . NewDescription ,
4848 message . DeviceUsersGroupId ,
49- pdfHash ,
49+ // pdfHash,
5050 message . AssignedToSite ,
5151 message . PushMessageBody ,
5252 message . PushMessageTitle ,
@@ -69,7 +69,7 @@ private async Task DeployEform(
6969 int workorderCaseId ,
7070 string newDescription ,
7171 int ? deviceUsersGroupId ,
72- string pdfHash ,
72+ // string pdfHash,
7373 Site assignedToSite ,
7474 string pushMessageBody ,
7575 string pushMessageTitle ,
@@ -173,7 +173,7 @@ List<KeyValuePair<string, string>> picturesOfTasks
173173 ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList [ 0 ] . Description . InderValue = description . Replace ( "\r \n " , "<br>" ) . Replace ( "\n " , "<br>" ) ;
174174 ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList [ 0 ] . Label = " " ;
175175 ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList [ 0 ] . Color = Constants . FieldColors . Yellow ;
176- ( ( ShowPdf ) ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList [ 1 ] ) . Value = pdfHash ;
176+ // ((ShowPdf)((DataElement)mainElement.ElementList[0]).DataItemList[1]).Value = pdfHash;
177177 List < Microting . eForm . Dto . KeyValuePair > kvpList = ( ( SingleSelect ) ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList [ 4 ] ) . KeyValuePairList ;
178178 var newKvpList = new List < KeyValuePair > ( ) ;
179179 foreach ( var keyValuePair in kvpList )
@@ -203,30 +203,30 @@ List<KeyValuePair<string, string>> picturesOfTasks
203203 }
204204
205205 mainElement . StartDate = DateTime . Now . ToUniversalTime ( ) ;
206- if ( hasImages == false )
206+ // if (hasImages == false)
207+ // {
208+ ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList . RemoveAt ( 1 ) ;
209+ // }
210+ // unit.eFormVersion ??= "1.0.0";
211+ // if (int.Parse(unit.eFormVersion.Replace(".","")) > 3212)
212+ // {
213+ if ( hasImages )
207214 {
208- ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList . RemoveAt ( 1 ) ;
209- }
210- unit . eFormVersion ??= "1.0.0" ;
211- if ( int . Parse ( unit . eFormVersion . Replace ( "." , "" ) ) > 3212 )
212- {
213- if ( hasImages )
215+ // ((DataElement) mainElement.ElementList[0]).DataItemList.RemoveAt(1);
216+ // add a new show picture element for each picture in the picturesOfTasks list
217+ int j = 0 ;
218+ foreach ( var picture in picturesOfTasks )
214219 {
215- ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList . RemoveAt ( 1 ) ;
216- // add a new show picture element for each picture in the picturesOfTasks list
217- int j = 0 ;
218- foreach ( var picture in picturesOfTasks )
219- {
220- var showPicture = new ShowPicture ( j , false , false , "" , "" , "" , 0 , false , "" ) ;
221- var storageResult = sdkCore . GetFileFromS3Storage ( picture . Key ) . GetAwaiter ( ) . GetResult ( ) ;
220+ var showPicture = new ShowPicture ( j , false , false , "" , "" , "" , 0 , false , "" ) ;
221+ var storageResult = sdkCore . GetFileFromS3Storage ( picture . Key ) . GetAwaiter ( ) . GetResult ( ) ;
222222
223- await sdkCore . PngUpload ( storageResult . ResponseStream , picture . Value , picture . Key ) ;
224- showPicture . Value = picture . Value ;
225- ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList . Add ( showPicture ) ;
226- j ++ ;
227- }
223+ await sdkCore . PngUpload ( storageResult . ResponseStream , picture . Value , picture . Key ) ;
224+ showPicture . Value = picture . Value ;
225+ ( ( DataElement ) mainElement . ElementList [ 0 ] ) . DataItemList . Add ( showPicture ) ;
226+ j ++ ;
228227 }
229228 }
229+ // }
230230 var caseId = await sdkCore . CaseCreate ( mainElement , "" , ( int ) site . MicrotingUid ! , folderId ) . ConfigureAwait ( false ) ;
231231 var newWorkOrderCase = new WorkorderCase
232232 {
0 commit comments