Script

Script

  • 29 Mai 2019 um 1:31 pm #32591
    pintukbr
    Teilnehmer

    Hi,

    Can any one help me, how can i open another screen using VB NET and RUN script.

  • 29 Mai 2019 um 2:58 pm #32599
  • 30 Mai 2019 um 9:04 am #32604
    pintukbr
    Teilnehmer

    thanks Joseph

    But, I can’t able to use UFProjectDocumentScreen in Button Control. Its working perfectly in main scirpt.
    Below i have written My Code

    Public Sub ButtonControl_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles ButtonControl.Click

    connetionString = „Data Source=SCADA\SQLEXPRESS;Initial Catalog=DataBase;User ID=scada;Password=*****“

    SQURY = „SELECT UserID,UserName,UserPassword,UserLevelID FROM Users“
    connection = New SqlConnection(connetionString)
    connection.Open()

    Command = New SqlCommand(SQURY, connection)
    Dim sqlReader As SqlDataReader = Command.ExecuteReader()
    While sqlReader.Read()

    If sqlReader.Item(1) = Users_Login_UserName And sqlReader.Item(2) = Users_Login_Pwd Then

    ***** Here i want to open another Screen and Run One Script

    End If

    End While

    sqlReader.Close()
    Command.Dispose()
    connection.Close()

    End Sub

    • Diese Antwort wurde geändert vor 3 Monate, 3 Wochen von pintukbr.
  • 5 Juni 2019 um 4:38 pm #32759
    MODERATOR
    Teilnehmer

    Hello Pintukbr,

    -When you have to open a screen via script, when the script context is a screen object you have to use this syntax:

    Parent.Screens.OpenScreenNormal „ScreenName“, „“

    -If you want to open a screen via script, when the script context is a script resource:

    UFProjectDocument.Screens.OpenScreenModal „ScreenName“, „EventualParameter“

    Regards
    Frank

  • 20 Juni 2019 um 6:51 am #32914
    pintukbr
    Teilnehmer

    Hello Frank,

    My Problem is solved.

    Thank you very much..

Du musst angemeldet sein, um auf dieses Thema antworten zu können.

Topic Tags