You are on page 1of 2

using using using using using

System; System.Collections.Generic; System.Drawing; System.Windows.Forms; MIMSX; //Importamos la libreria

namespace Prueba_Connector { public partial class MainForm : Form { //Tipo (Clase) (objeto) MIMSXServerClass objServer; //Declaramos el objeto de conexion public MainForm() { InitializeComponent(); } void MainFormLoad(object sender, EventArgs e) { objServer = new MIMSXServerClass(); //Inicializamos el

Objeto

if ( !(objServer.Initialise(0,0))) { //Sesion no compartida MessageBox.Show("Imposible Inicializar Conexion"); } else { if (!(objServer.Connect(false))){ //False: Conexion no silensiosa Pide Login //True : Conexion silensiosa no pide Login MessageBox.Show("no Conectado"); } } } void MainFormFormClosing(object sender, FormClosingEventArgs e) { if (objServer.Connected) { objServer.Disconnect(); } //Cierre if } //cierre metodo void Button1Click(object sender, EventArgs e) { if (objServer.Connected) { try{ //Ejecucion de un MSO objServer.Screen.ExecuteMSO("MSO010","","","N",""); MessageBox.Show("Ejecutandose"); //Checkear si esta el MSO en la pantalla MSM010A if (objServer.Screen.MSO.Name == "MSM010A"){ //Lleno los campos que nesecito objServer.Screen.MSO.Fields.Item("OPTION1I").Value = "1";

Screen.Message). } } catch (Exception ex){ MessageBox.Fields.objServer.Show("no Ejecutandose: " + ex.Item("TABLE_CODE1I").Fields. objServer.MSO.Screen.MSO.Value = "PRUEBA".Item("TABLE_TYPE1I"). } } } } } .Value = "+DBU".