Script

Script

  • 29 maggio 2019 alle 1:31 pm #32591
    pintukbr
    Partecipante

    Hi,

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

  • 29 maggio 2019 alle 2:58 pm #32599
  • 30 maggio 2019 alle 9:04 am #32604
    pintukbr
    Partecipante

    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

    • Questa risposta è stata modificata 4 mesi, 2 settimane fa da pintukbr.
  • 5 giugno 2019 alle 4:38 pm #32759
    MODERATOR
    Amministratore del forum

    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 giugno 2019 alle 6:51 am #32914
    pintukbr
    Partecipante

    Hello Frank,

    My Problem is solved.

    Thank you very much..

Devi essere loggato per rispondere a questa discussione.

Topic Tags