-
Notifications
You must be signed in to change notification settings - Fork 11
/
EditLayoutSettings.ascx.vb
executable file
·1258 lines (1005 loc) · 74.5 KB
/
EditLayoutSettings.ascx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Imports DotNetNuke.Common
Imports DotNetNuke.Common.Utilities
Imports DotNetNuke.Entities.Tabs
Imports DotNetNuke.Services.Exceptions
Imports DotNetNuke.Services.Localization
Imports Ventrian.PropertyAgent.Mapping
Namespace Ventrian.PropertyAgent
Partial Public Class EditLayoutSettings
Inherits PropertyAgentBase
#Region " Private Members "
Dim _propertySettings As PropertySettings
#End Region
#Region " Private Methods "
Private Sub BindReplyTo()
For Each value As Integer In System.Enum.GetValues(GetType(ReplyToType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(ReplyToType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(ReplyToType), value), Me.LocalResourceFile)
If (value = ReplyToType.PortalAdmin) Then
li.Selected = True
End If
lstContactReply.Items.Add(li)
Next
End Sub
Private Sub BindLandingPageType()
For Each value As Integer In System.Enum.GetValues(GetType(LandingPageType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(LandingPageType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(LandingPageType), value), Me.LocalResourceFile)
If (value = ReplyToType.PortalAdmin) Then
li.Selected = True
End If
lstLandingPageType.Items.Add(li)
Next
End Sub
Private Sub BindLayoutType()
For Each value As Integer In System.Enum.GetValues(GetType(LatestLayoutType))
Dim objLayoutMode As LatestLayoutMode = CType(System.Enum.Parse(GetType(LatestLayoutType), value.ToString()), LatestLayoutType)
Dim li As New ListItem
li.Value = value.ToString()
li.Text = Localization.GetString(System.Enum.GetName(GetType(LatestLayoutType), value), Me.LocalResourceFile)
lstLayoutType.Items.Add(li)
lstLayoutTypeFeatured.Items.Add(New ListItem(li.Text, li.Value))
lstLayoutTypeTypes.Items.Add(New ListItem(li.Text, li.Value))
Next
lstLayoutType.Items(1).Selected = True
lstLayoutTypeFeatured.Items(1).Selected = True
lstLayoutTypeTypes.Items(1).Selected = True
End Sub
Private Sub BindBreadcrumbPlacement()
For Each value As Integer In System.Enum.GetValues(GetType(BreadcrumbType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(BreadcrumbType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(BreadcrumbType), value), Me.LocalResourceFile)
lstBreadcrumbPlacement.Items.Add(li)
Next
End Sub
Private Sub BindWatermarkPosition()
For Each value As Integer In System.Enum.GetValues(GetType(WatermarkPosition))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(WatermarkPosition), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(WatermarkPosition), value), Me.LocalResourceFile)
drpWatermarkPosition.Items.Add(li)
Next
End Sub
Private Sub BindContactFields()
Dim objContactFieldController As New ContactFieldController()
Dim objContactFields As List(Of ContactFieldInfo) = objContactFieldController.List(ModuleId)
drpContactLogField.DataSource = objContactFields
drpContactLogField.DataBind()
drpContactLogField.Items.Insert(0, New ListItem(Localization.GetString("NotSpecified", Me.LocalResourceFile), -1))
drpContactField.DataSource = CustomFields
drpContactField.DataBind()
drpContactField.Items.Insert(0, New ListItem(Localization.GetString("NotSpecified", Me.LocalResourceFile), -1))
drpContactCustomField.DataSource = Me.CustomFields
drpContactCustomField.DataBind()
drpContactCustomField.Items.Insert(0, New ListItem(Localization.GetString("NotSpecified", Me.LocalResourceFile), -1))
End Sub
Private Sub BindCurrency()
For Each value As Integer In System.Enum.GetValues(GetType(CurrencyType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(CurrencyType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(CurrencyType), value), Me.LocalResourceFile)
If (value = CurrencyType.USD) Then
li.Selected = True
End If
drpCurrency.Items.Add(li)
chkCurrencyAvailableList.Items.Add(New ListItem(li.Text, li.Value))
Next
End Sub
Private Sub BindEuroType()
For Each value As Integer In System.Enum.GetValues(GetType(EuroType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(EuroType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(EuroType), value), Me.LocalResourceFile)
If (value = EuroType.French) Then
li.Selected = True
End If
lstEuroFormat.Items.Add(li)
Next
End Sub
Private Sub BindDestination()
For Each value As Integer In System.Enum.GetValues(GetType(DestinationType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(DestinationType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(DestinationType), value), Me.LocalResourceFile)
If (value = DestinationType.PropertyOwner) Then
li.Selected = True
End If
lstContactDestination.Items.Add(li)
Next
End Sub
Private Sub BindDistance()
For Each value As Integer In System.Enum.GetValues(GetType(DistanceType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(DistanceType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(DistanceType), value), Me.LocalResourceFile)
If (value = DistanceType.Miles) Then
li.Selected = True
End If
lstDistanceType.Items.Add(li)
Next
End Sub
Private Sub BindExpiration()
drpDefaultExpiration.Items.Add(New ListItem(Localization.GetString("Day", Me.LocalResourceFile), "D"))
drpDefaultExpiration.Items.Add(New ListItem(Localization.GetString("Month", Me.LocalResourceFile), "M"))
drpDefaultExpiration.Items.Add(New ListItem(Localization.GetString("Year", Me.LocalResourceFile), "Y"))
For Each objCustomField As CustomFieldInfo In CustomFields
If (objCustomField.FieldType = CustomFieldType.OneLineTextBox) Then
If (objCustomField.ValidationType = CustomFieldValidationType.Date) Then
drpBindExpiry.Items.Add(New ListItem(objCustomField.Caption, objCustomField.CustomFieldID.ToString()))
End If
End If
Next
drpBindExpiry.Items.Insert(0, New ListItem(Localization.GetString("NotSpecified", Me.LocalResourceFile), -1))
End Sub
Private Sub BindPages()
drpRedirectPage.DataSource = TabController.GetPortalTabs(PortalId, TabId, True, False)
drpRedirectPage.DataBind()
End Sub
Private Sub BindSortOrderGrid()
grdLandingPageSortOrder.DataSource = Me.PropertySettings(True).LandingPageSections.Split(","c)
grdLandingPageSortOrder.DataBind()
End Sub
Private Sub BindRedirect()
For Each value As Integer In System.Enum.GetValues(GetType(RedirectType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(RedirectType), value)
li.Text = Localization.GetString("Redirect" & System.Enum.GetName(GetType(RedirectType), value), Me.LocalResourceFile)
If (value = RedirectType.PropertyManager) Then
li.Selected = True
End If
lstRedirectType.Items.Add(li)
Next
End Sub
Private Sub BindSortBy()
For Each value As Integer In System.Enum.GetValues(GetType(SortByType))
Dim objSortByType As SortByType = CType(System.Enum.Parse(GetType(SortByType), value.ToString()), SortByType)
If (objSortByType = SortByType.CustomField) Then
Dim objCustomFieldController As New CustomFieldController
Dim objCustomFields As List(Of CustomFieldInfo) = objCustomFieldController.List(Me.ModuleId, True)
For Each objCustomField As CustomFieldInfo In objCustomFields
If (objCustomField.IsSortable) Then
Dim li As New ListItem
li.Value = "cf" & objCustomField.CustomFieldID.ToString()
li.Text = objCustomField.Caption
drpSortBy.Items.Add(li)
drpFeaturedSortBy.Items.Add(New ListItem(li.Text, li.Value))
drpPropertyManagerSortBy.Items.Add(New ListItem(li.Text, li.Value))
End If
Next
Else
If (objSortByType = SortByType.ReviewField) Then
Dim objReviewFieldController As New ReviewFieldController
Dim objReviewFields As List(Of ReviewFieldInfo) = objReviewFieldController.List(Me.ModuleId)
For Each objReviewField As ReviewFieldInfo In objReviewFields
If (objReviewField.FieldType = ReviewFieldType.Rating) Then
Dim li As New ListItem
li.Value = "rf" & objReviewField.ReviewFieldID.ToString()
li.Text = objReviewField.Caption
drpSortBy.Items.Add(li)
drpFeaturedSortBy.Items.Add(New ListItem(li.Text, li.Value))
drpPropertyManagerSortBy.Items.Add(New ListItem(li.Text, li.Value))
End If
Next
Else
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(SortByType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(SortByType), value), Me.LocalResourceFile)
drpSortBy.Items.Add(li)
drpFeaturedSortBy.Items.Add(New ListItem(li.Text, li.Value))
drpPropertyManagerSortBy.Items.Add(New ListItem(li.Text, li.Value))
End If
End If
Next
For Each value As Integer In System.Enum.GetValues(GetType(PropertyTypeSortByType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(PropertyTypeSortByType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(PropertyTypeSortByType), value), Me.LocalResourceFile)
drpTypesSortBy.Items.Add(li)
Next
For Each value As Integer In System.Enum.GetValues(GetType(SortByTypeSecondary))
Dim objSortByType As SortByTypeSecondary = CType(System.Enum.Parse(GetType(SortByTypeSecondary), value.ToString()), SortByTypeSecondary)
If (objSortByType = SortByType.CustomField) Then
Dim objCustomFieldController As New CustomFieldController
Dim objCustomFields As List(Of CustomFieldInfo) = objCustomFieldController.List(Me.ModuleId, True)
For Each objCustomField As CustomFieldInfo In objCustomFields
If (objCustomField.IsSortable) Then
Dim li As New ListItem
li.Value = "cf" & objCustomField.CustomFieldID.ToString()
li.Text = objCustomField.Caption
drpSortBySecondary.Items.Add(li)
drpSortByTertiary.Items.Add(New ListItem(li.Text, li.Value))
End If
Next
Else
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(SortByType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(SortByType), value), Me.LocalResourceFile)
drpSortBySecondary.Items.Add(li)
drpSortByTertiary.Items.Add(New ListItem(li.Text, li.Value))
End If
Next
End Sub
Private Sub BindSortDirection()
For Each value As Integer In System.Enum.GetValues(GetType(SortDirectionType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(SortDirectionType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(SortDirectionType), value), Me.LocalResourceFile)
If (value = SortDirectionType.Descending) Then
li.Selected = True
End If
drpSortDirection.Items.Add(li)
drpFeaturedSortdirection.Items.Add(New ListItem(li.Text, li.Value))
drpPropertyManagerSortDirection.Items.Add(New ListItem(li.Text, li.Value))
drpSortDirectionSecondary.Items.Add(New ListItem(li.Text, li.Value))
drpSortDirectionTertiary.Items.Add(New ListItem(li.Text, li.Value))
Next
End Sub
Private Sub BindRepeatDirection()
For Each value As Integer In System.Enum.GetValues(GetType(RepeatDirection))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(RepeatDirection), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(RepeatDirection), value), Me.LocalResourceFile)
If (value = RepeatDirection.Horizontal) Then
li.Selected = True
End If
drpTypesRepeatDirection.Items.Add(li)
Next
End Sub
Private Sub BindUpload()
For Each value As Integer In System.Enum.GetValues(GetType(UploadType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(UploadType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(UploadType), value), Me.LocalResourceFile)
If (value = UploadType.Flash) Then
li.Selected = True
End If
lstUploadMode.Items.Add(li)
Next
End Sub
Private Sub BindUploadPlacement()
For Each value As Integer In System.Enum.GetValues(GetType(UploadPlacementType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(UploadPlacementType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(UploadPlacementType), value), Me.LocalResourceFile)
If (value = UploadPlacementType.SeparatePage) Then
li.Selected = True
End If
lstUploadPlacement.Items.Add(li)
Next
End Sub
Private Sub BindTitleReplacement()
For Each value As Integer In System.Enum.GetValues(GetType(TitleReplacementType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(TitleReplacementType), value)
li.Text = Localization.GetString(System.Enum.GetName(GetType(TitleReplacementType), value), Me.LocalResourceFile)
lstSEOTitleReplacement.Items.Add(li)
Next
End Sub
Private Sub BindSettings()
BindReplyTo()
BindLandingPageType()
BindLayoutType()
BindBreadcrumbPlacement()
BindWatermarkPosition()
BindCurrency()
BindDestination()
BindDistance()
BindEuroType()
BindPages()
BindRedirect()
BindSortFields()
BindSortOrderGrid()
BindSortBy()
BindSortDirection()
BindRepeatDirection()
BindExpiration()
BindUpload()
BindUploadPlacement()
BindTitleReplacement()
BindContactFields()
txtMainLabel.Text = Me.PropertySettings.MainLabel
txtPropertyLabel.Text = Me.PropertySettings.PropertyLabel
txtPropertyPluralLabel.Text = Me.PropertySettings.PropertyPluralLabel
txtPropertyTypeLabel.Text = Me.PropertySettings.PropertyTypeLabel
txtPropertyTypePluralLabel.Text = Me.PropertySettings.PropertyTypePluralLabel
txtLocationLabel.Text = Me.PropertySettings.LocationLabel
txtAgentLabel.Text = Me.PropertySettings.AgentLabel
txtAgentPluralLabel.Text = Me.PropertySettings.AgentPluralLabel
txtBrokerLabel.Text = Me.PropertySettings.BrokerLabel
txtBrokerPluralLabel.Text = Me.PropertySettings.BrokerPluralLabel
txtShortListLabel.Text = Me.PropertySettings.ShortListLabel
If (lstLandingPageType.Items.FindByValue(PropertySettings.LandingPageMode.ToString()) IsNot Nothing) Then
lstLandingPageType.SelectedValue = PropertySettings.LandingPageMode.ToString()
End If
chkFeaturedEnabled.Checked = Me.PropertySettings.FeaturedEnabled
If Not (lstLayoutTypeFeatured.Items.FindByValue(Convert.ToInt32(Me.PropertySettings.FeaturedLayoutType).ToString()) Is Nothing) Then
lstLayoutTypeFeatured.SelectedValue = Convert.ToInt32(Me.PropertySettings.FeaturedLayoutType).ToString()
End If
txtFeaturedItemsPerRow.Text = Me.PropertySettings.FeaturedItemsPerRow.ToString()
txtFeaturedMaxNumber.Text = Me.PropertySettings.FeaturedMaxNumber.ToString()
If (Me.PropertySettings.FeaturedSortBy = SortByType.CustomField) Then
If Not (drpFeaturedSortBy.Items.FindByValue("cf" & Me.PropertySettings.FeaturedSortByCustomField) Is Nothing) Then
drpFeaturedSortBy.SelectedValue = "cf" & Me.PropertySettings.FeaturedSortByCustomField
End If
Else
If (Me.PropertySettings.FeaturedSortBy = SortByType.ReviewField) Then
If Not (drpFeaturedSortBy.Items.FindByValue("rf" & Me.PropertySettings.FeaturedSortByCustomField) Is Nothing) Then
drpFeaturedSortBy.SelectedValue = "rf" & Me.PropertySettings.FeaturedSortByCustomField
End If
Else
If Not (drpFeaturedSortBy.Items.FindByValue(Me.PropertySettings.FeaturedSortBy.ToString()) Is Nothing) Then
drpFeaturedSortBy.SelectedValue = Me.PropertySettings.FeaturedSortBy.ToString()
End If
End If
End If
If Not (drpFeaturedSortdirection.Items.FindByValue(Me.PropertySettings.FeaturedSortDirection.ToString()) Is Nothing) Then
drpFeaturedSortdirection.SelectedValue = Me.PropertySettings.FeaturedSortDirection.ToString()
End If
chkSearchEnabled.Checked = Me.PropertySettings.SearchEnabled
chkSearchHideHelpIcon.Checked = Me.PropertySettings.SearchHideHelpIcon
chkSearchHideTypesCount.Checked = Me.PropertySettings.SearchHideTypesCount
chkSearchHideZeroTypes.Checked = Me.PropertySettings.SearchHideZeroTypes
chkSearchWildard.Checked = Me.PropertySettings.SearchWildcard
chkSearchTypes.Checked = Me.PropertySettings.SearchTypes
chkSearchLocation.Checked = Me.PropertySettings.SearchLocation
chkSearchAgents.Checked = Me.PropertySettings.SearchAgents
chkSearchBrokers.Checked = Me.PropertySettings.SearchBrokers
txtSearchWidth.Text = Me.PropertySettings.SearchWidth.ToString()
txtSearchStyle.Text = Me.PropertySettings.SearchStyle
If Not (lstLayoutTypeTypes.Items.FindByValue(Convert.ToInt32(Me.PropertySettings.TypesLayoutType).ToString()) Is Nothing) Then
lstLayoutTypeTypes.SelectedValue = Convert.ToInt32(Me.PropertySettings.TypesLayoutType).ToString()
End If
chkTypesEnabled.Checked = Me.PropertySettings.TypesEnabled
chkTypesHideZero.Checked = Me.PropertySettings.TypesHideZero
txtTypesItemsPerRow.Text = Me.PropertySettings.TypesItemsPerRow.ToString()
If Not (drpTypesRepeatdirection.Items.FindByValue(Me.PropertySettings.TypesRepeatDirection.ToString()) Is Nothing) Then
drpTypesRepeatdirection.SelectedValue = Me.PropertySettings.TypesRepeatDirection.ToString()
End If
If Not (drpTypesSortBy.Items.FindByValue(Me.PropertySettings.TypesSortBy.ToString()) Is Nothing) Then
drpTypesSortBy.SelectedValue = Me.PropertySettings.TypesSortBy.ToString()
End If
txtListingItemsPerRow.Text = Me.PropertySettings.ListingItemsPerRow.ToString()
txtListingItemsPerPage.Text = Me.PropertySettings.ListingItemsPerPage.ToString()
If Not (lstLayoutType.Items.FindByValue(Convert.ToInt32(Me.PropertySettings.ListingLayoutType).ToString()) Is Nothing) Then
lstLayoutType.SelectedValue = Convert.ToInt32(Me.PropertySettings.ListingLayoutType).ToString()
End If
If (Me.PropertySettings.ListingSortBy = SortByType.CustomField) Then
If Not (drpSortBy.Items.FindByValue("cf" & Me.PropertySettings.ListingSortByCustomField) Is Nothing) Then
drpSortBy.SelectedValue = "cf" & Me.PropertySettings.ListingSortByCustomField
End If
Else
If (Me.PropertySettings.ListingSortBy = SortByType.CustomField) Then
If Not (drpSortBy.Items.FindByValue("rf" & Me.PropertySettings.ListingSortByCustomField) Is Nothing) Then
drpSortBy.SelectedValue = "rf" & Me.PropertySettings.ListingSortByCustomField
End If
Else
If Not (drpSortBy.Items.FindByValue(Me.PropertySettings.ListingSortBy.ToString()) Is Nothing) Then
drpSortBy.SelectedValue = Me.PropertySettings.ListingSortBy.ToString()
End If
End If
End If
If Not (drpSortdirection.Items.FindByValue(Me.PropertySettings.ListingSortDirection.ToString()) Is Nothing) Then
drpSortdirection.SelectedValue = Me.PropertySettings.ListingSortDirection.ToString()
End If
If (Me.PropertySettings.ListingSortBy2 = SortByType.CustomField) Then
If Not (drpSortBySecondary.Items.FindByValue("cf" & Me.PropertySettings.ListingSortByCustomField2) Is Nothing) Then
drpSortBySecondary.SelectedValue = "cf" & Me.PropertySettings.ListingSortByCustomField2
End If
Else
If (Me.PropertySettings.ListingSortBy2 = SortByType.CustomField) Then
If Not (drpSortBySecondary.Items.FindByValue("rf" & Me.PropertySettings.ListingSortByCustomField2) Is Nothing) Then
drpSortBySecondary.SelectedValue = "rf" & Me.PropertySettings.ListingSortByCustomField2
End If
Else
If Not (drpSortBySecondary.Items.FindByValue(Me.PropertySettings.ListingSortBy2.ToString()) Is Nothing) Then
drpSortBySecondary.SelectedValue = Me.PropertySettings.ListingSortBy2.ToString()
End If
End If
End If
If Not (drpSortDirectionTertiary.Items.FindByValue(Me.PropertySettings.ListingSortDirection2.ToString()) Is Nothing) Then
drpSortDirectionSecondary.SelectedValue = Me.PropertySettings.ListingSortDirection2.ToString()
End If
If (Me.PropertySettings.ListingSortBy3 = SortByType.CustomField) Then
If Not (drpSortByTertiary.Items.FindByValue("cf" & Me.PropertySettings.ListingSortByCustomField3) Is Nothing) Then
drpSortByTertiary.SelectedValue = "cf" & Me.PropertySettings.ListingSortByCustomField3
End If
Else
If (Me.PropertySettings.ListingSortBy3 = SortByType.CustomField) Then
If Not (drpSortByTertiary.Items.FindByValue("rf" & Me.PropertySettings.ListingSortByCustomField3) Is Nothing) Then
drpSortByTertiary.SelectedValue = "rf" & Me.PropertySettings.ListingSortByCustomField3
End If
Else
If Not (drpSortByTertiary.Items.FindByValue(Me.PropertySettings.ListingSortBy3.ToString()) Is Nothing) Then
drpSortByTertiary.SelectedValue = Me.PropertySettings.ListingSortBy3.ToString()
End If
End If
End If
If Not (drpSortDirectionTertiary.Items.FindByValue(Me.PropertySettings.ListingSortDirection3.ToString()) Is Nothing) Then
drpSortDirectionTertiary.SelectedValue = Me.PropertySettings.ListingSortDirection3.ToString()
End If
chkBubbleFeatured.Checked = Me.PropertySettings.ListingBubbleFeatured
chkSearchSubTypes.Checked = Me.PropertySettings.ListingSearchSubTypes
chkPassSearchValues.Checked = Me.PropertySettings.ListingPassSearchValues
chkUserSortable.Checked = Me.PropertySettings.ListingUserSortable
For Each li As ListItem In lstSortFields.Items
For Each item As String In PropertySettings.ListingSortFields.Split(","c)
If (li.Value = item) Then
li.Selected = True
End If
Next
Next
chkHideAuthorDetails.Checked = Me.PropertySettings.PropertyManagerHideAuthorDetails
chkHidePublishingDetails.Checked = Me.PropertySettings.PropertyManagerHidePublishingDetails
If Not (drpPropertyManagerRecordsPerPage.Items.FindByValue(Me.PropertySettings.PropertyManagerItemsPerPage.ToString()) Is Nothing) Then
drpPropertyManagerRecordsPerPage.SelectedValue = Me.PropertySettings.PropertyManagerItemsPerPage.ToString()
End If
If (Me.PropertySettings.PropertyManagerSortBy = SortByType.CustomField) Then
If Not (drpPropertyManagerSortBy.Items.FindByValue("cf" & Me.PropertySettings.PropertyManagerSortByCustomField) Is Nothing) Then
drpPropertyManagerSortBy.SelectedValue = "cf" & Me.PropertySettings.PropertyManagerSortByCustomField
End If
Else
If (Me.PropertySettings.PropertyManagerSortBy = SortByType.CustomField) Then
If Not (drpPropertyManagerSortBy.Items.FindByValue("rf" & Me.PropertySettings.PropertyManagerSortByCustomField) Is Nothing) Then
drpPropertyManagerSortBy.SelectedValue = "rf" & Me.PropertySettings.PropertyManagerSortByCustomField
End If
Else
If Not (drpPropertyManagerSortBy.Items.FindByValue(Me.PropertySettings.PropertyManagerSortBy.ToString()) Is Nothing) Then
drpPropertyManagerSortBy.SelectedValue = Me.PropertySettings.PropertyManagerSortBy.ToString()
End If
End If
End If
If Not (drpPropertyManagerSortDirection.Items.FindByValue(Me.PropertySettings.PropertyManagerSortDirection.ToString()) Is Nothing) Then
drpPropertyManagerSortDirection.SelectedValue = Me.PropertySettings.PropertyManagerSortDirection.ToString()
End If
chkImagesEnabled.Checked = Me.PropertySettings.ImagesEnabled
chkHighQuality.Checked = Me.PropertySettings.HighQuality
chkIncludejQuery.Checked = Me.PropertySettings.IncludejQuery
txtSmallWidth.Text = Me.PropertySettings.SmallWidth.ToString()
txtSmallHeight.Text = Me.PropertySettings.SmallHeight.ToString()
txtMediumWidth.Text = Me.PropertySettings.MediumWidth.ToString()
txtMediumHeight.Text = Me.PropertySettings.MediumHeight.ToString()
txtLargeWidth.Text = Me.PropertySettings.LargeWidth.ToString()
txtLargeHeight.Text = Me.PropertySettings.LargeHeight.ToString()
txtImagesItemsPerRow.Text = Me.PropertySettings.ImagesItemsPerRow.ToString()
chkUseWatermark.Checked = Me.PropertySettings.WatermarkEnabled
txtWatermarkText.Text = Me.PropertySettings.WatermarkText
ctlWatermarkImage.Url = Me.PropertySettings.WatermarkImage
If Not (drpWatermarkPosition.Items.FindByValue(PropertySettings.WatermarkPosition.ToString()) Is Nothing) Then
drpWatermarkPosition.SelectedValue = PropertySettings.WatermarkPosition.ToString()
End If
txtImageCategories.Text = Me.PropertySettings.ImageCategories
If (lstBreadcrumbPlacement.Items.FindByValue(PropertySettings.BreadcrumbPlacement.ToString()) IsNot Nothing) Then
lstBreadcrumbPlacement.SelectedValue = PropertySettings.BreadcrumbPlacement.ToString()
End If
If (Me.PropertySettings.CustomFieldExpiration <> Null.NullInteger) Then
If (drpBindExpiry.Items.FindByValue(Me.PropertySettings.CustomFieldExpiration.ToString()) IsNot Nothing) Then
drpBindExpiry.SelectedValue = Me.PropertySettings.CustomFieldExpiration.ToString()
End If
End If
If (Me.PropertySettings.DefaultExpiration <> Null.NullInteger) Then
txtdefaultExpiration.Text = Me.PropertySettings.DefaultExpiration.ToString()
End If
If Not (drpDefaultExpiration.Items.FindByValue(Me.PropertySettings.DefaultExpirationPeriod) Is Nothing) Then
drpDefaultExpiration.SelectedValue = Me.PropertySettings.DefaultExpirationPeriod
End If
txtFieldWidth.Text = Me.PropertySettings.FieldWidth.ToString()
txtCheckBoxListItemsPerRow.Text = Me.PropertySettings.CheckBoxItemsPerRow.ToString()
txtRadioButtonItemsPerRow.Text = Me.PropertySettings.RadioButtonItemsPerRow.ToString()
txtButtonClass.Text = Me.PropertySettings.ButtonClass
chkCachePropertyValues.Checked = Me.PropertySettings.CachePropertyValues
chkHideTypes.Checked = Me.PropertySettings.HideTypes
chkTypeParams.Checked = Me.PropertySettings.TypeParams
chkLockDownPropertyType.Checked = Me.PropertySettings.LockDownPropertyType
chkLockDownPropertyDates.Checked = Me.PropertySettings.LockDownPropertyDates
chkLockDownFeatured.Checked = Me.PropertySettings.LockDownFeatured
If Not (drpRedirectPage.Items.FindByValue(Me.PropertySettings.RedirectPage.ToString()) Is Nothing) Then
drpRedirectPage.SelectedValue = Me.PropertySettings.RedirectPage.ToString()
End If
If Not (lstRedirectType.Items.FindByValue(Me.PropertySettings.RedirectType.ToString()) Is Nothing) Then
lstRedirectType.SelectedValue = Me.PropertySettings.RedirectType.ToString()
End If
trRedirectPage.Visible = (PropertySettings.RedirectType = RedirectType.Page)
If Not (lstUploadMode.Items.FindByValue(Me.PropertySettings.UploadMode.ToString()) Is Nothing) Then
lstUploadMode.SelectedValue = Me.PropertySettings.UploadMode.ToString()
End If
If Not (lstUploadPlacement.Items.FindByValue(Me.PropertySettings.UploadPlacement.ToString()) Is Nothing) Then
lstUploadPlacement.SelectedValue = Me.PropertySettings.UploadPlacement.ToString()
End If
chkProtectXSS.Checked = Me.PropertySettings.ProtectXSS
chkAgentDropdown.Checked = Me.PropertySettings.AgentDropdownDefault
txtMaxUploadLimit.Text = Me.PropertySettings.MaxUploadLimit
If Not (lstContactdestination.Items.FindByValue(Me.PropertySettings.ContactDestination.ToString()) Is Nothing) Then
lstContactdestination.SelectedValue = Me.PropertySettings.ContactDestination.ToString()
End If
trContactCustomEmail.Visible = (Me.PropertySettings.ContactDestination = DestinationType.CustomEmail)
trContactField.Visible = (Me.PropertySettings.ContactDestination = DestinationType.CustomField)
txtContactCustomEmail.Text = Me.PropertySettings.ContactCustomEmail
If Not (lstContactReply.Items.FindByValue(Me.PropertySettings.ContactReplyTo.ToString()) Is Nothing) Then
lstContactReply.SelectedValue = Me.PropertySettings.ContactReplyTo.ToString()
End If
txtContactBCC.Text = Me.PropertySettings.ContactBCC
txtContactMessageLines.Text = Me.PropertySettings.ContactMessageLines.ToString()
txtContactWidth.Text = Me.PropertySettings.ContactWidth.ToString()
chkHideEmail.Checked = Me.PropertySettings.ContactHideEmail
chkHideName.Checked = Me.PropertySettings.ContactHideName
chkHidePhone.Checked = Me.PropertySettings.ContactHidePhone
chkRequireEmail.Checked = Me.PropertySettings.ContactRequireEmail
chkRequireName.Checked = Me.PropertySettings.ContactRequireName
chkRequirePhone.Checked = Me.PropertySettings.ContactRequirePhone
chkContactUseCaptcha.Checked = Me.PropertySettings.ContactUseCaptcha
If (drpContactLogField.Items.FindByValue(Me.PropertySettings.ContactLogField.ToString()) IsNot Nothing) Then
drpContactLogField.SelectedValue = Me.PropertySettings.ContactLogField.ToString()
End If
If (drpContactField.Items.FindByValue(Me.PropertySettings.ContactField.ToString()) IsNot Nothing) Then
drpContactField.SelectedValue = Me.PropertySettings.ContactField.ToString()
End If
If (drpContactCustomField.Items.FindByValue(Me.PropertySettings.ContactCustomField.ToString()) IsNot Nothing) Then
drpContactCustomField.SelectedValue = Me.PropertySettings.ContactCustomField.ToString()
End If
If (drpCurrency.Items.FindByValue(Me.PropertySettings.Currency.ToString()) IsNot Nothing) Then
drpCurrency.SelectedValue = Me.PropertySettings.Currency.ToString()
End If
If (lstEuroFormat.Items.FindByValue(Me.PropertySettings.EuroType.ToString()) IsNot Nothing) Then
lstEuroFormat.SelectedValue = Me.PropertySettings.EuroType.ToString()
End If
chkCurrencyShowAll.Checked = Me.PropertySettings.CurrencyShowAll
chkCurrencyAvailableList.Visible = Not chkCurrencyShowAll.Checked
txtCurrencyDecimalPlaces.Text = Me.PropertySettings.CurrencyDecimalPlaces.ToString()
For Each currency As String In PropertySettings.CurrencyAvailable.Split(","c)
For Each li As ListItem In chkCurrencyAvailableList.Items
If (li.Value = currency) Then
li.Selected = True
End If
Next
Next
chkEnableMaps.Checked = Me.PropertySettings.MapEnable
txtMapKey.Text = Me.PropertySettings.MapKey
txtMapHeight.Text = Me.PropertySettings.MapHeight.ToString()
txtMapWidth.Text = Me.PropertySettings.MapWidth.ToString()
txtMapZoom.Text = Me.PropertySettings.MapZoom.ToString()
txtDistanceExpression.Text = Me.PropertySettings.DistanceExpression
If Not (lstDistanceType.Items.FindByValue(Me.PropertySettings.DistanceType.ToString()) Is Nothing) Then
lstDistanceType.SelectedValue = Me.PropertySettings.DistanceType.ToString()
End If
chkNotificationNotifyApprovers.Checked = Me.PropertySettings.NotificationNotifyApprovers
txtNotificationEmail.Text = Me.PropertySettings.NotificationEmail
chkNotifyBroker.Checked = Me.PropertySettings.NotificationNotifyBroker
chkNotifyOwner.Checked = Me.PropertySettings.NotificationNotifyOwner
txtCommentWidth.Text = Me.PropertySettings.CommentWidth.ToString()
chkUseCaptcha.Checked = Me.PropertySettings.CommentUseCaptcha
chkCommentNotifyOwner.Checked = Me.PropertySettings.CommentNotifyOwner
txtCommentEmail.Text = Me.PropertySettings.CommentNotifyEmail
chkRssEnable.Checked = Me.PropertySettings.RssEnable
txtRssMaxRecords.Text = Me.PropertySettings.RssMaxRecords.ToString()
txtRssTitleLatest.Text = Me.PropertySettings.RssTitleLatest(False)
txtRssTitleType.Text = Me.PropertySettings.RssTitleType("", False)
txtRssTitleSearchResult.Text = Me.PropertySettings.RssTitleSearchResult(False)
txtFriendBCC.Text = Me.PropertySettings.FriendBCC
txtFriendWidth.Text = Me.PropertySettings.FriendWidth.ToString()
chkCoreSearchEnable.Checked = Me.PropertySettings.CoreSearchEnabled
txtCoreSearchTitle.Text = Me.PropertySettings.CoreSearchTitle
txtCoreSearchDescription.Text = Me.PropertySettings.CoreSearchDescription
txtReviewWidth.Text = Me.PropertySettings.ReviewWidth.ToString()
chkReviewModeration.Checked = Me.PropertySettings.ReviewModeration.ToString()
txtReviewEmail.Text = Me.PropertySettings.ReviewEmail.ToString()
chkReviewAnonymous.Checked = Me.PropertySettings.ReviewAnonymous.ToString()
chkSEORedirect.Checked = Me.PropertySettings.SEORedirect
txtSEOAgentType.Text = Me.PropertySettings.SEOAgentType
txtSEOPropertyID.Text = Me.PropertySettings.SEOPropertyID
txtSEOPropertyTypeID.Text = Me.PropertySettings.SEOPropertyTypeID
txtSEOViewPropertyTitle.Text = Me.PropertySettings.SEOViewPropertyTitle
txtSEOViewTypeTitle.Text = Me.PropertySettings.SEOViewTypeTitle
If (lstSEOTitleReplacement.Items.FindByValue(Me.PropertySettings.SEOTitleReplacement.ToString()) IsNot Nothing) Then
lstSEOTitleReplacement.SelectedValue = Me.PropertySettings.SEOTitleReplacement.ToString()
End If
chkSEOCanonicalLink.Checked = Me.PropertySettings.SEOCanonicalLink
chkTemplateIncludeStylesheet.Checked = Me.PropertySettings.TemplateIncludeStylesheet
chkXmlEnable.Checked = Me.PropertySettings.XmlEnable
txtXmlMaxRecords.Text = Me.PropertySettings.XmlMaxRecords.ToString()
Dim xmlLink As String = NavigateURL(Me.TabId, "", "agentType=xml")
If (xmlLink.ToLower().StartsWith("http")) Then
lblXmlUrl.Text = xmlLink
Else
lblXmlUrl.Text = AddHTTP(System.Web.HttpContext.Current.Request.Url.Host & xmlLink)
End If
End Sub
Private Sub BindCrumbs()
Dim crumbs As New ArrayList
Dim objCrumbMain As New CrumbInfo
objCrumbMain.Caption = PropertySettings.MainLabel
objCrumbMain.Url = NavigateURL()
crumbs.Add(objCrumbMain)
Dim objLayoutSettings As New CrumbInfo
objLayoutSettings.Caption = Localization.GetString("EditLayoutSettings", LocalResourceFile)
objLayoutSettings.Url = NavigateURL(Me.TabId, "", PropertySettings.SEOAgentType & "=EditLayoutSettings")
crumbs.Add(objLayoutSettings)
If (PropertySettings.BreadcrumbPlacement = BreadcrumbType.Portal) Then
For i As Integer = 0 To crumbs.Count - 1
Dim objCrumb As CrumbInfo = crumbs(i)
If (i > 0) Then
Dim objTab As New DotNetNuke.Entities.Tabs.TabInfo
objTab.TabID = -8888 + i
objTab.TabName = objCrumb.Caption
objTab.Url = objCrumb.Url
PortalSettings.ActiveTab.BreadCrumbs.Add(objTab)
End If
Next
End If
If (PropertySettings.BreadcrumbPlacement = BreadcrumbType.Module) Then
rptBreadCrumbs.DataSource = crumbs
rptBreadCrumbs.DataBind()
End If
End Sub
Private Sub BindSortFields()
For Each value As Integer In System.Enum.GetValues(GetType(SortByType))
Dim objSortByType As SortByType = CType(System.Enum.Parse(GetType(SortByType), value.ToString()), SortByType)
lstSortFields.Items.Add(New ListItem(Localization.GetString(System.Enum.GetName(GetType(SortByType), value), Me.LocalResourceFile), System.Enum.GetName(GetType(SortByType), value)))
Next
End Sub
#End Region
#Region " Event Handlers "
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
Try
BindCrumbs()
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
If (Page.IsPostBack = False) Then
BindSettings()
End If
cmdUpdate.CssClass = PropertySettings.ButtonClass
cmdCancel.CssClass = PropertySettings.ButtonClass
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Try
If (Page.IsValid) Then
Dim objModules As New DotNetNuke.Entities.Modules.ModuleController
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MAIN_LABEL_SETTING, txtMainLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_LABEL_SETTING, txtPropertyLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_PLURAL_LABEL_SETTING, txtPropertyPluralLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_TYPE_LABEL_SETTING, txtPropertyTypeLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_TYPE_PLURAL_LABEL_SETTING, txtPropertyTypePluralLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.LOCATION_LABEL_SETTING, txtLocationLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.AGENT_LABEL_SETTING, txtAgentLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.AGENT_PLURAL_LABEL_SETTING, txtAgentPluralLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.BROKER_LABEL_SETTING, txtBrokerLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.BROKER_PLURAL_LABEL_SETTING, txtBrokerPluralLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.SHORTLIST_LABEL_SETTING, txtShortListLabel.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.LANDING_PAGE_MODE_SETTING, lstLandingPageType.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_ENABLED_SETTING, chkFeaturedEnabled.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_LAYOUT_TYPE_SETTING, lstLayoutTypeFeatured.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_MAX_NUMBER_SETTING, txtFeaturedMaxNumber.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_ITEMS_PER_ROW_SETTING, txtFeaturedItemsPerRow.Text)
Dim objFeaturedSortByType As SortByType = SortByType.CustomField
Dim featuredSortByID As Integer = Null.NullInteger
If (drpFeaturedSortBy.SelectedValue.StartsWith("cf")) Then
featuredSortByID = Convert.ToInt32(drpFeaturedSortBy.SelectedValue.Replace("cf", ""))
Else
If (drpFeaturedSortBy.SelectedValue.StartsWith("rf")) Then
objFeaturedSortByType = SortByType.ReviewField
featuredSortByID = Convert.ToInt32(drpFeaturedSortBy.SelectedValue.Replace("rf", ""))
Else
objFeaturedSortByType = CType(System.Enum.Parse(GetType(SortByType), drpFeaturedSortBy.SelectedValue.ToString()), SortByType)
End If
End If
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_SORT_BY_SETTING, objFeaturedSortByType.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_SORT_BY_CUSTOM_FIELD_SETTING, featuredSortByID.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.FEATURED_SORT_DIRECTION_SETTING, drpFeaturedSortdirection.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_ENABLED_SETTING, chkSearchEnabled.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_HIDE_HELP_ICON_SETTING, chkSearchHideHelpIcon.Checked)
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_HIDE_TYPES_COUNT_SETTING, chkSearchHideTypesCount.Checked)
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_HIDE_ZERO_TYPES_SETTING, chkSearchHideZeroTypes.Checked)
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_WILDCARD_SETTING, chkSearchWildard.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_TYPES_SETTING, chkSearchTypes.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_LOCATION_SETTING, chkSearchLocation.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_AGENTS_SETTING, chkSearchAgents.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_BROKERS_SETTING, chkSearchBrokers.Checked.ToString())
If (Convert.ToInt32(txtSearchWidth.Text) > 0) Then
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_AREA_WIDTH_SETTING, txtSearchWidth.Text.ToString())
End If
objModules.UpdateModuleSetting(ModuleId, Constants.SEARCH_STYLE_SETTING, txtSearchStyle.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.TYPES_ENABLED_SETTING, chkTypesEnabled.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.TYPES_LAYOUT_TYPE_SETTING, lstLayoutTypeTypes.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.TYPES_HIDE_ZERO_SETTING, chkTypesHideZero.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.TYPES_ITEMS_PER_ROW_SETTING, txtTypesItemsPerRow.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.TYPES_REPEAT_DIRECTION_SETTING, drpTypesRepeatdirection.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.TYPES_SORT_BY_SETTING, drpTypesSortBy.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_LAYOUT_TYPE_SETTING, lstLayoutType.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_ITEMS_PER_ROW_SETTING, txtListingItemsPerRow.Text)
If (Convert.ToInt32(txtListingItemsPerPage.Text) > 0) Then
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_ITEMS_PER_PAGE_SETTING, txtListingItemsPerPage.Text)
End If
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_BUBBLE_FEATURED_SETTING, chkBubbleFeatured.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SEARCH_SUB_TYPES_SETTING, chkSearchSubTypes.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_PASS_SEARCH_VALUES_SETTING, chkPassSearchValues.Checked.ToString())
Dim objSortByType As SortByType = SortByType.CustomField
Dim sortByID As Integer = Null.NullInteger
If (drpSortBy.SelectedValue.StartsWith("cf")) Then
sortByID = Convert.ToInt32(drpSortBy.SelectedValue.Replace("cf", ""))
Else
If (drpSortBy.SelectedValue.StartsWith("rf")) Then
objSortByType = SortByType.ReviewField
sortByID = Convert.ToInt32(drpSortBy.SelectedValue.Replace("rf", ""))
Else
objSortByType = CType(System.Enum.Parse(GetType(SortByType), drpSortBy.SelectedValue.ToString()), SortByType)
End If
End If
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_BY_SETTING, objSortByType.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_BY_CUSTOM_FIELD_SETTING, sortByID.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_DIRECTION_SETTING, drpSortdirection.SelectedValue)
Dim objSortByTypeSecondary As SortByType = SortByType.CustomField
Dim sortByIDSecondary As Integer = Null.NullInteger
If (drpSortBySecondary.SelectedValue.StartsWith("cf")) Then
sortByIDSecondary = Convert.ToInt32(drpSortBySecondary.SelectedValue.Replace("cf", ""))
Else
If (drpSortBySecondary.SelectedValue.StartsWith("rf")) Then
objSortByTypeSecondary = SortByType.ReviewField
sortByIDSecondary = Convert.ToInt32(drpSortBySecondary.SelectedValue.Replace("rf", ""))
Else
objSortByTypeSecondary = CType(System.Enum.Parse(GetType(SortByType), drpSortBySecondary.SelectedValue.ToString()), SortByType)
End If
End If
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_BY_2_SETTING, objSortByTypeSecondary.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_BY_2_CUSTOM_FIELD_SETTING, sortByIDSecondary.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_DIRECTION_2_SETTING, drpSortDirectionSecondary.SelectedValue)
Dim objSortByTypeTertiary As SortByType = SortByType.CustomField
Dim sortByIDTertiary As Integer = Null.NullInteger
If (drpSortByTertiary.SelectedValue.StartsWith("cf")) Then
sortByIDTertiary = Convert.ToInt32(drpSortByTertiary.SelectedValue.Replace("cf", ""))
Else
If (drpSortByTertiary.SelectedValue.StartsWith("rf")) Then
objSortByTypeTertiary = SortByType.ReviewField
sortByIDTertiary = Convert.ToInt32(drpSortByTertiary.SelectedValue.Replace("rf", ""))
Else
objSortByTypeTertiary = CType(System.Enum.Parse(GetType(SortByType), drpSortByTertiary.SelectedValue.ToString()), SortByType)
End If
End If
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_BY_3_SETTING, objSortByTypeTertiary.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_BY_3_CUSTOM_FIELD_SETTING, sortByIDTertiary.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_DIRECTION_3_SETTING, drpSortDirectionTertiary.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_USER_SORTABLE_SETTING, chkUserSortable.Checked.ToString())
Dim sortFields As String = ""
For Each li As ListItem In lstSortFields.Items
If (li.Selected) Then
If (sortFields = "") Then
sortFields = li.Value
Else
sortFields = sortFields & "," & li.Value
End If
End If
Next
objModules.UpdateModuleSetting(ModuleId, Constants.LISTING_SORT_FIELDS_SETTING, sortFields)
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MANAGER_HIDE_AUTHOR_DETAILS_SETTING, chkHideAuthorDetails.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MANAGER_HIDE_PUBLISHING_DETAILS_SETTING, chkHidePublishingDetails.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MANAGER_ITEMS_PER_PAGE_SETTING, drpPropertyManagerRecordsPerPage.SelectedValue)
Dim objPropertyManagerSortByType As SortByType = SortByType.CustomField
Dim propertyManagerSortByID As Integer = Null.NullInteger
If (drpPropertyManagerSortBy.SelectedValue.StartsWith("cf")) Then
propertyManagerSortByID = Convert.ToInt32(drpPropertyManagerSortBy.SelectedValue.Replace("cf", ""))
Else
If (drpPropertyManagerSortBy.SelectedValue.StartsWith("rf")) Then
objPropertyManagerSortByType = SortByType.ReviewField
propertyManagerSortByID = Convert.ToInt32(drpPropertyManagerSortBy.SelectedValue.Replace("rf", ""))
Else
objPropertyManagerSortByType = CType(System.Enum.Parse(GetType(SortByType), drpPropertyManagerSortBy.SelectedValue.ToString()), SortByType)
End If
End If
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MANAGER_SORT_BY_SETTING, objPropertyManagerSortByType.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MANAGER_SORT_BY_CUSTOM_FIELD_SETTING, propertyManagerSortByID.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.PROPERTY_MANAGER_SORT_DIRECTION_SETTING, drpPropertyManagerSortDirection.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_ENABLED_SETTING, chkImagesEnabled.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_HIGH_QUALITY_SETTING, chkHighQuality.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_INCLUDE_JQUERY_SETTING, chkIncludejQuery.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.SMALL_WIDTH_SETTING, txtSmallWidth.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.SMALL_HEIGHT_SETTING, txtSmallHeight.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.MEDIUM_WIDTH_SETTING, txtMediumWidth.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.MEDIUM_HEIGHT_SETTING, txtMediumHeight.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.LARGE_WIDTH_SETTING, txtLargeWidth.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.LARGE_HEIGHT_SETTING, txtLargeHeight.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_ITEMS_PER_ROW_SETTING, txtImagesItemsPerRow.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_WATERMARK_ENABLED_SETTING, chkUseWatermark.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_WATERMARK_TEXT_SETTING, txtWatermarkText.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_WATERMARK_IMAGE_SETTING, ctlWatermarkImage.Url)
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_WATERMARK_IMAGE_POSITION_SETTING, drpWatermarkPosition.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.IMAGES_CATEGORIES_SETTING, txtImageCategories.Text)
objModules.UpdateModuleSetting(ModuleId, Constants.BREADCRUMB_PLACEMENT_SETTING, lstBreadcrumbPlacement.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.CUSTOM_FIELD_EXPIRATION_SETTING, drpBindExpiry.SelectedValue)
If (txtdefaultExpiration.Text.Length > 0) Then
If (Convert.ToInt32(txtdefaultExpiration.Text) > 0) Then