EXG Auto Ncts
This commit is contained in:
@@ -858,7 +858,10 @@ Public Class cDakosyEXG
|
||||
'dy_Status = status
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Return SQL.doSQLVarList(" UPDATE [tblDakosy_EXG] SET [exg_AutoFill_DyId]=@dyId WHERE exg_Id=@exg_Id ", "FMZOLL", , list)
|
||||
Return SQL.doSQLVarList("UPDATE tblDakosy_EXG SET exg_AutoFill_DyId=@dyId,
|
||||
exg_AutoFill_DyId_Complete=0
|
||||
WHERE exg_Id=@exg_Id",
|
||||
"FMZOLL", , list)
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
@@ -886,23 +889,27 @@ Public Class cDakosyEXG
|
||||
End Function
|
||||
|
||||
Shared Function isFillNCTS_ID_ALLCompleted(dyId As Integer) As Boolean
|
||||
If dyId > 0 Then
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
If dyId <= 0 Then Return False
|
||||
|
||||
Dim cnt = SQL.getValueTxtBySql(" SELECT COUNT(*) FROM [tblDakosy_EXG] where [exg_AutoFill_DyId] ='" & dyId & "' and exg_AutoFill_DyId=1 AND [exg_AutoFill_DyId_Complete]=0 ", "FMZOLL", ,, -1)
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim sqlText = "SELECT
|
||||
COUNT(*) AS Gesamt,
|
||||
SUM(CASE
|
||||
WHEN ISNULL(exg_AutoFill_DyId_Complete, 0) = 0
|
||||
THEN 1 ELSE 0
|
||||
END) AS Offen
|
||||
FROM tblDakosy_EXG
|
||||
WHERE exg_AutoFill_DyId= " & dyId & ""
|
||||
|
||||
If cnt = 0 Then
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
Dim cnt = SQL.getValueTxtBySql(sqlText, "FMZOLL", ,, -1)
|
||||
Return Convert.ToInt32(cnt) = 0
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'Public Function LOADByBezugsNr(exg_ObjectName As String, loadALL As Boolean) As Boolean
|
||||
' Try
|
||||
' LOADByBezugsNr = False
|
||||
@@ -945,7 +952,7 @@ Public Class cDakosyEXG
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
' Using cmd As New SqlCommand("SELECT TOP 1 * FROM (SELECT * FROM tblDakosy_EXGOut WHERE exg_ObjectName LIKE @bezugsNr " & If(checkValidStatus, " AND exg_status BETWEEN 40 and 90 ", "") & " ) AS T order by exg_status desc, (SELECT top 1 dySt_ts FROM [tblDakosy_Statusmeldungen] WHERE exg_dyaAnmID=exg_dyaAnmID order by dySt_ts desc) desc,exg_LetzteBearbeitung desc ", conn)
|
||||
'Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_EXGOut WHERE exg_ObjectName LIKE @bezugsNr " & If(checkValidStatus, " AND exg_status BETWEEN 40 and 90 ", "") & " order by exg_status desc, (SELECT top 1 dySt_ts FROM [tblDakosy_Statusmeldungen] WHERE exg_dyaAnmID=exg_dyaAnmID order by dySt_ts desc) desc,exg_LetzteBearbeitung desc ", conn)
|
||||
Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_EXG WHERE exg_ObjectName LIKE @bezugsNr order by exg_LetzteBearbeitung desc", conn)
|
||||
Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_EXG WHERE exg_ObjectName = @bezugsNr ORDER BY exg_LetzteBearbeitung DESC", conn)
|
||||
'MsgBox("SELECT TOP 1 * FROM tblDakosy_EXGOut WHERE exg_ObjectName LIKE " & bezugsNr & " " & If(checkValidStatus, " AND exg_status BETWEEN 40 and 90 ", "") & " order by exg_status desc, (SELECT top 1 dySt_ts FROM [tblDakosy_Statusmeldungen] inner join tblDakosy_Zollanmeldungen on dy_id = dySt_dyId WHERE exg_dyaAnmID=dy_id order by dySt_ts desc) desc,exg_LetzteBearbeitung desc ")
|
||||
cmd.Parameters.AddWithValue("@bezugsNr", bezugsNr)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
|
||||
Reference in New Issue
Block a user