/* File: PRINCIPAL Description: PRINCIPAL Author: GeneXus C# Generator version 9_0_4-851 Generated on: 1/23/2009 8:47:28.75 Program type: Main program Main DBMS: sqlserver */ using System; using System.Collections; using GeneXus.Utils; using GeneXus.Resources; using GeneXus.Application; using GeneXus.Metadata; using System.Data; using System.Data.SqlClient; using GeneXus.Data; using GeneXus.Data.FAT; using GeneXus.WebControls; using GeneXus.Http; using GeneXus.XML; using GeneXus.Encryption; using GeneXus.Http.Client; using System.Xml.Serialization; using System.Data.SqlTypes; namespace GeneXus.Programs { public class hprincipal : GXHttpHandler { public hprincipal( ) { context = new GxContext( ); context.DataStores.Add(new GxDataStore( new GxSqlServer(),"SIFEE", context)); context.DataStores.Add(new GxDataStore( new GxSqlServer(),"FACPROD", context)); context.DataStores.Add(new GxDataStore( new GxSqlServer(),"SYNCKARPD75", context)); context.DataStores.Add(new GxDataStore( new GxSqlServer(),"SYNCCLI", context)); context.DataStores.Add(new GxDataStore( new GxSqlServer(),"SYNC", context)); context.DataStores.Add(new GxDataStore( new GxSqlServer(),"Default", context)); dsSIFEE = context.GetDataStore("SIFEE") ; dsFACPROD = context.GetDataStore("FACPROD") ; dsSYNCKARPD75 = context.GetDataStore("SYNCKARPD75") ; dsSYNCCLI = context.GetDataStore("SYNCCLI") ; dsSYNC = context.GetDataStore("SYNC") ; dsDefault = context.GetDataStore("Default") ; IsMain = true; } public hprincipal( IGxContext context ) { this.context = context; IsMain = false; dsSIFEE = context.GetDataStore("SIFEE") ; dsFACPROD = context.GetDataStore("FACPROD") ; dsSYNCKARPD75 = context.GetDataStore("SYNCKARPD75") ; dsSYNCCLI = context.GetDataStore("SYNCCLI") ; dsSYNC = context.GetDataStore("SYNC") ; dsDefault = context.GetDataStore("Default") ; } public void execute( ) { executePrivate(); } void executePrivate( ) { isStatic = false; webExecute(); } protected override void createObjects( ) { } protected void INITWEB( ) { initpars( ) ; gxajaxcallmode = 0 ; if ( ( nGotPars == 0 ) ) { gxfirstwebparm = GetNextPar( ) ; } } public override void webExecute( ) { createObjects(); initialize(); INITWEB( ) ; if ( ( gxajaxcallmode == 0 ) && ( GxWebError == 0 ) ) { PA2S2( ) ; if ( ( gxajaxcallmode == 0 ) && ( GxWebError == 0 ) ) { /* GeneXus formulas. */ context.Gx_err = 0 ; WS2S2( ) ; if ( ( gxajaxcallmode == 0 ) ) { WE2S2( ) ; } } } this.cleanup(); } protected void RenderHtmlHeaders( ) { wbTemp = context.ResponseContentType( "text/html") ; wbTemp = context.SetHeader( "pragma", "no-cache") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; idxLst = 1 ; while ( ( idxLst <= Form.Meta.ItemCount ) ) { WriteHtmlText( "") ; idxLst = (int)(idxLst+1) ; } idxLst = 1 ; addContentType = true ; while ( ( idxLst <= Form.Metaequiv.ItemCount ) ) { if ( ( String.CompareOrdinal(StringUtil.Lower( Form.Metaequiv.getItemValue((short)(idxLst))).TrimEnd(' '), "content-type".TrimEnd(' ') ) == 0 ) ) { addContentType = false ; wbTemp = context.ResponseContentType( Form.Metaequiv.getItemText((short)(idxLst))) ; } idxLst = (int)(idxLst+1) ; } if ( addContentType ) { WriteHtmlTextNl( "") ; } idxLst = 1 ; while ( ( idxLst <= Form.Metaequiv.ItemCount ) ) { WriteHtmlText( "") ; idxLst = (int)(idxLst+1) ; } } protected void RenderHtmlOpenForm( ) { WriteHtmlText( "") ; WriteHtmlText( "PRINCIPAL") ; WriteHtmlTextNl( "") ; if ( ( StringUtil.Len( sDynURL) > 0 ) ) { WriteHtmlText( "") ; } define_styles( ) ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlText( "") ; WriteHtmlTextNl( "") ; FormProcess = (true ? " onload=\"gxonload();"+"\""+" onkeyup=\"form_onkeyup(event)\" onkeypress=\"form_onkeypress(event,true,false)\" onkeydown=\"form_onkeypress(null,true,false)\"" : "") ; WriteHtmlText( "") ; skipLines(1); WriteHtmlTextNl( "
") ; gx_hidden_field( "_EventName", ""); gx_hidden_field( "_EventGridId", ""); gx_hidden_field( "_EventRowId", ""); } protected void RenderHtmlCloseForm2S2( ) { /* Send hidden variables. */ /* Send saved values. */ gx_hidden_field( "sCallerURL", StringUtil.RTrim( context.sCallerURL)); gx_hidden_field( "GRUUSUARIO", StringUtil.RTrim( A1120GRUUS)); gx_hidden_field( "GRUPASSWORD", StringUtil.RTrim( A1119GRUPA)); gx_hidden_field( "GRUCOD", StringUtil.LTrim( StringUtil.NToC( (decimal)(A177GRUCOD), 9, 0, ".", ""))); WriteHtmlTextNl( "
") ; include_jscripts( ) ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; } protected void WB2S0( ) { if ( ( wbLoad == false ) ) { RenderHtmlHeaders( ) ; RenderHtmlOpenForm( ) ; gx_msg_list2( "", context.GX_msglist.DisplayMode, "", "", false); WriteHtmlText( "
") ;
            wb_table1_3_2S2( true) ;
         }
         else
         {
            wb_table1_3_2S2( false) ;
         }
         return  ;
      }

      protected void wb_table1_3_2S2e( bool wbgen )
      {
         if ( ( wbgen == true ) )
         {
            WriteHtmlTextNl( "                                                         ") ;
            WriteHtmlTextNl( "                              ") ;
            WriteHtmlTextNl( "                          ") ;
            WriteHtmlText( "                                             
") ; } wbLoad = true ; } protected void START2S2( ) { wbLoad = false ; wbEnd = 0 ; wbStart = 0 ; wbTemp = 0 ; Form.Meta.addItem("Generator", "GeneXus C#", 0) ; Form.Meta.addItem("Version", "9_0_4-851", 0) ; Form.Meta.addItem("Description", "PRINCIPAL", 0) ; context.wjLoc = "" ; context.nUserReturn = 0 ; context.wbHandled = 0 ; if ( ( String.CompareOrdinal(context.GetRequestMethod( ).TrimEnd(' '), "POST".TrimEnd(' ') ) == 0 ) ) { context.sCallerURL = cgiGet( "sCallerURL") ; } else { context.sCallerURL = context.GetReferer( ) ; } wbErr = false ; STRUP2S0( ) ; } protected void WS2S2( ) { START2S2( ) ; EVT2S2( ) ; } protected void EVT2S2( ) { if ( ( String.CompareOrdinal(context.GetRequestMethod( ).TrimEnd(' '), "POST".TrimEnd(' ') ) == 0 ) ) { if ( ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( context.wjLoc).TrimEnd(' ') )==0)) && ( context.nUserReturn != 1 ) && ( wbErr == false ) ) { /* Read Web Panel buttons. */ sEvt = cgiGet( "_EventName") ; EvtGridId = cgiGet( "_EventGridId") ; EvtRowId = cgiGet( "_EventRowId") ; if ( ( StringUtil.Len( sEvt) > 0 ) ) { sEvtType = StringUtil.Left( sEvt, 1) ; sEvt = StringUtil.Right( sEvt, (short)(StringUtil.Len( sEvt)-1)) ; if ( ( String.CompareOrdinal(sEvtType.TrimEnd(' '), "E".TrimEnd(' ') ) == 0 ) ) { sEvtType = StringUtil.Right( sEvt, 1) ; if ( ( String.CompareOrdinal(sEvtType.TrimEnd(' '), ".".TrimEnd(' ') ) == 0 ) ) { sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-1)) ; if ( ( String.CompareOrdinal(sEvt.TrimEnd(' '), "RFR".TrimEnd(' ') ) == 0 ) ) { context.wbHandled = 1 ; dynload_actions( ) ; } else if ( ( String.CompareOrdinal(sEvt.TrimEnd(' '), "ACEPTAR.CLICK".TrimEnd(' ') ) == 0 ) ) { context.wbHandled = 1 ; dynload_actions( ) ; /* Execute user event: E112S2 */ E112S2 (); } } else { } } context.wbHandled = 1 ; } } } } protected void WE2S2( ) { if ( ( context.nUserReturn == 1 ) ) { if ( ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( context.sCallerURL).TrimEnd(' ') )==0)) ) { WriteHtmlText( "Close window") ; } else { context.Redirect( context.sCallerURL ); } } else if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( context.wjLoc).TrimEnd(' ') )==0)) ) { context.Redirect( context.wjLoc ); context.wjLoc = "" ; } else { Rfr0gs = true ; Refresh( ) ; if ( ( context.nUserReturn == 1 ) ) { if ( ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( context.sCallerURL).TrimEnd(' ') )==0)) ) { WriteHtmlText( "Close window") ; } else { context.Redirect( context.sCallerURL ); } } else if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( context.wjLoc).TrimEnd(' ') )==0)) ) { context.Redirect( context.wjLoc ); context.wjLoc = "" ; } else { RenderHtmlCloseForm2S2( ) ; } } } protected void PA2S2( ) { if ( ( nDonePA == 0 ) ) { lblTberror_Name = "Tberror" ; lblTburl_Name = "Tburl" ; lblTbfocus_Name = "Tbfocus" ; initialize_properties( ) ; GX_FocusControl = edtavUsuario_Internalname ; nDonePA = 1 ; } } protected void dynload_actions( ) { /* End function dynload_actions */ } protected void Refresh( ) { RF2S2( ) ; /* End function Refresh */ } protected void RF2S2( ) { /* Execute user event: E122S2 */ E122S2 (); if ( ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( context.wjLoc).TrimEnd(' ') )==0)) && ( context.nUserReturn != 1 ) ) { /* Execute user event: E132S2 */ E132S2 (); WB2S0( ) ; } } protected void STRUP2S0( ) { /* Before Start, stand alone formulas. */ context.Gx_err = 0 ; /* Execute Start event if defined. */ context.wbGlbDoneStart = 0 ; /* Execute user event: E142S2 */ E142S2 (); context.wbGlbDoneStart = 1 ; nDoneStart = 1 ; /* After Start, stand alone formulas. */ if ( ( String.CompareOrdinal(context.GetRequestMethod( ).TrimEnd(' '), "POST".TrimEnd(' ') ) == 0 ) ) { /* Read saved values. */ context.sCallerURL = cgiGet( "sCallerURL") ; /* Read subfile selected row values. */ /* Read variables values. */ AV9usuario = cgiGet( edtavUsuario_Internalname) ; AV10passwo = cgiGet( edtavPassword_Internalname) ; /* Read hidden variables. */ /* Read hidden properties. */ } else { dynload_actions( ) ; } } protected void GXStart( ) { /* Execute user event: E142S2 */ E142S2 (); if ( returnInSub ) { returnInSub = true; if (true) return; } } protected void E142S2( ) { /* Start Routine */ lblTberror_Caption = "" ; lblTburl_Caption = "" ; AV11sesion.Remove("Clave"); lblTbfocus_Caption = "" ; } public void GXEnter( ) { /* Execute user event: E152S2 */ E152S2 (); if ( returnInSub ) { returnInSub = true; if (true) return; } } protected void E152S2( ) { /* Enter Routine */ AV19GXLvl8 = 0 ; cmH01002 = new GxDbCommand(dsSYNCCLI.Db, "SELECT [GRUUSUARIO], [GRUPASSWORD], [GRUCOD] FROM [CLISCENT] WITH (NOLOCK) WHERE RTRIM(LTRIM([GRUUSUARIO])) = RTRIM(LTRIM(?)) ORDER BY [GRUCOD] ", CursorType.Readonly, dsSYNCCLI,"PRINCIPAL","H01002",null ); cmH01002.DbCommand.FetchSize = 100; cmH01002.DbCommand.BindString(0,15); cmH01002.DbCommand.BindString(1,15); cmH01002.DbCommand.BindLong(2); cmH01002.AddParameter(1,3,15,0,ParameterDirection.Input); // GX_SQL_CHAR GX_CS_STRING cmH01002.SetParameter(0, AV9usuario); cmH01002.ErrorMask = GxErrorMask.GX_NOMASK | GxErrorMask.GX_MASKLOOPLOCK; cmH01002.FetchData( out H01002); while ( cmH01002.HasMoreRows ) { A1120GRUUS = dsSYNCCLI.Db.GetString(cmH01002, H01002, 0) ; n1120GRUUS = H01002.IsDBNull(0) ; A1119GRUPA = dsSYNCCLI.Db.GetString(cmH01002, H01002, 1) ; n1119GRUPA = H01002.IsDBNull(1) ; A177GRUCOD = dsSYNCCLI.Db.GetInt(cmH01002, H01002, 2) ; AV19GXLvl8 = 1 ; if ( ( String.CompareOrdinal(StringUtil.Trim( A1119GRUPA).TrimEnd(' '), AV10passwo.TrimEnd(' ') ) == 0 ) ) { AV11sesion.Set("Clave", StringUtil.LTrim( StringUtil.Str( (decimal)(A177GRUCOD), 9, 0))); AV8cliente = (int)(((A177GRUCOD))) ; AV13url = formatLink("hagente.aspx") ; lblTburl_Caption = lblTburl_Caption+""+StringUtil.NewLine( ) ; } else { AV12alert = "Password incorrecto" ; /* Execute user subroutine: S113 */ S113 (); if ( returnInSub ) { if ( ( cmH01002 != null ) ) { cmH01002.DbCommand.Close(); } dsSYNCCLI.Release() ; returnInSub = true; if (true) return; } lblTberror_Caption = lblTberror_Caption+""+StringUtil.NewLine( ) ; } cmH01002.HasMoreRows = H01002.Read(); } if ( ( cmH01002 != null ) ) { cmH01002.DbCommand.Close(); } dsSYNCCLI.Release() ; if ( ( AV19GXLvl8 == 0 ) ) { AV12alert = "Usuario incorrecto" ; /* Execute user subroutine: S113 */ S113 (); if ( returnInSub ) { returnInSub = true; if (true) return; } lblTberror_Caption = lblTberror_Caption+""+StringUtil.NewLine( ) ; } } protected void S113( ) { /* 'ERROR' Routine */ lblTberror_Caption = ""+StringUtil.NewLine( ) ; } protected void E122S2( ) { /* Refresh Routine */ } protected void E112S2( ) { /* Aceptar_Click Routine */ AV20GXLvl4 = 0 ; cmH01003 = new GxDbCommand(dsSYNCCLI.Db, "SELECT [GRUUSUARIO], [GRUPASSWORD], [GRUCOD] FROM [CLISCENT] WITH (NOLOCK) WHERE RTRIM(LTRIM([GRUUSUARIO])) = RTRIM(LTRIM(?)) ORDER BY [GRUCOD] ", CursorType.Readonly, dsSYNCCLI,"PRINCIPAL","H01003",null ); cmH01003.DbCommand.FetchSize = 100; cmH01003.DbCommand.BindString(0,15); cmH01003.DbCommand.BindString(1,15); cmH01003.DbCommand.BindLong(2); cmH01003.AddParameter(1,3,15,0,ParameterDirection.Input); // GX_SQL_CHAR GX_CS_STRING cmH01003.SetParameter(0, AV9usuario); cmH01003.ErrorMask = GxErrorMask.GX_NOMASK | GxErrorMask.GX_MASKLOOPLOCK; cmH01003.FetchData( out H01003); while ( cmH01003.HasMoreRows ) { A1120GRUUS = dsSYNCCLI.Db.GetString(cmH01003, H01003, 0) ; n1120GRUUS = H01003.IsDBNull(0) ; A1119GRUPA = dsSYNCCLI.Db.GetString(cmH01003, H01003, 1) ; n1119GRUPA = H01003.IsDBNull(1) ; A177GRUCOD = dsSYNCCLI.Db.GetInt(cmH01003, H01003, 2) ; AV20GXLvl4 = 1 ; if ( ( String.CompareOrdinal(StringUtil.Trim( A1119GRUPA).TrimEnd(' '), AV10passwo.TrimEnd(' ') ) == 0 ) ) { AV11sesion.Set("Clave", StringUtil.LTrim( StringUtil.Str( (decimal)(A177GRUCOD), 9, 0))); AV8cliente = (int)(((A177GRUCOD))) ; AV13url = formatLink("hagente.aspx") ; lblTburl_Caption = lblTburl_Caption+""+StringUtil.NewLine( ) ; } else { AV12alert = "Password incorrecto" ; /* Execute user subroutine: S113 */ S113 (); if ( returnInSub ) { if ( ( cmH01003 != null ) ) { cmH01003.DbCommand.Close(); } dsSYNCCLI.Release() ; returnInSub = true; if (true) return; } lblTberror_Caption = lblTberror_Caption+""+StringUtil.NewLine( ) ; } cmH01003.HasMoreRows = H01003.Read(); } if ( ( cmH01003 != null ) ) { cmH01003.DbCommand.Close(); } dsSYNCCLI.Release() ; if ( ( AV20GXLvl4 == 0 ) ) { AV12alert = "Usuario incorrecto" ; /* Execute user subroutine: S113 */ S113 (); if ( returnInSub ) { returnInSub = true; if (true) return; } lblTberror_Caption = lblTberror_Caption+""+StringUtil.NewLine( ) ; } } protected void nextLoad( ) { } protected void E132S2( ) { /* Load Routine */ } protected void wb_table1_3_2S2( bool wbgen ) { if ( ( wbgen == true ) ) { /* Table start */ WriteHtmlText( " 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sStyleString) ; WriteHtmlText( "\" ") ; } WriteHtmlText( ">") ; WriteHtmlText( "") ; /* Static images/pictures */ ClassString = "Image" ; StyleString = "" + "" ; gx_bitmap( imgImage1_Internalname, "", "imagenes\\banner.jpg", 1, 0, "", "", 0, 0, 0, 0, 0, 0, "", "", 0, "", "", StyleString, ClassString, "", "", "", "", "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( "") ; wb_table2_5_2S2( true) ; } else { wb_table2_5_2S2( false) ; } return ; } protected void wb_table2_5_2S2e( bool wbgen ) { if ( ( wbgen == true ) ) { WriteHtmlText( "") ; /* Text block */ ClassString = "TextBlock" ; StyleString = "" + "" ; gx_label_ctrl( lblTberror_Internalname, 1, 1, 1, lblTberror_Caption, "", "", 0, lblTberror_Jsonclick, "", StyleString, ClassString, "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( " ") ; /* Text block */ ClassString = "TextBlock" ; StyleString = "" + "" ; gx_label_ctrl( lblTburl_Internalname, 1, 1, 1, lblTburl_Caption, "", "", 0, lblTburl_Jsonclick, "", StyleString, ClassString, "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( " ") ; /* Text block */ ClassString = "TextBlock" ; StyleString = "" + "" ; gx_label_ctrl( lblTbfocus_Internalname, 1, 1, 1, lblTbfocus_Caption, "", "", 0, lblTbfocus_Jsonclick, "", StyleString, ClassString, "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( "
 
") ; /* End of table */ WriteHtmlText( "") ; wb_table1_3_2S2e( true) ; } else { wb_table1_3_2S2e( false) ; } } protected void wb_table2_5_2S2( bool wbgen ) { if ( ( wbgen == true ) ) { /* Table start */ WriteHtmlText( " 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sStyleString) ; WriteHtmlText( "\" ") ; } WriteHtmlText( ">") ; WriteHtmlText( "

Usuario

") ; /* Single line edit */ TempTags = " " + "gxctx=\"" + "_" + "" + "\"" + " onFocus=\"gxonfocus2(this, " + "6" + "," + "''" + "," + "0" + ")\"" ; ClassString = "Attribute" ; StyleString = "font-family:'Verdana'; font-size:12pt; font-weight:normal; font-style:normal" + "" ; gx_single_line_edit2( edtavUsuario_Internalname, StringUtil.RTrim( AV9usuario), 15, 15, 1, 0, 1, 0, 0, 0, "", "", StyleString, ClassString, "", StringUtil.RTrim( StringUtil.Format( AV9usuario, "XXXXXXXXXXXXXXX")), TempTags+" onchange=\"gxonchange(this)\" "+" onBlur=\";GXOnBlur(6);\"", 0, edtavUsuario_Jsonclick, "", 0, 1, 1, "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( "

Password

") ; /* Single line edit */ TempTags = " " + "gxctx=\"" + "_" + "" + "\"" + " onFocus=\"gxonfocus2(this, " + "7" + "," + "''" + "," + "0" + ")\"" ; ClassString = "Attribute" ; StyleString = "font-family:'Verdana'; font-size:12pt; font-weight:normal; font-style:normal" + "" ; gx_single_line_edit2( edtavPassword_Internalname, StringUtil.RTrim( AV10passwo), 15, 15, 1, 0, 1, 0, 1, 0, "", "", StyleString, ClassString, "", StringUtil.RTrim( StringUtil.Format( AV10passwo, "XXXXXXXXXXXXXXX")), TempTags+" onchange=\"gxonchange(this)\" "+" onBlur=\";GXOnBlur(7);\"", 0, edtavPassword_Jsonclick, "", 0, 1, 1, "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( "

 

") ; /* Active images/pictures */ ClassString = "Image" ; StyleString = "" + "" ; gx_bitmap( imgAceptar_Internalname, "", "imagenes/entrar.jpg", 1, 1, "", "", 0, 0, 0, 0, 0, 0, "", "", 5, imgAceptar_Jsonclick, "EACEPTAR.CLICK.", StyleString, ClassString, "", "", "", "", "'HLP_HPRINCIPAL.htm'"); WriteHtmlText( "") ; /* End of table */ WriteHtmlText( "") ; wb_table2_5_2S2e( true) ; } else { wb_table2_5_2S2e( false) ; } } public override void setparameters( Object[] obj ) { createObjects(); initialize(); } public override String getresponse( String sGXDynURL ) { BackMsgLst = context.GX_msglist ; context.GX_msglist = LclMsgLst ; sDynURL = sGXDynURL ; nGotPars = (short)(1) ; nGXWrapped = (short)(1) ; PA2S2( ) ; WS2S2( ) ; WE2S2( ) ; this.cleanup(); context.GX_msglist = BackMsgLst ; return ""; } public void responsestatic( String sGXDynURL ) { } protected void define_styles( ) { WriteHtmlTextNl( "") ; idxLst = 1 ; while ( ( idxLst <= Form.Jscriptsrc.Count ) ) { WriteHtmlTextNl( "") ; idxLst = (int)(idxLst+1) ; } /* End function define_styles */ } protected void include_jscripts( ) { WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; WriteHtmlTextNl( "") ; /* End function include_jscripts */ } void gx_hidden_field( String sCtrlName , String sValue ) { skipLines(1); WriteHtmlText( "") ; } void gx_msg_list( String sCtrlName , int nDisplayMode , String sStyleString , String sClassString ) { gx_msg_list2( sCtrlName, nDisplayMode, sStyleString, sClassString, false) ; } void gx_msg_list2( String sCtrlName , int nDisplayMode , String sStyleString , String sClassString , bool bUseClasses ) { int i ; if ( ( context.GX_msglist.ItemCount > 0 ) ) { WriteHtmlText( " 0 ) ) { WriteHtmlText( " class=\"") ; WriteHtmlText( sClassString) ; WriteHtmlText( "\"") ; } if ( ( StringUtil.Len( sStyleString) > 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sStyleString) ; WriteHtmlText( "\" ") ; } WriteHtmlText( ">") ; if ( ( nDisplayMode == 2 ) ) { i = 1 ; while ( ( i <= context.GX_msglist.ItemCount ) ) { if ( bUseClasses && ( context.GX_msglist.getItemType((short)(i)) == 1 ) ) { WriteHtmlText( "") ; } else { if ( bUseClasses ) { WriteHtmlText( "") ; } } WriteHtmlText( context.GX_msglist.getItemText((short)(i))) ; if ( bUseClasses ) { WriteHtmlText( "") ; } WriteHtmlText( "
") ; i = (int)(i+1) ; } } else { WriteHtmlText( "") ; i = 1 ; while ( ( i <= context.GX_msglist.ItemCount ) ) { WriteHtmlText( "
  • ") ; if ( bUseClasses && ( context.GX_msglist.getItemType((short)(i)) == 1 ) ) { WriteHtmlText( "") ; } else { if ( bUseClasses ) { WriteHtmlText( "") ; } } WriteHtmlText( context.GX_msglist.getItemText((short)(i))) ; if ( bUseClasses ) { WriteHtmlText( "") ; } WriteHtmlText( "
  • ") ; i = (int)(i+1) ; } WriteHtmlText( "
    ") ; } context.GX_msglist.removeAllItems(); WriteHtmlText( "
    ") ; } } void gx_bitmap( String sInternalName , String sAccesskey , String sImageURL , int nVisible , int nEnabled , String sAlternateText , String sTooltipText , int nBorderWidth , int nAutoresize , int nWidth , int nHeight , int nVerticalSpace , int nHorizontalSpace , String sLinkURL , String sLinkTarget , int nJScriptCode , String sUserOnClickCode , String sEventName , String sStyleString , String sClassString , String sAlign , String sTags , String sUseMap , String sJsDynCode , String sCallerPgm ) { String sEventJsCode ; String sCapAKey ; sEventJsCode = "" ; sCapAKey = GXUtil.AccessKey( sTooltipText) ; sTooltipText = GXUtil.AccessKeyCaption( sTooltipText) ; if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sCapAKey).TrimEnd(' ') )==0)) ) { sAccesskey = sCapAKey ; } sStyleString = sStyleString + ((nVisible!=0) ? "" : ";display:none;") ; if ( ( nEnabled != 0 ) ) { /* Initialize internal JScript code according to EventNo */ if ( ( nJScriptCode == 1 ) ) { sEventJsCode = "GX_js_close();" + "return false;" ; } else if ( ( nJScriptCode == 2 ) ) { sEventJsCode = "ClearForm( this.form);" + "return false;" ; } else if ( ( nJScriptCode == 3 ) ) { sEventJsCode = "GX_help(" + "''" + "," + StringUtil.Lower( sCallerPgm) + ");" + "return false;" ; } else if ( ( nJScriptCode == 5 ) ) { sEventJsCode = "GX_setevent('" + sEventName + "');" ; } else if ( ( nJScriptCode == 0 ) ) { sEventJsCode = "" ; } else { sEventJsCode = "" ; } } if ( ( nEnabled == 0 ) ) { if ( ( nEnabled != 0 ) ) { gx_start_js_anchor( sEventJsCode, sUserOnClickCode, sLinkURL, sLinkTarget); } else { gx_link_start( sLinkURL, sLinkTarget); } WriteHtmlText( "") ; WriteHtmlText( " 0 ) ) { WriteHtmlText( " border=\"") ; WriteHtmlText( StringUtil.Str( (decimal)(nBorderWidth), 3, 0)) ; WriteHtmlText( "\"") ; if ( ( StringUtil.Len( sClassString) > 0 ) ) { sStyleString = sStyleString + ";border-width: " + StringUtil.Str( (decimal)(nBorderWidth), 3, 0) ; } } if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sAlternateText).TrimEnd(' ') )==0)) ) { WriteHtmlText( " alt=\"") ; WriteHtmlText( sAlternateText) ; WriteHtmlText( "\"") ; } if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sTooltipText).TrimEnd(' ') )==0)) ) { WriteHtmlText( " title=\"") ; WriteHtmlText( sTooltipText) ; WriteHtmlText( "\"") ; } if ( ( nWidth > 0 ) ) { sStyleString = sStyleString + ";width: " + StringUtil.LTrim( StringUtil.Str( (decimal)(nWidth), 10, 0)) ; } if ( ( nHeight > 0 ) ) { sStyleString = sStyleString + ";height: " + StringUtil.LTrim( StringUtil.Str( (decimal)(nHeight), 10, 0)) ; } if ( ( StringUtil.Len( sClassString) > 0 ) ) { WriteHtmlText( " class=\"") ; WriteHtmlText( sClassString) ; WriteHtmlText( "\"") ; } if ( ( StringUtil.Len( sStyleString) > 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sStyleString) ; WriteHtmlText( "\" ") ; } WriteHtmlText( sTags) ; if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sUseMap).TrimEnd(' ') )==0)) ) { WriteHtmlText( " usemap=\"") ; WriteHtmlText( sUseMap) ; WriteHtmlText( "\"") ; } WriteHtmlText( "/>") ; if ( ( nEnabled == 0 ) ) { if ( ( nEnabled != 0 ) ) { gx_end_js_anchor( sEventJsCode, sUserOnClickCode, sLinkURL); } else { gx_link_end( sLinkURL); } } else { if ( ( context.GetBrowserType( ) == 5 ) || ( context.GetBrowserType( ) == 2 ) && ( String.CompareOrdinal(context.GetBrowserVersion( ).TrimEnd(' '), "5.0".TrimEnd(' ') ) <= 0 ) ) { WriteHtmlText( "") ; } } } void gx_link_start( String sLinkURL , String sTargetWnd ) { if ( ( String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sLinkURL).TrimEnd(' ') ) != 0 ) ) { WriteHtmlText( "") ; } } void gx_link_end( String sLinkURL ) { if ( ( String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sLinkURL).TrimEnd(' ') ) != 0 ) ) { WriteHtmlText( "") ; } } void gx_on_js_event( String sEventName , String sEventJsCode , String sUserOnClickCode ) { if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sUserOnClickCode).TrimEnd(' ') )==0)) ) { WriteHtmlText( " ") ; WriteHtmlText( sEventName) ; WriteHtmlText( "=\"if( ") ; if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sEventJsCode).TrimEnd(' ') )==0)) ) { WriteHtmlText( sUserOnClickCode) ; WriteHtmlText( ") {") ; WriteHtmlText( sEventJsCode) ; WriteHtmlText( "} else return false;\"") ; } else { WriteHtmlText( "!(") ; WriteHtmlText( sUserOnClickCode) ; WriteHtmlText( ")) return false;\"") ; } } else { if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sEventJsCode).TrimEnd(' ') )==0)) ) { WriteHtmlText( " ") ; WriteHtmlText( sEventName) ; WriteHtmlText( "=\"") ; WriteHtmlText( sEventJsCode) ; WriteHtmlText( "\"") ; } } } void gx_label_ctrl( String sInternalName , int nVisible , int nEnabled , short nFormat , String sCaption , String sLinkURL , String sLinkTarget , int nJScriptCode , String sUserOnClickCode , String sEventName , String sTags , String sClassString , String sCallerPgm ) { String sEventJsCode ; String sStyle ; sStyle = ((nVisible!=0) ? "" : ";display:none;") + sTags ; if ( ( nFormat != 2 ) ) { WriteHtmlText( " 0 ) ) { WriteHtmlText( " class=\"") ; WriteHtmlText( sClassString) ; WriteHtmlText( "\"") ; } if ( ( StringUtil.Len( sStyle) > 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sStyle) ; WriteHtmlText( "\" ") ; } WriteHtmlText( ">") ; } if ( ( nEnabled != 0 ) ) { /* Initialize internal JScript code according to EventNo */ if ( ( nJScriptCode == 1 ) ) { sEventJsCode = "GX_js_close();" ; } else if ( ( nJScriptCode == 2 ) ) { sEventJsCode = "ClearForm( this.form);" ; } else if ( ( nJScriptCode == 3 ) ) { sEventJsCode = "GX_help(" + "''" + "," + StringUtil.Lower( sCallerPgm) + ");" ; } else if ( ( nJScriptCode == 5 ) ) { sEventJsCode = "GX_setevent('" + sEventName + "');" + "gxSubmit();" ; } else if ( ( nJScriptCode == 0 ) ) { sEventJsCode = "" ; } else { sEventJsCode = "" ; } gx_start_js_anchor( sEventJsCode, sUserOnClickCode, sLinkURL, sLinkTarget); } else { sEventJsCode = "" ; } if ( ( nFormat == 0 ) ) { SendWebValue( sCaption) ; } else { if ( ( nFormat == 3 ) ) { SendWebValueSpace( sCaption) ; } else { WriteHtmlText( sCaption) ; } } if ( ( nEnabled != 0 ) ) { gx_end_js_anchor( sEventJsCode, sUserOnClickCode, sLinkURL); } if ( ( nFormat != 2 ) ) { WriteHtmlText( "") ; } } void gx_start_js_anchor( String sGXOnClickCode , String sUserOnClickCode , String sLinkURL , String sLinkTarget ) { if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sUserOnClickCode).TrimEnd(' ') )==0)) ) { if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sGXOnClickCode).TrimEnd(' ') )==0)) ) { WriteHtmlText( "") ; } else { WriteHtmlText( "") ; } } else { if ( ! ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sGXOnClickCode).TrimEnd(' ') )==0)) ) { WriteHtmlText( "") ; } else { gx_link_start( sLinkURL, sLinkTarget); } } } void gx_end_js_anchor( String sGXOnClickCode , String sUserOnClickCode , String sLinkURL ) { if ( ! ( ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sGXOnClickCode).TrimEnd(' ') )==0)) && ((String.CompareOrdinal("".TrimEnd(' '), StringUtil.RTrim( sUserOnClickCode).TrimEnd(' ') )==0)) ) ) { WriteHtmlText( "") ; } else { gx_link_end( sLinkURL); } } void gx_single_line_edit( String sCtrlName , String sValue , int nSize , int nLength , int nVisible , int nEnabled , int nRTEnabled , short nIsPassword , short nFormat , String sLinkURL , String sLinkTarget , String sStyleString , String sClassString , String sROClassString , String sFormatedValue , String sTags , int nJScriptCode , String sUserOnClickCode , String sEventName , int nParentId , short bHasTheme , short nAutoComplete , String sCallerPgm ) { gx_single_line_edit2( sCtrlName, sValue, nSize, nLength, nVisible, 1, nEnabled, nRTEnabled, nIsPassword, nFormat, sLinkURL, sLinkTarget, sStyleString, sClassString, sROClassString, sFormatedValue, sTags, nJScriptCode, sUserOnClickCode, sEventName, nParentId, bHasTheme, nAutoComplete, sCallerPgm) ; } void gx_single_line_edit2( String sCtrlName , String sValue , int nSize , int nLength , int nVisible , int nRTVisible , int nEnabled , int nRTEnabled , short nIsPassword , short nFormat , String sLinkURL , String sLinkTarget , String sStyleString , String sClassString , String sROClassString , String sFormatedValue , String sTags , int nJScriptCode , String sUserOnClickCode , String sEventName , int nParentId , short bHasTheme , short nAutoComplete , String sCallerPgm ) { String sOStyle ; String sEventJsCode ; String ClassHTML ; sEventJsCode = "" ; sOStyle = sStyleString ; sStyleString = sStyleString + ((nVisible==0)||((nEnabled==0)&&(nRTEnabled==1)) ? ";display:none;" : "") ; if ( ( nRTEnabled != 0 ) || ( nEnabled != 0 ) ) { if ( ( nVisible != 0 ) || ( ( nVisible == 0 ) && ( nRTVisible != 0 ) ) ) { /* Control allows input */ WriteHtmlText( " 0 ) ) { WriteHtmlText( " class=\"") ; WriteHtmlText( sClassString) ; WriteHtmlText( "\"") ; } if ( ( StringUtil.Len( sStyleString) > 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sStyleString) ; WriteHtmlText( "\" ") ; } WriteHtmlText( sTags) ; WriteHtmlText( ">") ; } else { gx_hidden_field( sCtrlName, sValue); } } if ( ( nEnabled == 0 ) ) { /* Control is read only */ if ( ( nRTEnabled == 0 ) ) { gx_hidden_field( sCtrlName, sValue); } if ( ( nVisible != 0 ) || ( ( nVisible == 0 ) && ( nRTVisible != 0 ) ) ) { if ( ( bHasTheme == 0 ) ) { ClassHTML = sClassString ; } else { if ( ( nParentId == 0 ) ) { if ( ( StringUtil.Len( sClassString) != 0 ) && ( StringUtil.StringSearch( sClassString, "Readonly", 1) != 1 ) ) { ClassHTML = "Readonly" + sClassString ; } else { ClassHTML = sClassString ; } } else { if ( ( StringUtil.Len( sROClassString) != 0 ) && ( StringUtil.StringSearch( sROClassString, "Readonly", 1) != 1 ) ) { ClassHTML = "Readonly" + sROClassString ; } else { ClassHTML = sROClassString ; } } } if ( ( nFormat != 2 ) ) { sOStyle = sOStyle + ((nVisible==0) ? ";display:none;" : "") ; WriteHtmlText( " 0 ) ) { WriteHtmlText( " class=\"") ; WriteHtmlText( ClassHTML) ; WriteHtmlText( "\"") ; } if ( ( StringUtil.Len( sOStyle) > 0 ) ) { WriteHtmlText( " style=\"") ; WriteHtmlText( sOStyle) ; WriteHtmlText( "\" ") ; } WriteHtmlText( ">") ; /* Initialize internal JScript code according to EventNo */ if ( ( nJScriptCode == 1 ) ) { sEventJsCode = "GX_js_close();" ; } else if ( ( nJScriptCode == 2 ) ) { sEventJsCode = "ClearForm( this.form);" ; } else if ( ( nJScriptCode == 3 ) ) { sEventJsCode = "GX_help(" + "''" + "," + StringUtil.Lower( sCallerPgm) + ");" ; } else if ( ( nJScriptCode == 5 ) ) { sEventJsCode = "GX_setevent('" + sEventName + "');" + "gxSubmit();" ; } else if ( ( nJScriptCode == 0 ) ) { sEventJsCode = "" ; } else { sEventJsCode = "" ; } gx_start_js_anchor( sEventJsCode, sUserOnClickCode, sLinkURL, sLinkTarget); } if ( ( nIsPassword == 0 ) ) { if ( ( nFormat == 0 ) ) { SendWebValue( sFormatedValue) ; } else { if ( ( nFormat == 3 ) ) { SendWebValueSpace( sFormatedValue) ; } else { WriteHtmlText( sFormatedValue) ; } } } else { SendWebValue( StringUtil.PadR( "", (short)(nSize), "*")) ; } if ( ( nFormat != 2 ) ) { gx_end_js_anchor( sEventJsCode, sUserOnClickCode, sLinkURL); WriteHtmlText( "") ; } } } } protected void initialize_properties( ) { imgImage1_Internalname = "IMAGE1" ; edtavUsuario_Internalname = "_USUARIO" ; edtavPassword_Internalname = "_PASSWORD" ; imgAceptar_Internalname = "ACEPTAR" ; tblTable1_Internalname = "TABLE1" ; lblTberror_Internalname = "TBERROR" ; lblTburl_Internalname = "TBURL" ; lblTbfocus_Internalname = "TBFOCUS" ; tbltbl3_Internalname = "TBL3" ; Form.Internalname = "FORM" ; edtavPassword_Jsonclick = "" ; edtavUsuario_Jsonclick = "" ; lblTbfocus_Caption = "Text Block" ; lblTberror_Caption = "Text Block" ; lblTburl_Caption = "Text Block" ; } protected void cleanup( ) { flushBuffer(); CloseOpenCursors(); if ( IsMain ) { context.CloseConnections() ; } } protected void CloseOpenCursors( ) { } public override void initialize( ) { gxajaxcallmode = 0 ; nGotPars = 0 ; gxfirstwebparm = "" ; GxWebError = 0 ; wbTemp = 0 ; idxLst = 0 ; Form = new GXWebForm(); addContentType = false ; sDynURL = "" ; GXt_char1 = "" ; GXt_char2 = "" ; GXt_char3 = "" ; GXt_char4 = "" ; GXt_char5 = "" ; FormProcess = "" ; A1120GRUUS = "" ; A1119GRUPA = "" ; A177GRUCOD = 0 ; wbLoad = false ; wbEnd = 0 ; wbStart = 0 ; sPrefix = "" ; GXSUBMITID = "" ; Rfr0gs = false ; wbErr = false ; sEvt = "" ; EvtGridId = "" ; EvtRowId = "" ; sEvtType = "" ; nDonePA = 0 ; lblTberror_Name = "" ; lblTburl_Name = "" ; lblTbfocus_Name = "" ; GX_FocusControl = "" ; edtavUsuario_Internalname = "" ; nDoneStart = 0 ; AV9usuario = "" ; AV10passwo = "" ; edtavPassword_Internalname = "" ; returnInSub = false ; lblTberror_Caption = "" ; lblTburl_Caption = "" ; AV11sesion = new GxWebSession( context); lblTbfocus_Caption = "" ; AV19GXLvl8 = 0 ; scmdbuf = "" ; n1120GRUUS = false ; n1119GRUPA = false ; AV8cliente = 0 ; AV13url = "" ; AV12alert = "" ; AV20GXLvl4 = 0 ; tbltbl3_Internalname = "" ; ClassString = "" ; StyleString = "" ; imgImage1_Internalname = "" ; lblTberror_Internalname = "" ; lblTberror_Jsonclick = "" ; lblTburl_Internalname = "" ; lblTburl_Jsonclick = "" ; lblTbfocus_Internalname = "" ; lblTbfocus_Jsonclick = "" ; tblTable1_Internalname = "" ; TempTags = "" ; edtavUsuario_Jsonclick = "" ; edtavPassword_Jsonclick = "" ; imgAceptar_Internalname = "" ; imgAceptar_Jsonclick = "" ; BackMsgLst = new msglist(); LclMsgLst = new msglist(); nGXWrapped = 0 ; Formheaderjscriptsrc = new GeneXus.Utils.GxStringCollection(); GXt_char7 = "" ; GXt_char6 = "" ; GXt_char8 = "" ; /* GeneXus formulas. */ context.Gx_err = 0 ; } private short gxajaxcallmode ; private short nGotPars ; private short GxWebError ; private short wbTemp ; private short wbEnd ; private short wbStart ; private short nDonePA ; private short nDoneStart ; private short AV19GXLvl8 ; private short AV20GXLvl4 ; private short nGXWrapped ; private int idxLst ; private int A177GRUCOD ; private int AV8cliente ; private String gxfirstwebparm ; private String sDynURL ; private String GXt_char1 ; private String GXt_char2 ; private String GXt_char3 ; private String GXt_char4 ; private String GXt_char5 ; private String FormProcess ; private String A1120GRUUS ; private String A1119GRUPA ; private String sPrefix ; private String GXSUBMITID ; private String sEvt ; private String EvtGridId ; private String EvtRowId ; private String sEvtType ; private String lblTberror_Name ; private String lblTburl_Name ; private String lblTbfocus_Name ; private String GX_FocusControl ; private String edtavUsuario_Internalname ; private String AV9usuario ; private String AV10passwo ; private String edtavPassword_Internalname ; private String lblTberror_Caption ; private String lblTburl_Caption ; private String lblTbfocus_Caption ; private String scmdbuf ; private String AV13url ; private String AV12alert ; private String tbltbl3_Internalname ; private String sStyleString ; private String ClassString ; private String StyleString ; private String imgImage1_Internalname ; private String lblTberror_Internalname ; private String lblTberror_Jsonclick ; private String lblTburl_Internalname ; private String lblTburl_Jsonclick ; private String lblTbfocus_Internalname ; private String lblTbfocus_Jsonclick ; private String tblTable1_Internalname ; private String TempTags ; private String edtavUsuario_Jsonclick ; private String edtavPassword_Jsonclick ; private String imgAceptar_Internalname ; private String imgAceptar_Jsonclick ; private String GXt_char7 ; private String GXt_char6 ; private String GXt_char8 ; private bool addContentType ; private bool wbLoad ; private bool Rfr0gs ; private bool wbErr ; private bool returnInSub ; private bool n1120GRUUS ; private bool n1119GRUPA ; private GxWebSession AV11sesion ; private GeneXus.Utils.GxStringCollection Formheaderjscriptsrc ; private GXWebForm Form ; private IGxDataStore dsSIFEE ; private IGxDataStore dsFACPROD ; private IGxDataStore dsSYNCKARPD75 ; private IGxDataStore dsSYNCCLI ; private IGxDataStore dsSYNC ; private IGxDataStore dsDefault ; private GxDbCommand cmH01002 ; private IDataReader H01002 ; private GxDbCommand cmH01003 ; private IDataReader H01003 ; private msglist BackMsgLst ; private msglist LclMsgLst ; } }