本文整理汇总了C#中System.Web.UI.WebControls.FormViewDeletedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# FormViewDeletedEventArgs类的具体用法?C# FormViewDeletedEventArgs怎么用?C# FormViewDeletedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormViewDeletedEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了FormViewDeletedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FormView1_ItemDeleted
protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
if (e.Exception == null || e.ExceptionHandled)
{
this.Response.Redirect(this.Table.ListActionPath);
}
}
示例2: FormView1_ItemDeleted
//-------------------------------------------------------------------------------------------
protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
//if (e.Exception == null || e.ExceptionHandled)
//{
// Response.Redirect(table.ListActionPath);
//}
}
示例3: FormView1_ItemDeleted
protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
GridView1.DataBind();
btneditar.Visible = false;
btneliminar.Visible = false;
}
示例4: fvPersonDetails_ItemDeleted
/// <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;
}
}
示例5: HandleDeleteCallback
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;
}
示例6: d_ItemDeleted
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;
}
}
示例7: attractionsForm_ItemDeleted
protected void attractionsForm_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
Response.RedirectToRoute("TouristAttraction");
}
示例8: FormViewArticolo_ItemDeleted
protected void FormViewArticolo_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
Response.Redirect(ViewState["PreviousPage"].ToString());//Redirect to
}
示例9: FormView1_ItemDeleted
//-------------------------------------------------------------------------------------------
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);
}
}
}
示例10: fvProcMaterialBalanceAdd_ItemDeleted
protected void fvProcMaterialBalanceAdd_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
//当前删除的id号
var id = Int64.Parse(e.Keys[0].ToString());
//执行跳转
JumpToUrlById(id);
}
示例11: OnItemDeleted
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");
}
}
}
示例12: OnItemDeleted
protected virtual new void OnItemDeleted(FormViewDeletedEventArgs e)
{
}
示例13: OnItemDeleted
/// <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);
}
示例14: FormView1_ItemDeleted
protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
Response.Redirect("~/Qualita/NonConformitaList.aspx");
}
示例15: DeleteItem
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);
}
}