-
Notifications
You must be signed in to change notification settings - Fork 0
/
task_details.aspx
1567 lines (1391 loc) · 76.1 KB
/
task_details.aspx
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
<%@ Page Title="Task Details - Buildmate" Language="VB" MasterPageFile="~/common/Manager.master" AutoEventWireup="false" CodeFile="task_details.aspx.vb" Inherits="manager_task_details" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/controls/myCheckBox.ascx" TagName="myCheckbox" TagPrefix="myChk" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
function validateModal() {
if (typeof (Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
if (Page_IsValid) {
hideModal();
}
return true;
}
</script>
<telerik:RadScriptBlock ID="rsbPhase4" runat="server" Visible="false">
<script type="text/javascript">
var data = {
target: "#ctl00_MainContent_fvTaskAdjustments_btnEdit",
progress: 1,
tooltip: {
title: "Resources",
content: "<strong>Pricing and managing job tasks</strong><br><br>To 'Add a Quantity' click the grey button 'Edit Task Details' located above.<br><br><em>Help: Before a job task can be priced the task needs to be provided with a quantity. Adding a quantity prevents Tasks from having a zero cost.</em>"
}
};
$(document).ready(function () {
bm.tour(data);
});
var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
pageRequestManager.add_endRequest(tourEditTask);
function tourEditTask(sender, args) {
var activeElement = sender._activeElement.id,
valid = false,
data = {};
data.progress = 1;
if (activeElement == "ctl00_MainContent_fvTaskAdjustments_btnEdit") {
valid = true;
data.target= "#ctl00_MainContent_fvTaskAdjustments_rntbQuantity";
data.tooltip = {
title: "Adding a Quantity to a Task",
content: "To 'Add a Quantity' click the 'QUANTITY' field and enter a quantity then click the green button 'Update' located at the bottom of the form to save changes.<br><br><em>Help: Add a quantity first prevents Tasks from having a zero cost. For now just enter a quantity. You can also use the calculator to calculate the quantity, to calculate the quantity click the calculator icon.</em>",
direction: "right"
}
}
if(valid) {
bm.tour(data);
}
}
</script>
</telerik:RadScriptBlock>
<telerik:RadScriptBlock ID="rsbPhase5" runat="server" Visible="false">
<script type="text/javascript">
var data = {
target: "#ctl00_MainContent_fvDefaultResources_HyperLink1",
progress: 1,
tooltip: {
title: "Add a Resource to your Task",
content: "To 'Add a Resource to a Task' click the green button 'Add a Resource' located to the right.<br><br><em>Help: Adding a quantity enables resources to be added to the Job Task. Selecting 'Add a Resource' will access Buildmate's Resource Database of over 100,000 Labour, Material and Plant resources.</em>"
}
};
$(document).ready(function () {
bm.tour(data);
$('#ctl00_MainContent_fvDefaultResources_HyperLink1').on('click', function () {
var data = {
target: "#ctl00_MainContent_btnAddResources",
progress: 1,
tooltip: {
title: "Selecting Resources to add to a job task",
content: "Enter the relevant resource details, then click the green button 'Add Resource'.<br><br><em>Help: 'TYPE' selects the resource database to search (Labour, Material or Plant). <br><br>‘SEARCH’ leave search set at 'All Resources'; search is used to search one of three databases 'All Resources' searches Buildmate's default database or to limit a search for a resource you have previously added to your estimates by selecting either 'Current Project' or 'All Projects'<br><br>'RESOURCE' is a search field enter a description of the resource to search for then click on the resource required from the dropdown list. Leave quantity set at 1 the quantity is used to multiply the resource i.e. the task needs 2 tradesmen or 2 coats of paint.<br><br>'USAGE' is how much of the resource is needed to complete one unit of the task e.g. a tradesman has a usage of 60 minutes an hour and a box of 200 screws has a usage of two hundred and a brick has a usage of 1. One m2 of stretcher bond brickwork would need 60 bricks so has a usage of 60. The usage unit will be indicated once a resource has been selected i.e. selecting labour resources will indicate the usage is minutes. If you need a guide to how much labour to use a 'SUGGESTED TIME' for labour has been provided within the task details. When you enter a labour item the Resource Manager will calculate the duration and update the Task Details above.</em>"
}
};
bm.tour(data);
});
});
</script>
</telerik:RadScriptBlock>
<telerik:RadScriptBlock ID="rsbPhase6" runat="server" Visible="false">
<script type="text/javascript">
var data = {
target: "#ctl00_hlSuppliers",
progress: 2,
tooltip: {
title: "With a Resource added to your estimate you will need to link the Resource to a Supplier.",
content: "To 'Add a Supplier' click 'Suppliers' on the main tool bar above.<br><br><em>Help: If a Job Task resource does not have one of your Suppliers providing the purchase cost, Buildmate will use a default Supplier called 'Unresourced'. The 'Unresourced' default cost may be out of date. You will need to add one or more of your suppliers to ensure that resources you use have an up to date purchase cost.</em>"
}
};
$(document).ready(function () {
bm.tour(data);
});
</script>
</telerik:RadScriptBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlId="lbRefreshResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvTaskTotals" />
<telerik:AjaxUpdatedControl ControlID="rgResources" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="rmpResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rmpResources" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="fvDefaultResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvDefaultResources" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="fvAddAdhoc">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgAdditions" />
<telerik:AjaxUpdatedControl ControlID="fvAddAdhoc" />
<telerik:AjaxUpdatedControl ControlID="fvTaskTotals" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="rgResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvTaskAdjustments" />
<telerik:AjaxUpdatedControl ControlID="fvTaskTotals" />
<telerik:AjaxUpdatedControl ControlID="rgResources" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="fvTaskAdjustments">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvTaskTotals" />
<telerik:AjaxUpdatedControl ControlID="pCurrentResources" />
<telerik:AjaxUpdatedControl ControlID="pRequiresTaskQty" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="Panel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Panel1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="btnAddResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgResources" />
<telerik:AjaxUpdatedControl ControlID="fvTaskTotals" />
<telerik:AjaxUpdatedControl ControlID="fvTaskAdjustments" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="btnUpdateQty">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvTaskAdjustments" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="btnAdd">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="btnAdd" />
<telerik:AjaxUpdatedControl ControlID="fvAddCalc" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="btnCancel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="btnAdd" />
<telerik:AjaxUpdatedControl ControlID="fvAddCalc" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="fvAddCalc">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgCalculator" />
<telerik:AjaxUpdatedControl ControlID="btnAdd" />
<telerik:AjaxUpdatedControl ControlID="qtyTotal" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="rgCalculator">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="qtyTotal" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="rgAdditions">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvTaskTotals" />
<telerik:AjaxUpdatedControl ControlID="rgAdditions" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="rcbResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="lblUnitName" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="fvCompletion">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="fvCompletion" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlId="pAddResources">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pAddResources" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<!-- add resources modal -->
<div id="addResources" class="md-window" data-modal="addResources">
<asp:Panel ID="pAddResources" runat="server" DefaultButton="btnAddResources" CssClass="md-content">
<h3>Add a Resource</h3>
<div class="md-details">
<div class="row">
<asp:Label ID="Label10" runat="server"
Text="Type"
CssClass="label"
AssociatedControlID="rblResourceType" />
<asp:RadioButtonList ID="rblResourceType" runat="server"
AutoPostBack="true"
RepeatDirection="Horizontal">
<asp:ListItem Value="1" Text="Labour" Selected="True" />
<asp:ListItem Value="2" Text="Material" />
<asp:ListItem Value="3" Text="Plant & Equipment" />
</asp:RadioButtonList>
</div>
<div class="row">
<asp:Label ID="Label9" runat="server"
Text="Search"
CssClass="label"
AssociatedControlID="rcbSearchType" />
<telerik:RadComboBox ID="rcbSearchType" runat="server"
AutoPostBack="true">
<Items>
<telerik:RadComboBoxItem Value="1" Text="All Resources" />
<telerik:RadComboBoxItem Value="2" Text="Current Project" />
<telerik:RadComboBoxItem Value="3" Text="All Projects" />
</Items>
</telerik:RadComboBox>
</div>
<div class="row">
<asp:Label ID="Label12" runat="server"
Text="Resource"
CssClass="label"
AssociatedControlID="rcbResources" />
<telerik:RadComboBox
ID="rcbResources"
runat="server"
AutoPostBack="true"
Width="215px"
Height="150px"
IsCaseSensitive="false"
DropDownWidth="480px"
EmptyMessage="contains any of the word(s)"
EnableLoadOnDemand="true"
ShowMoreResultsBox="true"
EnableVirtualScrolling="false"
MarkFirstMatch="false"
HighlightTemplatedItems="true">
<HeaderTemplate>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 300px;">
Product Name</td>
<td style="width: 100px;">
Manufacturer</td>
<td style="width: 80px;">
Part ID</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 300px;">
<%# DataBinder.Eval(Container, "Text")%>
</td>
<td style="width: 100px;">
<%#DataBinder.Eval(Container, "Attributes['manufacturer']")%>
</td>
<td style="width: 80px;">
<%#DataBinder.Eval(Container, "Attributes['partId']")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
x
<telerik:RadNumericTextBox
ID="rntbQty"
runat="server"
Value="1"
Width="50px"
Type="Number"
MinValue="1"
NumberFormat-DecimalDigits="0" />
</div>
<div class="row">
<asp:Label ID="Label14" runat="server"
Text="Usage"
CssClass="label"
AssociatedControlID="rntbUses" />
<telerik:RadNumericTextBox
ID="rntbUses"
runat="server"
Value="0"
Width="60px"
Type="Number"
MinValue="0"
NumberFormat-DecimalDigits="2" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="rntbUses"
ValidationGroup="AddResource"
Display="Dynamic"
ValidationExpression="^[1-9][0-9]*(\.[0-9]+)?|0+\.[0-9]*[1-9][0-9]*$" SetFocusOnError="true"
ErrorMessage="Please enter a Usage greater than 0."></asp:RegularExpressionValidator>
</div>
</div>
<div class="md-footer">
<asp:Button ID="btnAddResources" runat="server" Text="Add Resource" ValidationGroup="AddResource" CssClass="button button-create" />
<a href="#" class="button md-close">Close</a>
</div>
</asp:Panel>
</div>
<!-- add adhoc modal -->
<div id="addAddition" class="md-window" data-modal="addAddition">
<div class="md-content">
<asp:FormView ID="fvAddAdhoc" runat="server"
DefaultMode="Insert"
Width="100%"
DataSourceID="additionsDataSource"
DataKeyNames="id">
<InsertItemTemplate>
<h3>Add an Addition</h3>
<div class="md-details">
<div class="row">
<asp:Label
ID="Label13"
runat="server"
CssClass="label"
AssociatedControlID="rtbDescription"
Text="Description" />
<telerik:RadTextBox
ID="rtbDescription"
runat="server"
TextMode="MultiLine"
Columns="40"
Height="50px"
Text='<%#Bind("description") %>'
MaxLength="255" />
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="rtbDescription"
ErrorMessage="Descripion"
ValidationGroup="insertAdditionValidation">
<span class="req"></span>
</asp:RequiredFieldValidator>
</div>
<div class="row">
<asp:Label
ID="Label15"
runat="server"
CssClass="label"
AssociatedControlID="rntbCost"
Text="Cost" />
<telerik:RadNumericTextBox
ID="rntbCost"
runat="server"
EmptyMessage="£0.00"
Width="80px"
Value='<%#Bind("price") %>'
Type="Currency"
NumberFormat-DecimalDigits="2" />
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2"
runat="server"
ControlToValidate="rntbCost"
ErrorMessage="Cost"
ValidationGroup="insertAdditionValidation">
<span class="req"></span>
</asp:RequiredFieldValidator>
</div>
<div class="row">
<asp:Label
ID="Label16"
runat="server"
CssClass="label"
AssociatedControlID="rntbPercentage"
Text="Adjustment (%)" />
<telerik:RadNumericTextBox
ID="rntbPercentage"
runat="server"
EmptyMessage="0 %"
MinValue="0"
MaxValue="100"
Width="60px"
Value='<%#Bind("percentage") %>'
Type="Percent" />
</div>
<div class="row">
<asp:Label
ID="Label17"
runat="server"
CssClass="label"
AssociatedControlID="rcbType"
Text="Cost Modifier" />
<telerik:RadComboBox
ID="rcbType"
runat="server"
DataSourceID="adhocTypeDataSource"
SelectedValue='<%#Bind("adhocTypeId") %>'
DataTextField="type"
DataValueField="id" />
</div>
</div>
<div class="md-footer">
<asp:Button
ID="btnInsert"
runat="server"
CausesValidation="True"
CommandName="Insert"
CssClass="button button-create"
ValidationGroup="insertAdditionValidation"
OnClientClick="validateModal()"
Text="Add Addition" />
<a href="#" class="button md-close">Close</a>
</div>
</InsertItemTemplate>
</asp:FormView>
</div>
</div>
<!-- calculator modal -->
<div id="calculator" class="md-window" data-modal="calculator">
<div class="md-content">
<h3>Calculator</h3>
<asp:HiddenField ID="qtyTotal" runat="server" />
<div class="md-details">
<p class="rightalign">
<asp:LinkButton ID="btnAdd" runat="server" CssClass="button">
Add a dimension
</asp:LinkButton>
</p>
<asp:FormView ID="fvAddCalc" runat="server"
Visible="false"
DefaultMode="Insert"
EnableViewState="false"
DataSourceId="calcDataSource">
<InsertItemTemplate>
<h4>Add a Dimension</h4>
<div class="row">
<asp:Label ID="Label4" runat="server"
CssClass="label"
AssociatedControlID="rtbComment"
Text="Comment" />
<telerik:RadTextBox ID="rtbComment" runat="server"
Text='<%# Bind("comment") %>'
Width="160px" />
</div>
<div class="row">
<asp:Label ID="Label1" runat="server"
CssClass="label"
AssociatedControlID="rntbLength"
Text="Dimensions" />
<telerik:RadNumericTextBox ID="rntbLength" runat="server"
Type="Number"
NumberFormat-DecimalDigits="2"
Text='<%#Bind("length") %>'
Value='1'
Width="40px" /> x
<telerik:RadNumericTextBox ID="rntbWidth" runat="server"
Type="Number"
NumberFormat-DecimalDigits="2"
Text='<%#Bind("width") %>'
Value='1'
Width="40px" /> x
<telerik:RadNumericTextBox ID="rntbHeight" runat="server"
Type="Number"
NumberFormat-DecimalDigits="2"
Text='<%#Bind("height") %>'
Value='1'
Width="40px" />
</div>
<div class="row">
<asp:Label runat="server" ID="Label3"
CssClass="label"
AssociatedControlID="rntbMultiplier"
Text="Multiplier" />
<telerik:RadNumericTextBox ID="rntbMultiplier" runat="server"
Type="Number"
NumberFormat-DecimalDigits="2"
Text='<%#Bind("multiplier") %>'
Value='1'
Width="50px" />
</div>
<div class="row">
<asp:Label ID="Label2" runat="server"
CssClass="label"
AssociatedControlID="chkMyBox"
Text="Subtract" />
<myChk:myCheckbox ID="chkMyBox" runat="server"
Checked='<%# Bind("subtract") %>' />
</div>
<div class="row">
<label class="label"> </label>
<asp:Button ID="btnUpdate" runat="server"
CommandName="Insert"
CssClass="button button-create"
Text='Insert' />
<asp:LinkButton ID="btnCancel" runat="server"
CausesValidation="false"
CssClass="button"
OnClick="btnCancel_Click"
Text="Cancel" />
</div>
</InsertItemTemplate>
</asp:FormView>
<telerik:RadGrid ID="rgCalculator" runat="server"
width="100%"
DataSourceID="calcDataSource"
GridLines="None"
ShowStatusBar="true"
ShowFooter="true"
AutoGenerateColumns="False"
AllowAutomaticInserts="True"
AllowAutomaticDeletes="True"
AllowAutomaticUpdates="True">
<MasterTableView
AutoGenerateColumns="False"
DataKeyNames="id"
AllowAutomaticDeletes="true"
AllowAutomaticUpdates="true"
NoMasterRecordsText=" No dimensions were found."
EditMode="EditForms"
DataSourceID="calcDataSource"
InsertItemDisplay="Bottom">
<Columns>
<telerik:GridBoundColumn
UniqueName="dimensions"
HeaderText="Dimensions"
HeaderStyle-width="30%"
DataField="dimensions" />
<telerik:GridBoundColumn
UniqueName="multiplier"
HeaderText="Multiplier"
HeaderStyle-Width="10%"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"
DataField="multiplier" />
<telerik:GridBoundColumn
UniqueName="total"
HeaderText="Total"
HeaderStyle-Width="15%"
DataFormatString="{0:N2}"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"
DataField="total" />
<telerik:GridBoundColumn
UniqueName="comment"
HeaderText="Comment"
HeaderStyle-Width="30%"
DataField="comment" />
<telerik:GridEditCommandColumn
UniqueName="EditCommandColumn"
ButtonType="ImageButton" />
<telerik:GridButtonColumn
ConfirmText="Delete this item?"
ConfirmTitle="Delete"
ButtonType="ImageButton"
CommandName="Delete"
Text="Delete"
UniqueName="DeleteColumn" />
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<h3>Editing a Dimension</h3>
<div class="row">
<asp:Label CssClass="label" ID="Label4" AssociatedControlID="rntbMultiplier" runat="server" Text="Comment" />
<telerik:RadTextBox ID="rtbComment" runat="server"
Text='<%# Bind("comment") %>' Width="160px" />
</div>
<div class="row">
<asp:Label CssClass="label" ID="Label1" AssociatedControlID="rntbLength" runat="server" Text="Dimensions" />
<telerik:RadNumericTextBox ID="rntbLength" runat="server"
dbValue='<%# Bind("length") %>' Width="40px" /> x
<telerik:RadNumericTextBox ID="rntbWidth" runat="server"
dbValue='<%# Bind("width") %>' Width="40px" /> x
<telerik:RadNumericTextBox ID="rntbHeight" runat="server"
dbValue='<%# Bind("height") %>' Width="40px" />
</div>
<div class="row">
<asp:Label CssClass="label" ID="Label3" AssociatedControlID="rntbMultiplier" runat="server" Text="Multiplier" />
<telerik:RadNumericTextBox ID="rntbMultiplier" runat="server"
NumberFormat-DecimalDigits="2" Width="50px"
Type="Number" dbValue='<%# Bind("multiplier") %>' />
</div>
<div class="row">
<asp:Label CssClass="label" ID="Label2" AssociatedControlID="chkMyBox" runat="server" Text="Subtract" />
<myChk:myCheckbox ID="chkMyBox" runat="server"
Checked='<%# Bind("subtract") %>' />
</div>
<div class="row">
<label class="label"> </label>
<asp:Button ID="btnUpdate" runat="server"
CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'
Text='<%#IIf((TypeOf (Container) Is GridEditFormInsertItem), "Insert", "Update")%>' />
<asp:LinkButton ID="btnCancel" runat="server"
CausesValidation="false"
CommandName="Cancel"
Text="Cancel" />
</div>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</div>
<div runat="server" id="showupdate" class="md-footer">
<asp:Button ID="btnUpdateQty" runat="server"
CssClass="button button-secondary"
OnClientClick="hideModal()"
Text="Use this Total as the Task Quantity" />
<a href="#" class="button md-close">Close</a>
</div>
</div>
</div>
<div class="breadcrumb">
<div class="breadcrumb-container">
<ul class="breadcrumb-list">
<li>
<a href="projects.aspx">Projects</a>
<span class="divider">/</span>
</li>
<li>
<asp:HyperLink ID="hlBack" runat="server"
NavigateUrl="project_details.aspx?pid={0}"
Text="Project Details" />
<span class="divider">/</span>
</li>
<li>
<asp:HyperLink ID="hlBack2" runat="server"
NavigateUrl="build_element_details.aspx?pid={0}&rid={1}"
Text="Build Element Details" />
<span class="divider">/</span>
</li>
<li class="active">
Task Details
</li>
</ul>
</div>
</div>
<div class="main-container">
<!-- task details -->
<div class="div33">
<div class="box-alert box-primary">
<h3 class="centrealign">Task Break-down</h3>
<div class="boxcontent">
<asp:FormView
ID="fvTaskTotals"
runat="server"
Width="100%"
DataSourceID="taskTotalsDataSource">
<ItemTemplate>
<div class="row row-long">
<label class="label">Labour Cost</label>
<div class="rightalign">
<asp:Label ID="lblLabourCost" runat="server"
Text='<%#Bind("labourCost", "{0:C}") %>' />
</div>
</div>
<div class="row row-long">
<label class="label">Material Cost</label>
<div class="rightalign">
<asp:Label ID="lblMaterialCost" runat="server"
Text='<%#Bind("materialCost", "{0:C}") %>' />
</div>
</div>
<div class="row row-long">
<label class="label">Plant & Equipment Cost</label>
<div class="rightalign">
<asp:Label ID="lblPlantCost" runat="server"
Text='<%#Bind("plantCost", "{0:C}") %>' />
</div>
</div>
<div class="row row-long">
<label class="label">Ad-hoc Cost</label>
<div class="rightalign">
<asp:Label ID="lblAdhocCost" runat="server"
Text='<%#Bind("adHocCost", "{0:C}") %>' />
</div>
</div>
<hr />
<div class="row row-long">
<label class="label">Task Total</label>
<div class="rightalign">
<asp:Label ID="lblTotalCost" runat="server"
Text='<%#Bind("total", "{0:C}") %>' />
</div>
</div>
</ItemTemplate>
</asp:FormView>
</div>
</div>
<div class="box">
<div class="div66">
<h3>Ad-hoc Additions</h3>
</div>
<div class="div33 last rightalign">
<asp:Panel ID="pAddAdditions" runat="server">
<p>
<a href="#" data-target="addAddition" class="js-open-modal button button-create">Add an Addition</a>
</p>
</asp:Panel>
</div>
<div class="boxcontent">
<telerik:RadGrid ID="rgAdditions" runat="server"
CssClass="clear"
DataSourceID="additionsDataSource"
GridLines="None"
AllowSorting="true"
AllowAutomaticDeletes="True"
AllowAutomaticUpdates="True">
<MasterTableView
AutoGenerateColumns="False"
CellSpacing="-1"
DataKeyNames="id"
ShowFooter="true"
AllowAutomaticUpdates="True"
DataSourceID="additionsDataSource"
NoMasterRecordsText=" No Ad-Hoc Items were found."
EditMode="EditForms">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn
HeaderText="Description"
SortExpression="description"
HeaderStyle-Width="75%"
UniqueName="description">
<ItemTemplate>
<asp:LinkButton ID="lbEdit" runat="server"
CommandName="Edit"
Text='<%#Eval("description")%>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn
UniqueName="description"
SortExpression="description"
HeaderText="Description"
HeaderStyle-Width="75%"
DataField="description" />
<telerik:GridBoundColumn
DataField="total"
DataType="System.Decimal"
DataFormatString="{0:C2}"
HeaderText="Total"
SortExpression="total"
UniqueName="total"
HeaderStyle-Width="20%"
HeaderStyle-HorizontalAlign="Right"
ItemStyle-HorizontalAlign="Right" />
<telerik:GridButtonColumn
ConfirmText="Delete this item?"
ConfirmTitle="Delete"
ButtonType="ImageButton"
CommandName="Delete"
Text="Delete"
HeaderStyle-Width="5%"
UniqueName="DeleteColumn" />
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<div style="padding: 5px">
<asp:HiddenField ID="hiddenId" runat="server" Value='<%#Bind("id") %>' />
<div class="row">
<asp:Label ID="lblrtbDescription" runat="server"
Text="Description"
AssociatedControlID="rtbDescription"
CssClass="label" />
<telerik:RadTextBox ID="rtbDescription" runat="server"
TextMode="MultiLine"
width="130px"
Height="50px"
MaxLength="255"
Text='<%#Bind("description") %>' />
</div>
<div class="row">
<asp:Label ID="lblrntbCost" runat="server"
Text="Cost"
AssociatedControlID="rntbCost"
CssClass="label" />
<telerik:RadNumericTextBox ID="rntbCost" runat="server"
EmptyMessage="£0.00"
Width="70px"
Value='<%#Bind("price", "{0:C2}") %>'
Type="Currency"
NumberFormat-DecimalDigits="2" />
</div>
<div class="row">
<asp:Label ID="lblrntbPercentage" runat="server"
Text="Adjustment"
AssociatedControlID="rntbPercentage"
CssClass="label" />
<telerik:RadNumericTextBox ID="rntbPercentage" runat="server"
EmptyMessage="0 %"
MinValue="0"
MaxValue="100"
Width="80px"
Value='<%#Bind("percentage", "{0:0}") %>'
Type="Percent" />
</div>
<div class="row">
<asp:Label ID="lblrcbType" runat="server"
Text="Cost Modifier"
AssociatedControlID="rcbType"
CssClass="label" />
<telerik:RadComboBox ID="rcbType" runat="server"
DataSourceID="adhocTypeDataSource"
Width="130px"
SelectedValue='<%#Bind("adhocTypeId") %>'
DataTextField="type" DataValueField="id" />
</div>
<div class="row">
<asp:Button ID="btnUpdate" runat="server"
Text="Update"
CommandName="Update" />
<asp:LinkButton ID="btnCancel" runat="server"
Text="Cancel"
CausesValidation="false"
CommandName="Cancel" />
</div>
</div>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</div>
</div>
</div>
<div class="div66 div-last">
<div class="box">
<h3>Task Details</h3>
<div class="boxcontent">
<asp:FormView
ID="fvTaskAdjustments"
runat="server"
DataKeyNames="id"
DataSourceID="taskDataSource">
<ItemTemplate>
<div class="row">
<label title="Description" class="label">Description</label>
<span style="display: table-cell"><%#Eval("taskName")%></span>
</div>
<div class="row">
<label title="Note" class="label">Note</label>
<span style="display: table-cell; color: #900; font-weight: 600"><%#Eval("note")%> </span>
</div>
<div class="row">
<label title="Build Phase" class="label">Build Phase</label>
<%#Eval("buildPhase")%>
</div>
<div class="row">
<label title="Quantity" class="label">Quantity</label>
<asp:Label ID="Label3" runat="server" Text='<%# Eval("qty") & " " & Eval("unit") %>' />
</div>
<div class="row">
<label title="Suggested Time" class="label">Suggested Time</label>
<asp:Label ID="Label4" runat="server" Text='<%# Eval("minutes") & " minutes per " & Eval("unit") %>' />
</div>
<div class="row">
<label title="Estimated Time" class="label">Estimated Time</label>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("labourTime", "{0:N2}") & " minutes" %>' />
</div>
<div class="row">
<label title="Total Duration" class="label">Total Duration</label>
<asp:Label ID="minutesLabel" runat="server" Text='<%# Eval("totalTime", "{0:N0}") & " minutes" %>' />
</div>
<div class="row">
<label class="label"> </label>
<asp:Button
ID="btnEdit"
runat="server"
Enabled='<%#iif(Eval("isLocked"), "false", "true") %>'
Text="Edit Task Details"
CssClass="button"
CommandName="Edit" />
</div>
</ItemTemplate>
<EditItemTemplate>
<div class="row">
<label title="Description" class="label">Description</label>
<span style="display: table-cell"><%#Eval("taskName")%></span>
</div>
<div class="row">
<label for="lblProjectNotes" title="Note" class="label">Note</label>
<telerik:RadTextBox ID="rtbProjectNotes" runat="server"
TextMode="MultiLine" Columns="300" Rows="4" Width="500px"