Exemplo n.º 1
0
        protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
        {
            GridView1.DataBind();

            btneditar.Visible = false;
            btneliminar.Visible = false;
        }
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     if (e.Exception == null || e.ExceptionHandled)
     {
         this.Response.Redirect(this.Table.ListActionPath);
     }
 }
Exemplo n.º 3
0
 //-------------------------------------------------------------------------------------------
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     //if (e.Exception == null || e.ExceptionHandled)
        //{
        //     Response.Redirect(table.ListActionPath);
        //}
 }
Exemplo n.º 4
0
 protected void fvSelectedStaff_ItemDeleted(object sender, System.Web.UI.WebControls.FormViewDeletedEventArgs e)
 {
     this.lblError.Text = "";
     if (e.Exception != null)
     {
         this.lblError.Text = "A database error has occurred.<br /<br />" + e.Exception.Message;
         e.ExceptionHandled = true;
     }
     else
     {
         ddlSupport.DataBind();
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// 删除成功后 , 重新绑定数据.
        /// </summary>
        protected void fvPersonDetails_ItemDeleted(object sender, FormViewDeletedEventArgs e)
        {
            gvPersonOverView.DataBind();

            // 如果还有记录
            if (gvPersonOverView.Rows.Count > 0)
            {
                // 取出被删除记录的行索引
                int delindex = (int)ViewState["delindex"];

                // 如果第一条记录被删除,移动到下一条记录.
                if (delindex == 0)
                {
                    gvPersonOverView.SelectedIndex = 0;
                }

                // 如果是最后一条记录被删除, 移动到前一条记录.
                else if (delindex == gvPersonOverView.Rows.Count)
                {
                    gvPersonOverView.SelectedIndex = gvPersonOverView.Rows.Count - 1;
                }

                // 否则, 删除后移动到下一条记录.
                else
                {
                    gvPersonOverView.SelectedIndex = delindex;
                }

            }

            // 如果没有记录, 变更为插入模式以插入数据.
            else
            {
                fvPersonDetails.ChangeMode(FormViewMode.Insert);
                fvPersonDetails.DefaultMode = FormViewMode.Insert;
            }
        }
Exemplo n.º 6
0
        private bool HandleDeleteCallback(int affectedRows, Exception ex) {
            int pageIndex = PageIndex;
            FormViewDeletedEventArgs fea = new FormViewDeletedEventArgs(affectedRows, ex);
            fea.SetKeys(_deleteKeys);
            fea.SetValues(_deleteValues);

            OnItemDeleted(fea);

            _deleteKeys = null;
            _deleteValues = null;

            if (ex != null && !fea.ExceptionHandled) {
                // If there is no validator in the validation group that could make sense
                // of the error, return false to proceed with standard exception handling.
                // But if there is one, we want to let it display its error instead of throwing.
                if (PageIsValidAfterModelException()) {
                    return false;
                }
            }

            if (pageIndex == _pageCount - 1) {
                HandlePage(pageIndex - 1);
            }

            RequiresDataBinding = true;
            return true;
        }
		static void d_ItemDeleted (object sender, FormViewDeletedEventArgs e)
		{
			if (WebTest.CurrentTest.UserData == null) {
				ArrayList list = new ArrayList ();
				list.Add ("ItemDeleted");
				WebTest.CurrentTest.UserData = list;
			}
			else {
				ArrayList list = WebTest.CurrentTest.UserData as ArrayList;
				if (list == null)
					throw new NullReferenceException ();
				list.Add ("ItemDeleted");
				WebTest.CurrentTest.UserData = list;
			}
		}
 protected void attractionsForm_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
       Response.RedirectToRoute("TouristAttraction");
     
 }
 protected void FormViewArticolo_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     Response.Redirect(ViewState["PreviousPage"].ToString());//Redirect to 
 }
Exemplo n.º 10
0
		public virtual void DeleteItem ()
		{
			currentEditRowKeys = DataKey.Values;
			currentEditNewValues = GetRowValues (true);
			
			FormViewDeleteEventArgs args = new FormViewDeleteEventArgs (PageIndex, currentEditRowKeys, currentEditNewValues);
			OnItemDeleting (args);

			if (args.Cancel || !IsBoundUsingDataSourceID)
				return;

			if (PageIndex > 0 && PageIndex == PageCount - 1)
				PageIndex--;
				
			RequireBinding ();
				
			DataSourceView view = GetData ();
			if (view != null)
				view.Delete (currentEditRowKeys, currentEditNewValues, new DataSourceViewOperationCallback (DeleteCallback));
			else {
				FormViewDeletedEventArgs dargs = new FormViewDeletedEventArgs (0, null, currentEditRowKeys, currentEditNewValues);
				OnItemDeleted (dargs);
			}
		}	
