Link to home
Start Free TrialLog in
Avatar of Cartillo
CartilloFlag for Malaysia

asked on

Build error

Hi Experts,

I would like to request Experts help. The attached script shows error as "Build error". Hope Experts could help me to fix this error.
Imports MyCompany.Data
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Linq
Imports System.Text.RegularExpressions
Imports System.Web

Namespace Rules
    
    Partial Public Class DataBusinessRules
        Inherits MyCompany.Rules.SharedBusinessRules
        
        <ControllerAction("Data", "Calculate", "Total_Duration")>  _
        Public Sub CalculateData(ByVal data_ID As Nullable(Of Integer), ByVal [date] As Nullable(Of DateTime), ByVal task As String, ByVal timeIN As Nullable(Of System.TimeSpan), ByVal timeOUT As Nullable(Of System.TimeSpan), ByVal total_Duration As Nullable(Of System.TimeSpan))
            UpdateFieldValue("Total_Duration", (datediff(HOUR,[TimeIN],[TimeOUT])))
        End Sub
    End Class
End Namespace

Open in new window

Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

What is the error and on what line?
Avatar of Cartillo

ASKER

Hi,

Here's error message that I got:

Error      1      Argument not specified for parameter 'TimeValue' of 'Public Function Hour(TimeValue As Date) As Integer' at line 16.
ASKER CERTIFIED SOLUTION
Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi tgerbert,

Thanks for the fix. However when I add the time value at TimeIN and TimeOUT column, the Total_Duration columns was not returned with total duration (sum) as suppose to. How to get the value automatically update the Total_Duration column?
Hi,

Thanks for the help