protected void Page_Load(object sender, EventArgs e) { ScriptManager1.RegisterPostBackControl(Button1); if (!IsPostBack) { var mode = Request.Params["Mode"]; switch (mode) { case "View": DetailsView2.ChangeMode(DetailsViewMode.ReadOnly); break; case "Entry": DetailsView2.ChangeMode(DetailsViewMode.Edit); break; default: DetailsView2.ChangeMode(DetailsViewMode.Insert); DetailsView2.FooterRow.Visible = false; break; } DetailsView2Databinding(); } lblEmailSuccess.Visible = lblSaveError.Visible = false; }
//protected static DataTable Patrol_DataTable = new DataTable(); protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { Response.Redirect("Login.aspx"); return; } var user = (User)Session["User"]; //MaintenancePanel_Patrols.Visible = true; Patrols_Add_Popup.Width = 400; Patrols_Add_Popup.Height = 400; Patrols_Add_Popup.ShowCloseButton = true; Session["UserID"] = user.UserID; Session["UserRoleID"] = Core.Handler_User.User_Role_Maintenance; if (!Page.IsPostBack) { if (Patrol_Add_Ahwal_ComboBox.Items.Count > 0) { Patrol_Add_Ahwal_ComboBox.SelectedIndex = 0; } PatrolsGrid.DataBind(); } ScriptManager1.RegisterPostBackControl(PatrolsGrid); }
protected void Page_Load(object sender, EventArgs e) { ScriptManager1.RegisterAsyncPostBackControl(lkbPesquisar); ScriptManager1.RegisterPostBackControl(ddlAcao); ScriptManager1.RegisterPostBackControl(ddlTabela); if (!IsPostBack) { CarregarGridAuditoria(); //updFiltro.Update(); UpdatePanelAuditoria.Update(); //UpdatePanelAuditoria.Update(); ddlAcao.Items.Insert(0, new ListItem("Selecione", "SELECIONE")); ddlAcao.Items.Insert(1, new ListItem("Inserção", "INSERCAO")); ddlAcao.Items.Insert(2, new ListItem("Alteração", "ALTERACAO")); ddlAcao.Items.Insert(3, new ListItem("Exclusão", "EXCLUSAO")); ddlTabela.Items.Insert(0, new ListItem("Selecione", "SELECIONE")); ddlTabela.Items.Insert(1, new ListItem("Critérios Gerais", "CGE_CRITERIOS_GERAIS")); ddlTabela.Items.Insert(2, new ListItem("Criterios do PI", "CPI_CRITERIO_PI")); ddlTabela.Items.Insert(3, new ListItem("Eventos", "EVE_EVENTOS")); ddlTabela.Items.Insert(4, new ListItem("Alunos do grupo", "GAL_GRUPO_ALUNO")); ddlTabela.Items.Insert(5, new ListItem("Grupo", "GRU_GRUPO")); ddlTabela.Items.Insert(6, new ListItem("Histórico do Aluno", "HIS_HISTORICO_ALUNO_DISCIPLINA")); ddlTabela.Items.Insert(7, new ListItem("Mensagens", "MSG_MENSAGEM")); ddlTabela.Items.Insert(8, new ListItem("Coordenadores", "PER_PERFIL")); ddlTabela.Items.Insert(9, new ListItem("Requerimento", "REQ_REQUERIMENTO")); } ddlAcao.AutoPostBack = false; ddlTabela.AutoPostBack = false; }
protected void GridView1_PreRender(object sender, EventArgs e) { //ScriptManager1.RegisterPostBackControl(Lbtn_newsContent); for (int i = 0; i < GridView1.Rows.Count; i++) { ScriptManager1.RegisterPostBackControl(GridView1.Rows[i].FindControl("LinkButton1")); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindNavigation(); } ScriptManager1.RegisterPostBackControl(btnImgUpdate); ScriptManager1.RegisterPostBackControl(btnTechSpcUpdate); }
protected void Page_Load(object sender, EventArgs e) { MRPatrolsGrid.SettingsPopup.HeaderFilter.Width = 300; MRPatrolsGrid.SettingsPopup.HeaderFilter.Height = 320; if (Session["User"] == null) { Response.Redirect("Login.aspx"); } var user = (User)Session["User"]; Session["UserID"] = user.UserID; Session["UserRoleID"] = Core.Handler_User.User_Role_Maintenance; ScriptManager1.RegisterPostBackControl(MRPatrolsGrid); }
protected void gdvProjetos_RowDataBound(object sender, GridViewRowEventArgs e) { LinkButton hab = (LinkButton)e.Row.FindControl("lkbHabilitar"); //acha o linkbutton habilitar e coloca no controle lb if (hab != null) { ScriptManager1.RegisterPostBackControl(hab); //usando o ScriptManager, registra todos os botões habilitar para fazer postback) } LinkButton grupo = (LinkButton)e.Row.FindControl("lblNome"); //acha o botão download e coloca no controle lb if (grupo != null) { ScriptManager1.RegisterPostBackControl(grupo); //usando o ScriptManager, registra todos os linkbutton de ver detalhes para fazer postback) } }
protected void gv_consentlist_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { GridViewRow row = e.Row; //LogToPageUrgent(" ** HERE IN gv_EditCFV_Items_RowDataBound*** "); try { Label version = e.Row.FindControl("Version") as Label; int versnum = Convert.ToInt16(version.Text); if (versnum > 1) { Label ConsentFormName = e.Row.FindControl("ConsentFormName") as Label; ConsentFormName.Visible = false; Label consentformID = e.Row.FindControl("consentformID") as Label; consentformID.Visible = false; } else { e.Row.Style.Add("BORDER-TOP", "#666666 5px solid"); } Label NumItems_lbl = e.Row.FindControl("NumItems") as Label; int NumItems = Convert.ToInt16(NumItems_lbl.Text); Button lnkbtn_Details = e.Row.FindControl("lnkbtn_Details") as Button; //ScriptManager1.RegisterAsyncPostBackControl(lnkbtn_Details); ScriptManager1.RegisterPostBackControl(lnkbtn_Details); if (NumItems > 0) { lnkbtn_Details.Visible = true; } } catch (Exception) { //LogToPageUrgent(exc.Message); } } }
protected void gv_measures_RowDataBound(object sender, GridViewRowEventArgs e) { GridViewRow row = e.Row; if (row.RowType == DataControlRowType.DataRow) { Button btn = (Button)e.Row.FindControl("btnGetMeasureDetails"); if (btn != null) { ScriptManager1.RegisterPostBackControl(btn); } Button btn2 = (Button)e.Row.FindControl("btnUpdateMeasureStats"); if (btn2 != null) { string needupdate = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "data_lastupdated")); ScriptManager1.RegisterPostBackControl(btn2); btn2.Visible = (needupdate.Contains("Update") ? true : false); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { Response.Redirect("Login.aspx"); } var user = (User)Session["User"]; Session["UserID"] = user.UserID; Session["UserRoleID"] = Core.Handler_User.User_Role_Ahwal; Person_Add_PopUp.Width = 400; Person_Add_PopUp.Height = 400; Person_Add_PopUp.ShowCloseButton = true; if (!Page.IsPostBack) { if (Persons_Add_Ahwal_CombobBox.Items.Count > 0) { Persons_Add_Ahwal_CombobBox.SelectedIndex = 0; } AhwalsPersonsGrid.DataBind(); } ScriptManager1.RegisterPostBackControl(AhwalsPersonsGrid); }
protected void Page_Load(object sender, EventArgs e) { ScriptManager1.RegisterPostBackControl(UpdateUpload); ScriptManager1.RegisterPostBackControl(DeleteAvatarButton); ScriptManager1.RegisterPostBackControl(btnUpdateBio); ScriptManager1.RegisterPostBackControl(ChangePasswordButton); if (Request.QueryString["dv"] == "1" || Request.QueryString["av"] == "1" || Request.QueryString["iv"] == "1") { TabContainer1.ActiveTabIndex = 2; } else if (Request.QueryString["bio"] == "1") { TabContainer1.ActiveTabIndex = 2; } else if (Request.QueryString["pr"] == "1") { TabContainer1.ActiveTabIndex = 0; } else { TabContainer1.ActiveTabIndex = 0; } if (!Page.IsPostBack) { if (Page.User.Identity.IsAuthenticated) { SueetieUser sueetieUser = SueetieUsers.GetUser(CurrentUserID, false); SetActiveButtonAttributes(CancelButton); SetActiveButtonAttributes(ChangePasswordButton); SetActiveButtonAttributes(btnUpdateProfile); SetActiveButtonAttributes(btnUpdateBio); SueetieUIHelper.PopulateTimeZoneList(ddTimeZones, sueetieUser.TimeZone.ToString()); SueetieUserProfile profile = CurrentSueetieUser.Profile; txtCurrentPassword.Text = string.Empty; txtDisplayName.Text = sueetieUser.DisplayName; txtEmail.Text = sueetieUser.Email; #region Optional Profile Property Assignments if (chkNewsletter != null) { HasNewsletterCheckBox = true; chkNewsletter.Checked = profile.Newsletter; } #endregion // When using ProfileBase... //ProfileBase profile = HttpContext.Current.Profile; //txtDisplayName.Text = profile["DisplayName"] as string; //ddlGenders.SelectedValue = profile["Gender"] as string; //ddlOccupations.SelectedValue = profile["Occupation"] as string; //txtWebsite.Text = profile["Website"] as string; //txtTwitterName.Text = profile["TwitterName"] as string; //ddlCountries.SelectedValue = profile["Country"] as string; txtBio.Text = sueetieUser.Bio; } } BindData(); }
protected void gv_coderpairs_list_RowDataBound(object sender, GridViewRowEventArgs e) { GridViewRow row = e.Row; if (row.RowType == DataControlRowType.DataRow) { Button btn = (Button)e.Row.FindControl("btnGetCoderDetails"); if (btn != null) { ScriptManager1.RegisterPostBackControl(btn); } btn.Visible = false; string mycolor = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "sms_dd_color")); row.Cells[18].BackColor = Color.FromName(mycolor); string mycolor_REL = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "sms_dd_color_REL")); row.Cells[25].BackColor = Color.FromName(mycolor_REL); string relDone = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "sms_dd_status_REL")); int n_adminerr = Convert.ToInt16(DataBinder.Eval(e.Row.DataItem, "n_adminerr")); if (n_adminerr > 0) { row.Cells[7].BackColor = Color.FromArgb(255, 207, 0); } double pct1 = Convert.ToDouble(DataBinder.Eval(e.Row.DataItem, "pctagree_items1")); double pctalg = Convert.ToDouble(DataBinder.Eval(e.Row.DataItem, "pctagree_alg")); // double pct3 = Convert.ToDouble(DataBinder.Eval(e.Row.DataItem, "pctagree_items3")); int n_items1 = Convert.ToInt16(DataBinder.Eval(e.Row.DataItem, "n_items1")); int n_items2 = Convert.ToInt16(DataBinder.Eval(e.Row.DataItem, "n_items2")); int n_items3 = Convert.ToInt16(DataBinder.Eval(e.Row.DataItem, "n_items3")); int n_items_alg = Convert.ToInt16(DataBinder.Eval(e.Row.DataItem, "n_items_alg")); string id = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "id")); if (n_items1 > 0 | n_items2 > 0 | n_items3 > 0) { btn.Visible = true; } //color the cells with the ORIG and REL data entry status if (n_items2 == -999) { row.Cells[3].Text = ""; } // no scores if (n_items3 == -999) { row.Cells[4].Text = ""; } // no discrete if (n_items1 == -999) { row.Cells[5].Text = ""; row.Cells[6].Text = ""; row.Cells[7].Text = ""; } // no items if (pct1 >= 80) { row.Cells[8].BackColor = Color.SkyBlue; } else if (pct1 >= 0) { row.Cells[8].BackColor = Color.Cornsilk; } else if (pct1 == -999 & n_items1 == 0) { row.Cells[8].ForeColor = Color.LightGray; row.Cells[7].Text = "na"; } else if (pct1 == -999 & n_items1 == -999) { row.Cells[8].Text = ""; } if (pctalg >= 80) { row.Cells[11].BackColor = Color.SkyBlue; } else if (pctalg >= 0) { row.Cells[11].BackColor = Color.Cornsilk; } else if (pctalg == -999 & n_items_alg == 0) { row.Cells[11].ForeColor = Color.LightGray; row.Cells[11].Text = "na"; } else if (pctalg == -999 & n_items_alg == -999) { row.Cells[11].Text = ""; row.Cells[11].Text = ""; row.Cells[12].Text = ""; row.Cells[12].Text = ""; } //To Do //Hide Alg columns if all missing } }
protected void Page_Load(object sender, EventArgs e) { ScriptManager1.RegisterPostBackControl(ButtonGurdar); }
// for Default.aspx, File Upload Object, called in the Page_Load Event to return PostBack on parameters sent public void RegisterTrigger(Control ct) { ScriptManager1.RegisterPostBackControl(ct); }
protected void Page_Load(object sender, EventArgs e) { if (Session["entry"] == null || !bool.Parse(Session["entry"].ToString()) || Request.QueryString["merchantId"] == null || Session["token"] == null || Request.QueryString["token"] == null || Session["token"].ToString() != Request.QueryString["token"].ToString() || Session["Utente"] == null || Session["settings"] == null || Request.QueryString["amzOrd"] == null) { Session.Abandon(); Response.Redirect("login.aspx?path=amzPanoramica"); } ScriptManager1.RegisterPostBackControl(btnMakePdf); Year = (int)Session["year"]; if (!IsPostBack) { LavClass.MafraInit folder = LavClass.MAFRA_INIT(Server.MapPath("")); if (folder.mafraPath == "") { folder.mafraPath = Server.MapPath("\\"); } this.settings = new UtilityMaietta.genSettings(folder.mafraPath); settings.ReplacePath(@folder.mafraInOut1[0], @folder.mafraInOut1[1]); settings.ReplacePath(@folder.mafraInOut2[0], @folder.mafraInOut2[1]); amzSettings = new AmzIFace.AmazonSettings(settings.lavAmazonSettingsFile, Year); amzSettings.ReplacePath(@folder.mafraInOut1[0], @folder.mafraInOut1[1]); amzSettings.ReplacePath(@folder.mafraInOut2[0], @folder.mafraInOut2[1]); /*string folder = LavClass.MAFRA_FOLDER(Server.MapPath("")); * if (folder == "") * folder = Server.MapPath("\\"); * this.settings = new UtilityMaietta.genSettings(folder + "files\\mafra_conf.xml"); * settings.ReplacePath(@"G:\", @"\\10.0.0.80\c$\"); * settings.ReplacePath(@"F:\", @"\\10.0.0.2\c$\"); * amzSettings = new AmzIFace.AmazonSettings(settings.lavAmazonSettingsFile, Year); * amzSettings.ReplacePath(@"G:\", @"\\10.0.0.80\c$\"); * amzSettings.ReplacePath(@"F:\", @"\\10.0.0.2\c$\");*/ aMerchant = new AmzIFace.AmazonMerchant(int.Parse(Request.QueryString["merchantId"].ToString()), amzSettings.Year, amzSettings.marketPlacesFile, amzSettings); Session["settings"] = settings; Session["amzSettings"] = amzSettings; imgTopLogo.ImageUrl = amzSettings.WebLogo; calInvoiceData.SelectedDate = DateTime.Today; calInvoiceData.VisibleDate = DateTime.Today; labDefinitiveData.Text = DateTime.Today.ToShortDateString(); labDescSelected.Text = ""; if (Request.QueryString["amzInv"] != null && int.Parse(Request.QueryString["amzInv"].ToString()) > 0) { txInvoiceNum.Text = Request.QueryString["amzInv"].ToString(); } AmazonOrder.Order o; if (Session[Request.QueryString["amzOrd"].ToString()] != null) { o = (AmazonOrder.Order)Session[Request.QueryString["amzOrd"].ToString()]; calInvoiceData.SelectedDate = calInvoiceData.VisibleDate = o.InvoiceDate; } OleDbConnection cnn = new OleDbConnection(settings.OleDbConnString); cnn.Open(); fillVettori(cnn, amzSettings); fillDropCodes(settings, cnn); cnn.Close(); fillRisposte(amzSettings, aMerchant); dtProds = creaDataTable(); Session["dtProds"] = dtProds; gridProducts.DataSource = dtProds; gridProducts.DataBind(); } else { settings = (UtilityMaietta.genSettings)Session["settings"]; amzSettings = (AmzIFace.AmazonSettings)Session["amzSettings"]; aMerchant = new AmzIFace.AmazonMerchant(int.Parse(Request.QueryString["merchantId"].ToString()), amzSettings.Year, amzSettings.marketPlacesFile, amzSettings); dtProds = (DataTable)Session["dtProds"]; } txNumOrd.Text = Request.QueryString["amzOrd"].ToString(); AmzInvoicePrefix = aMerchant.invoicePrefix(amzSettings); COUNTRY = Year + " - " + aMerchant.nazione + " " + aMerchant.ImageUrlHtml(25, 40, "inherit"); //AmazonOrder.Order o = (AmazonOrder.Order)Session[txNumOrd.Text]; /*if (!Page.IsPostBack && Session[txNumOrd.Text] != null) * { * OleDbConnection wc = new OleDbConnection(settings.lavOleDbConnection); * wc.Open(); * AmazonOrder.Order o = (AmazonOrder.Order)Session[txNumOrd.Text]; * AmazonOrder.Order.lavInfo idlav = (o.canaleOrdine.Index == AmazonOrder.FulfillmentChannel.LOGISTICA_AMAZON)? idlav = AmazonOrder.Order.lavInfo.EmptyLav() : o.GetLavorazione(wc); * * if (idlav.lavID == 0 && o.HasOneLavorazione() && o.canaleOrdine.Index != AmazonOrder.FulfillmentChannel.LOGISTICA_AMAZON) // POSSIBILE APRI LAVORAZIONE * chkOpenLav.Checked = chkOpenLav.Enabled = true; * else * chkOpenLav.Checked = chkOpenLav.Enabled = false; * wc.Close(); * }*/ }
public void RegisterPostbackTrigger(Control fullPostBack) { ScriptManager1.RegisterPostBackControl(fullPostBack); }