protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) { } }
protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) { Response.Redirect("../Default"); } }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == DataControlCommands.CancelCommandName) { Response.Redirect(table.ListActionPath); } }
protected void contactCancel(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { Response.Redirect("index.aspx"); } }
protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) { Response.RedirectPermanent(GetRouteUrl("ShowPost", new { topicId = RouteData.Values["topicId"] }) + "#post_" + RouteData.Values["id"]); } }
protected void frmv_PersonalProfile_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Update")) { EditProfile(); } }
protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) { Response.Redirect("/Riservata/Anagraficas/Anagrafica"); } }
/** * This method is trigggered when we do the following: * we are in default mode, and we press the "edit" button * we select the "new" button * we are in "edit" mode, and we press the "update" button * NOT REALLY NEEDED... * */ protected void EventEditorFormView_ItemCommand(Object sender, FormViewCommandEventArgs e) { /**if (e.CommandName == "Edit") { Response.Write("Editing"); } else if (e.CommandName == "New") { Response.Write("Pressed New"); } else if (e.CommandName == "Update") { Response.Write("Updating"); } else if (e.CommandName == "Delete") { Response.Write("Deleting"); } else if (e.CommandName == "Cancel") { Response.Write("Cancelling"); } else if (e.CommandName == "Insert") { Response.Write("Insert 1"); } **/ }
protected void attractionsForm_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { Response.Redirect("~/WebForms"); } }
protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) { Response.RedirectPermanent(GetRouteUrl("SubForums", new { id = RouteData.Values["forumId"] })); } }
protected void FormViewTipoCampi_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { Response.Redirect(lblPreviousPage.Text); } }
protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) { Response.RedirectPermanent("/User/Articles/Show"); } }
protected void ItemCommand(object sender, FormViewCommandEventArgs e) { if (!e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) return; Response.RedirectPermanent("/Forum" ); }
protected void attractionsForm_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { Response.RedirectToRoute("TouristAttraction"); } }
protected void FormView1_ItemCommand(object sender, System.Web.UI.WebControls.FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { //取消後,切換為瀏覽模式 ChangeViewMode(); } }
protected void CustomerFormView_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { // Dirigera om klienten till lista med kunder. Response.RedirectToRoute("Customers"); } }
/// <internalonly/> /// <devdoc> /// </devdoc> protected override bool OnBubbleEvent(object source, EventArgs e) { if (e is CommandEventArgs) { FormViewCommandEventArgs args = new FormViewCommandEventArgs(source, (CommandEventArgs)e); RaiseBubbleEvent(this, args); return true; } return false; }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "InsertCode") { EntityDataSource1.InsertParameters["codif1"] = new Parameter("codif1", TypeCode.String, ((TextBox)FormView1.FindControl("TextBox1")).Text); EntityDataSource1.InsertParameters["active"] = new Parameter("active", TypeCode.Boolean, "true"); FormView1.InsertItem(false); } }
protected override bool OnBubbleEvent(object source, EventArgs e) { if (e is CommandEventArgs) { FormViewCommandEventArgs args = new FormViewCommandEventArgs(source, (CommandEventArgs)e); base.RaiseBubbleEvent(this, args); return(true); } return(false); }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "SwitchViewByID": GridView1.DataBind(); GridView1.EditIndex = -1; break; } }
protected void fvEditTipoEquipamento_ItemCommand(object sender, FormViewCommandEventArgs e) { if(e.CommandName == "Guardar") { SqlDataSourceTipoEquipamento.UpdateParameters["Id_Usuario"].DefaultValue = WebMatrix.WebData.WebSecurity.CurrentUserId.ToString(); SqlDataSourceTipoEquipamento.UpdateParameters["TipoEquipamento"].DefaultValue = ((TextBox)fvEditTipoEquipamento.FindControl("txtEditTipo")).Text; SqlDataSourceTipoEquipamento.Update(); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModalOk", "$('#myModalOk').modal();", true); gvTipoEquipamento.SelectedIndex = -1; } }
protected void fvClasifDef_ItemCommand(object sender, FormViewCommandEventArgs e) { if(e.CommandName == "Guardar") { SqlDataSourceClasifDef.UpdateParameters["Id_Usuario"].DefaultValue = WebMatrix.WebData.WebSecurity.CurrentUserId.ToString(); SqlDataSourceClasifDef.UpdateParameters["Id_Def"].DefaultValue = ((DropDownList)fvClasifDef.FindControl("ddlDef")).SelectedValue.ToString(); SqlDataSourceClasifDef.UpdateParameters["ClasifDef"].DefaultValue = ((TextBox)fvClasifDef.FindControl("txtClasifDef")).Text; SqlDataSourceClasifDef.Update(); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModalOk", "$('#myModalOk').modal();", true); gvClasifDef.DataBind(); gvClasifDef.SelectedIndex = -1; } }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.Equals("Edit")) FormView1.ChangeMode(FormViewMode.Edit); else if (e.CommandName.Equals("New")) FormView1.ChangeMode(FormViewMode.Insert); else if (e.CommandName.Equals("Cancel")) FormView1.ChangeMode(FormViewMode.ReadOnly); else if (e.CommandName.Equals("Update")) UpdateFormView(); //else if (e.CommandName.Equals("Insert")) // InsertFormView(); }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Cancel": Response.Redirect("Default.aspx"); break; case "Send": FormView1.InsertItem(true); Response.Redirect("Default.aspx"); break; } }
protected void Unnamed_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Save": this.res.Text = ((DropDownList)this.formView.FindControl("ddlJobs")).SelectedValue; break; case "Cancel": this.res.Text = string.Empty; break; default: throw new InvalidOperationException("Invalid command"); } }
protected void FV_FareItem_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "DoInsert": InsertFareItem(); break; case "DoUpdate": UpdateFareItem(Convert.ToInt32(e.CommandArgument)); break; case "DoCancel": this.FV_FareItem.Visible = false; BindItemList(Convert.ToInt32(this.GV_FareList.SelectedValue)); break; } }
protected void FV_Route_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "DoInsert": InsertRoute(); break; case "DoUpdate": UpdateRoute(Convert.ToInt32(e.CommandArgument)); break; case "DoCancel": this.FV_Route.Visible = false; BindList(); break; } }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Cancel": Response.Redirect("Default.aspx"); break; case "Update": if(FormView1.CurrentMode == FormViewMode.Edit) FormView1.UpdateItem(true); else FormView1.InsertItem(true); Response.Redirect("Default.aspx"); break; } }
protected void FV_Port_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "DoInsert": InsertPort(); break; case "DoUpdate": UpdatePort(e.CommandArgument.ToString()); break; case "DoCancel": //this.FV_Port.ChangeMode(FormViewMode.ReadOnly); this.FV_Port.Visible = false; BindList(); break; } }
protected void FV_Vessel_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "DoInsert": InsertVessel(); break; case "DoUpdate": UpdateVessel(Convert.ToInt32(e.CommandArgument)); break; case "DoCancel": //this.FV_Vessel.ChangeMode(FormViewMode.ReadOnly); this.FV_Vessel.Visible = false; BindList(); break; } }
//If one of the buttons is clicked, collects IncomeID and stores in a session protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "New") { object a = e.CommandArgument; Session["InsertedIncomeID"]= a; } else if (e.CommandName == "Delete") { object a = e.CommandArgument; Session["DeletedIncome"] = a; } else if (e.CommandName == "Edit") { object a = e.CommandArgument; Session["EditedIncome"] = a; } }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { string name = ((TextBox) FormView1.FindControl("NameTextBox")).Text; switch (e.CommandName) { case "Cancel": Response.Redirect("Posts.aspx"); break; case "Update": FormView1.UpdateItem(true); LogHelper.Write(string.Format("{0} отредактировал должность '{1}'", User.Identity.Name, name)); Response.Redirect("Posts.aspx"); break; case "Insert": FormView1.InsertItem(true); LogHelper.Write(string.Format("{0} добавил должность '{1}'", User.Identity.Name, name)); Response.Redirect("Posts.aspx"); break; } }
protected virtual new void OnItemCommand(FormViewCommandEventArgs e) { }