Exemplo n.º 11
0
 //-------------------------------------------------------------------------------------------
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     if (Page.MasterPageFile.Contains("Blank.master"))
        {
             ScriptManager.RegisterStartupScript(Page, this.GetType(), "closeIFrame", "<script type='text/javascript'>parent.closeIFrame('" + Request["WindowId"] + "', '" + Request["ParentId"] + "');</script>", false);
        }
        else
        {
             if (e.Exception == null || e.ExceptionHandled)
             {
                  Response.Redirect(RedirectURL);
             }
        }
 }
Exemplo n.º 12
0
 protected void fvProcMaterialBalanceAdd_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     //当前删除的id号
     var id = Int64.Parse(e.Keys[0].ToString());
     //执行跳转
     JumpToUrlById(id);
 }
Exemplo n.º 13
0
 protected override void OnItemDeleted(FormViewDeletedEventArgs e)
 {
     base.OnItemDeleted(e);
     WebNavigator nav = this.GetBindingNavigator();
     if (nav != null)
     {
         WebDataSource ds = (WebDataSource)this.GetObjByID(this.DataSourceID);
         if (ds.AutoApply)
         {
             nav.SetState(WebNavigator.NavigatorState.ApplySucess);
             nav.SetNavState("Browsed");
         }
         else
         {
             nav.SetState(WebNavigator.NavigatorState.Changed);
             nav.SetNavState("Changing");
         }
     }
 }
 protected virtual new void OnItemDeleted(FormViewDeletedEventArgs e)
 {
 }
Exemplo n.º 15
0
 /// <devdoc>
 /// <para>Raises the <see langword='ItemDeleted '/>event.</para>
 /// </devdoc>
 protected virtual void OnItemDeleted(FormViewDeletedEventArgs e) {
     FormViewDeletedEventHandler handler = (FormViewDeletedEventHandler)Events[EventItemDeleted];
     if (handler != null) handler(this, e);
 }
Exemplo n.º 16
0
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     Response.Redirect("~/Qualita/NonConformitaList.aspx");
 }
        protected void FormViewStrumento_ItemDeleted(object sender, FormViewDeletedEventArgs e)
        {

        }
Exemplo n.º 18
0
		bool DeleteCallback (int recordsAffected, Exception exception)
		{
			FormViewDeletedEventArgs dargs = new FormViewDeletedEventArgs (recordsAffected, exception, currentEditRowKeys, currentEditNewValues);
			OnItemDeleted (dargs);
			return dargs.ExceptionHandled;
		}
Exemplo n.º 19
0
 protected void fvEngLotCardAdd_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     //当前id号
     Int64 id = Convert.ToInt64(e.Keys[0]);
     //调用过程执行跳转
     JumpToUrlById(id);
 }
Exemplo n.º 20
0
		protected virtual void OnItemDeleted (FormViewDeletedEventArgs e)
		{
			if (Events != null) {
				FormViewDeletedEventHandler eh = (FormViewDeletedEventHandler) Events [ItemDeletedEvent];
				if (eh != null) eh (this, e);
			}
		}
 //ItemDeleted Event Control
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     Response.Redirect("~/doctor.aspx");
 }
Exemplo n.º 22
0
 protected void FormViewRapportino_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     this.Response.Redirect("~/Rapporti/RapportiLista.aspx");
 }
Exemplo n.º 23
0
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     GridView1.DataBind();
 }
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     Response.Redirect("~/medicalServiceGroup.aspx");
 }
		private void fv_ItemDeleted (object sender, FormViewDeletedEventArgs e)
		{
			itemDeleted = true;
		}
 protected void attractionsForm_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
       Response.Redirect("~/WebForms");
 }
			public void DoOnItemDeleted (FormViewDeletedEventArgs e)
			{
				OnItemDeleted (e); 
			}
 //ItemDeleted Event Control
 protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     Response.Redirect("~/prescription.aspx");
 }