コード例 #1
0
        protected void ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase))
            {

            }
        }
コード例 #2
0
ファイル: Delete.aspx.cs プロジェクト: damgel/RHApp
 protected void ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase))
     {
         Response.Redirect("../Default");
     }
 }
コード例 #3
0
ファイル: Insert.aspx.cs プロジェクト: anurse/ReviewR
 protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == DataControlCommands.CancelCommandName)
     {
         Response.Redirect(table.ListActionPath);
     }
 }
コード例 #4
0
 protected void contactCancel(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         Response.Redirect("index.aspx");
     }
 }
コード例 #5
0
 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"]);
     }
 }
コード例 #6
0
 protected void frmv_PersonalProfile_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("Update"))
     {
         EditProfile();
     }
 }
コード例 #7
0
ファイル: Edit.aspx.cs プロジェクト: alceweb/PuntoFitness2
 protected void ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase))
     {
         Response.Redirect("/Riservata/Anagraficas/Anagrafica");
     }
 }
コード例 #8
0
 /**
  * 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");
     }      **/
 }
コード例 #9
0
 protected void attractionsForm_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         Response.Redirect("~/WebForms");
     }
 }
コード例 #10
0
 protected void ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase))
     {
         Response.RedirectPermanent(GetRouteUrl("SubForums", new { id = RouteData.Values["forumId"] }));
     }
 }
コード例 #11
0
 protected void FormViewTipoCampi_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         Response.Redirect(lblPreviousPage.Text);
     }
 }
コード例 #12
0
 protected void ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase))
     {
         Response.RedirectPermanent("/User/Articles/Show");
     }
 }
コード例 #13
0
        protected void ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            if (!e.CommandName.Equals("Cancel", StringComparison.OrdinalIgnoreCase)) return;

            Response.RedirectPermanent("/Forum"
                );
        }
コード例 #14
0
 protected void attractionsForm_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         Response.RedirectToRoute("TouristAttraction");
     }
 }
コード例 #15
0
 protected void FormView1_ItemCommand(object sender, System.Web.UI.WebControls.FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         //取消後,切換為瀏覽模式
         ChangeViewMode();
     }
 }
コード例 #16
0
 protected void CustomerFormView_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         // Dirigera om klienten till lista med kunder.
         Response.RedirectToRoute("Customers");
     }
 }
コード例 #17
0
        /// <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;
        }
コード例 #18
0
ファイル: CodifMgt.aspx.cs プロジェクト: gnomix/T.A.L.K.
 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);
     }
 }
コード例 #19
0
 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);
 }
コード例 #20
0
ファイル: Default.aspx.cs プロジェクト: supratimsengupta/ASTM
 protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "SwitchViewByID":
             GridView1.DataBind();
             GridView1.EditIndex = -1;
             break;
     }
 }
コード例 #21
0
 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;
     }
 }
コード例 #22
0
 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;
     }
 }
コード例 #23
0
ファイル: ClientSearch.aspx.cs プロジェクト: phwuxj99/iserp
 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();
 }
コード例 #24
0
 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;
     }
 }
コード例 #25
0
 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");
     }
 }
コード例 #26
0
 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;
     }
 }
コード例 #27
0
 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;
     }
 }
コード例 #28
0
 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;
     }
 }
コード例 #29
0
 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;
     }
 }
コード例 #30
0
 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;
     }
 }
コード例 #31
0
ファイル: WebForm1.aspx.cs プロジェクト: hebert-nr/KingsCourt
        //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;
            }
        }
コード例 #32
0
 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;
     }
 }
コード例 #33
0
 protected virtual new void OnItemCommand(FormViewCommandEventArgs e)
 {
 }