protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_categoriaInsert" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- // if (!this.IsPostBack) { this.loadData(); } // else don't. } // end Page_Load.
protected void Page_Load(object sender, EventArgs e) { // if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) {// un-logged user. Close both logs and goto error. this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_UpdateAbstract" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if (!this.IsPostBack) { this.evaluateStateParams(); // load abstract for update. this.loadData( ); } else { // it's a commit -> don't load. } }// end Page_Load().
protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_candidatoInsert" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if (!this.IsPostBack) { ComboManager.populate_Combo_ddlSettore_for_INSERT( this.ddlSettori, null // no preselection. Instead to preselect choose the ordinal; eg. 2=="Appalti". ); }// else DO NOT refresh the combo: it deletes the performed selection. }// end Page_Load
protected void Page_Load(object sender, EventArgs e) { //--check just onEntry, since also un-logged can enter here.----- // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "errore" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- object errore = this.Session["errore"]; if (null == errore) { this.lblTitolo.Text = ""; this.lblStato.Text = ""; } else { this.lblTitolo.Text = "Si e' verificato un errore."; this.lblStato.Text = "I dettagli dell'errore verificatosi sono: " + (string)this.Session["errore"]; LoggingToolsContainerNamespace.LoggingToolsContainer.LogBothSinks_DbFs( this.lblTitolo.Text + this.lblStato.Text , 5); } // if (VerificaLasciapassare.CanLogOn(this.Session, this.Request.UserHostAddress)) { try { Control loginForm = this.LoginSquareClient1.FindControl("divLoginSquareContent"); loginForm.Visible = false;// hide login. } catch (System.Exception ex) { string dbg = ex.Message + "___" + ex.StackTrace; } } // else show login. } // end Page_Load
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // // object ref_candidato_id = this.Session["ref_candidato_id"]; if (null == ref_candidato_id) { throw new System.Exception("ref_candidato_id cannot be missing, in this page."); }// else continue. try { this.int_ref_candidato_id = (int)ref_candidato_id; } catch (System.Exception ex) { string dbg = ex.Message; this.int_ref_candidato_id = -1;// Proxy will manage. } // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_cvMultiInsert" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if (!this.IsPostBack) { } else { } }// end Page_Load
protected void Page_Load(object sender, EventArgs e) { // log-fs LogSinkFs.Wrappers.LogWrappers.SectionOpen( "pagina:ChangePwd, metodo:Page_Load, " + this.Session.SessionID + " ip_client: " + this.Request.UserHostAddress, 0); // end log-fs // log-db LogSinkDb.Wrappers.LogWrappers.SectionOpen( "pagina:ChangePwd, metodo:Page_Load", 0); LogSinkDb.Wrappers.LogWrappers.SectionContent( this.Session.SessionID + " ip_client: " + this.Request.UserHostAddress, 0); // end log-db // if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) {// un-logged user. Close both logs and goto error. LogSinkFs.Wrappers.LogWrappers.SectionClose(); LogSinkDb.Wrappers.LogWrappers.SectionClose(); this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_changePwd" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- LogSinkFs.Wrappers.LogWrappers.SectionClose(); LogSinkDb.Wrappers.LogWrappers.SectionClose(); }// end Page_Load
private int indexOfAllSectors; // it's one after the last id in the table. protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Session["indexOfAllSectors"] = null;// be sure to clean. this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // // PostBack or not, refresh in Session, the present addres of the DynamicPortion method, which has // to be called from PagerDbView. Such address changes at every round-trip( tested). CacherDbView.DynamicPortionPtr dynamicPortionPtr = new CacherDbView.DynamicPortionPtr( this.prepareLavagnaDynamicPortion); this.Session["DynamicPortionPtr"] = dynamicPortionPtr; // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_queryCandidato" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if ( !this.IsPostBack &&//----------------------------------------------------false !(bool)(this.Session["IsReEntrant"]) //-----------------------------false ) { // first absolute entrance // ComboManager.populate_Combo_ddlSettore_for_LOAD( //---primo popolamento. this.ddlSettori, 0 // "null" or <0, for no preselection. Instead to preselect choose the ordinal; eg. 2=="Appalti", 0 for "choose your Sector", which performs no query. , out indexOfAllSectors ); this.Session["indexOfAllSectors"] = indexOfAllSectors; // NB.---cache across postbacks.----- this.Session["comboSectors_selectedValue"] = 0; // NB.---cache across postbacks.----- // this.loadData(0); // means no query. } else if ( !this.IsPostBack &&//----------------------------------------------------false (bool)(this.Session["IsReEntrant"]) //------------------------------true ) { // coming from html-numbers of pager // needed combo-refresh, but re-select combo-Value from Session -------- // int int_comboSectors_selectedValue = (int)(this.Session["comboSectors_selectedValue"]); // NB.---cache across postbacks.----- ComboManager.populate_Combo_ddlSettore_for_LOAD( //---primo popolamento. this.ddlSettori, int_comboSectors_selectedValue // "null" or <0, for no preselection. Instead to preselect choose the ordinal; eg. 2=="Appalti", 0 for "choose your Sector", which performs no query. , out indexOfAllSectors ); this.Session["indexOfAllSectors"] = indexOfAllSectors;// NB.---cache across postbacks.----- // // pager will load the new-chunk, based on a get-param. object obj_CacherDbView = this.Session["CacherDbView"]; if (null != obj_CacherDbView) { ((CacherDbView)obj_CacherDbView).Pager_EntryPoint( this.Session , this.Request , this.grdDatiPaginati , this.pnlPageNumber ); } else { loadData(int_comboSectors_selectedValue); // TODO debug // don't throw new System.Exception(" queryCandidato::Page_Load . this.Session[CacherDbView] is null. "); } } else if ( this.IsPostBack &&//------------------------------------------------------true !(bool)(this.Session["IsReEntrant"]) //------------------------------false ) { // don't: throw new System.Exception(" impossible case: if IsReEntrant at least one entry occurred. "); } else if ( this.IsPostBack &&//------------------------------------------------------true (bool)(this.Session["IsReEntrant"]) //-------------------------------true ) { // coming from combo-index-changed. // no combo-refresh. // drop the current view and create the new one, by delegate ddlSettoriRefreshQuery. } // no "else" possible: case mapping is complete. } // end Page_Load
protected void Page_Load(object sender, EventArgs e) { // if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) {// un-logged user. Close both logs and goto error. this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_LogViewerWeb" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if (!this.IsPostBack) { int int_month = DateTime.Today.Month; string str_month; if (10 > int_month) { str_month = "0" + int_month.ToString(); } else { str_month = int_month.ToString(); } // int int_day = DateTime.Today.Day; string str_day; if (10 > int_day) { str_day = "0" + int_day.ToString(); } else { str_day = int_day.ToString(); } // string from = DateTime.Today.Year.ToString() + str_month + str_day; string to = DateTime.Today.Year.ToString() + str_month + str_day; System.Data.DataTable webLogTbl = Entity.Proxies.LogViewer_web_cvDb_SERVICE.LogViewer_web_cvDb( from, to ); if ( null == webLogTbl || 0 == webLogTbl.Rows.Count ) { this.grdLogging.DataSource = null; } else { this.grdLogging.DataSource = webLogTbl; this.grdLogging.DataBind(); } } // leave existing data on PostBack. } //
protected void Page_Load(object sender, EventArgs e) { string Lang = null; if (Request.UserLanguages != null) { if (0 < Request.UserLanguages.Length) { Lang = Request.UserLanguages[0]; if (Lang != null) { // TODO } else { // TODO } /* ---------------------------- tips & tricks ---------------------------------- * * System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(Lang) ; * if (CurrencySymbol != null && CurrencySymbol != "") * { * CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol = CurrencySymbol; * }// else skip * */ } // else skip } // else skip string currentCurrencySymbol = System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol; // //--check just onEntry, since also un-logged can enter here.----- // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "home" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- LogSinkFs.Wrappers.LogWrappers.SectionOpen("cv_db::home,Page_Load", 0); LogSinkDb.Wrappers.LogWrappers.SectionOpen("cv_db::home,Page_Load", 0); // LogSinkFs.Wrappers.LogWrappers.SectionContent(this.Request.UserHostName, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent(this.Request.UserHostName, 0); // LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.AnonymousID = " + this.Request.AnonymousID, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.ApplicationPath = " + this.Request.ApplicationPath, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.AppRelativeCurrentExecutionFilePath = " + this.Request.AppRelativeCurrentExecutionFilePath, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.CurrentExecutionFilePath = " + this.Request.CurrentExecutionFilePath, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.FilePath = " + this.Request.FilePath, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.Form = " + this.Request.Form, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.IsAuthenticated = " + this.Request.IsAuthenticated, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.IsLocal = " + this.Request.IsLocal, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.LogonUserIdentity = " + this.Request.LogonUserIdentity, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.PhysicalApplicationPath = " + this.Request.PhysicalApplicationPath, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.QueryString = " + this.Request.QueryString, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.ServerVariables = " + this.Request.ServerVariables, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.UserHostAddress = " + this.Request.UserHostAddress, 0); LogSinkDb.Wrappers.LogWrappers.SectionContent("this.Request.UserHostName = " + this.Request.UserHostName, 0); // // LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.AnonymousID = " + this.Request.AnonymousID, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.ApplicationPath = " + this.Request.ApplicationPath, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.AppRelativeCurrentExecutionFilePath = " + this.Request.AppRelativeCurrentExecutionFilePath, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.CurrentExecutionFilePath = " + this.Request.CurrentExecutionFilePath, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.FilePath = " + this.Request.FilePath, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.Form = " + this.Request.Form, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.IsAuthenticated = " + this.Request.IsAuthenticated, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.IsLocal = " + this.Request.IsLocal, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.LogonUserIdentity = " + this.Request.LogonUserIdentity, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.PhysicalApplicationPath = " + this.Request.PhysicalApplicationPath, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.QueryString = " + this.Request.QueryString, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.ServerVariables = " + this.Request.ServerVariables, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.UserHostAddress = " + this.Request.UserHostAddress, 0); LogSinkFs.Wrappers.LogWrappers.SectionContent("this.Request.UserHostName = " + this.Request.UserHostName, 0); // LogSinkFs.Wrappers.LogWrappers.SectionClose(); LogSinkDb.Wrappers.LogWrappers.SectionClose(); // if (VerificaLasciapassare.CanLogOn(this.Session, this.Request.UserHostAddress)) { try { Control loginForm = this.LoginSquareClient1.FindControl("divLoginSquareContent"); loginForm.Visible = false;// hide login. } catch (System.Exception ex) { string dbg = ex.Message + "___" + ex.StackTrace; } } // else show login. } // end Page_Load()
protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Session["indexOfAllSectors"] = null;// be sure to clean. this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // // PostBack or not, refresh in Session, the present addres of the DynamicPortion method, which has // to be called from PagerDbView. Such address changes at every round-trip( tested). CacherDbView.DynamicPortionPtr dynamicPortionPtr = new CacherDbView.DynamicPortionPtr( this.prepareLavagnaDynamicPortion); this.Session["DynamicPortionPtr"] = dynamicPortionPtr; // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_PrimeDataGrid" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if ( !this.IsPostBack &&//----------------------------------------------------false !(bool)(this.Session["IsReEntrant"]) //-----------------------------false ) { // first absolute entrance // this.fieldReader_withDefaults_(); this.loadData(this.minKey, this.maxKey); // min==max means no query, min<max queries. } else if ( !this.IsPostBack &&//----------------------------------------------------false (bool)(this.Session["IsReEntrant"]) //------------------------------true ) { // coming from html-numbers of pager // needed combo-refresh, but re-select combo-Value from Session NB. -------- // pager will load the new-chunk, based on a get-param. object obj_CacherDbView = this.Session["CacherDbView"]; if (null != obj_CacherDbView) { ((CacherDbView)obj_CacherDbView).Pager_EntryPoint( this.Session , this.Request , this.grdDatiPaginati , this.pnlPageNumber ); } else { this.fieldReader_withDefaults_(); this.loadData(this.minKey, this.maxKey);// min==max means no query, min<max queries. LoggingToolsContainerNamespace.LoggingToolsContainer.LogBothSinks_DbFs( " PrimeGrid::Page_Load . this.Session[CacherDbView] is null: re-built. " , 0); } // System.Web.UI.WebControls.TextBox txtRowsInPage = null; try { txtRowsInPage = (System.Web.UI.WebControls.TextBox)(this.PageLengthManager1.FindControl("txtRowsInPage")); txtRowsInPage.Text = ((CacherDbView)(this.Session["CacherDbView"])).RowsInChunk.ToString(); } catch (System.Exception ex) { string dbg = ex.Message + "___" + ex.StackTrace; } } else if ( this.IsPostBack &&//------------------------------------------------------true !(bool)(this.Session["IsReEntrant"]) //------------------------------false ) { } else if ( this.IsPostBack &&//------------------------------------------------------true (bool)(this.Session["IsReEntrant"]) //-------------------------------true ) { // coming from combo-index-changed. // system calls btn_delegate() }// no "else" possible: case mapping is complete. }// end Page_Load
protected void Page_Load(object sender, EventArgs e) { if (!VerificaLasciapassare.CanLogOn( this.Session, this.Request.UserHostAddress ) ) { this.Response.Redirect("../errore.aspx"); }// else il lasciapassare e' valido -> get in. // // // PostBack or not, refresh in Session, the present addres of the DynamicPortion method, which has // to be called from PagerDbView. Such address changes at every round-trip( tested). CacherDbView.DynamicPortionPtr dynamicPortionPtr = new CacherDbView.DynamicPortionPtr( this.prepareLavagnaDynamicPortion); this.Session["DynamicPortionPtr"] = dynamicPortionPtr; // /* * NB. page state check.----------------------------------------------------------------- * */ PageStateChecker.PageStateChecker_SERVICE( "zonaRiservata_cvMultiRead" , this.Request , this.IsPostBack , this.Session ); //----------------------------------------------- END page state check.----------------- if ( !this.IsPostBack &&//----------------------------------------------------false !(bool)(this.Session["IsReEntrant"]) //-----------------------------false ) { // first absolute entrance object ref_candidato_id = this.Session["ref_candidato_id"]; if (null == ref_candidato_id) { throw new System.Exception("ref_candidato_id cannot be missing, in this page."); }// else continue. int int_ref_candidato_id; try { int_ref_candidato_id = (int)ref_candidato_id; System.Data.DataTable tblCandidatoDescription = Entity.Proxies.usp_candidato_LOAD_Description_SERVICE.usp_candidato_LOAD_Description( int_ref_candidato_id ); // table should be as: {Kral Hannes, Diritto Societario} // es. this.lblDeCuius.Text = "Gino Paoli / settore_BLA"; this.lblDeCuius.Text = (string)(tblCandidatoDescription.Rows[0].ItemArray[0]) + " / " + (string)(tblCandidatoDescription.Rows[0].ItemArray[1]); // this.lblDeCuius.BackColor = System.Drawing.Color.Transparent; } catch (System.Exception ex) { string dbg = ex.Message; this.lblDeCuius.Text = "Errore. Utilizzare i menu per il cambio pagina, non i bottoni della cache. "; this.lblDeCuius.BackColor = System.Drawing.Color.LightCoral; int_ref_candidato_id = -1;// Proxy will manage. } // this.loadData(int_ref_candidato_id); } else if ( !this.IsPostBack &&//----------------------------------------------------false (bool)(this.Session["IsReEntrant"]) //------------------------------true ) { // coming from html-numbers of pager // // pager will load the new-chunk, based on a get-param. object obj_CacherDbView = this.Session["CacherDbView"]; if (null != obj_CacherDbView) { ((CacherDbView)obj_CacherDbView).Pager_EntryPoint( this.Session , this.Request , this.grdDatiPaginati , this.pnlPageNumber ); } else { throw new System.Exception(" candidatoLoad::Page_Load . this.Session[CacherDbView] is null. "); } } else if ( this.IsPostBack &&//------------------------------------------------------true !(bool)(this.Session["IsReEntrant"]) //------------------------------false ) { } else if ( this.IsPostBack &&//------------------------------------------------------true (bool)(this.Session["IsReEntrant"]) //-------------------------------true ) { // coming from RowCommand buttons. }// no "else" possible: case mapping is complete. }//