protected void CategoryGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
     }
 }
Пример #2
0
 protected void ExamGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         ShowMessageBox("Exam and questions of the exam are successfully deleted");
     }
 }
Пример #3
0
 protected void GridViewClientes_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         lblError.Text      = "Cliente Eliminado";
         lblError.ForeColor = Color.Green;
     }
     else if (e.Exception.InnerException.GetType() == typeof(Controller.InsufficientPrivilegeException))
     {
         lblError.Text      = "No Tiene Los Permisos Suficientes Para Eliminar El Cliente";
         lblError.ForeColor = Color.Red;
         e.ExceptionHandled = true;
     }
     else if (e.Exception.InnerException.GetType() == typeof(Controller.ClienteConExpedientes))
     {
         lblError.Text      = "No Se Puede Eliminar El Cliente Seleccionado Ya Que Posee Expedientes Iniciados";
         lblError.ForeColor = Color.Red;
         e.ExceptionHandled = true;
     }
     else
     {
         lblError.Text      = "Se Ha Producido Un Error Inesperado";
         lblError.ForeColor = Color.Red;
         e.ExceptionHandled = true;
     }
 }
Пример #4
0
 protected void LocationGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         ShowMessageBox("Location successfully deleted");
     }
 }
Пример #5
0
 protected void GV_RouteList_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     this.FV_Route.Visible = false;
     this.lblMessage.Text = "Delete successfully";
     this.lblMessage.ForeColor = Color.Green;
     BindList();
 }
 protected void StationeryGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         ErrorLabel.Text = "The category can't be deleted";
         e.ExceptionHandled = true;
     }
 }
 protected void grdProductPackage_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         ShowError("Há processos de compra que contém produtos com esta embalagem!");
         e.ExceptionHandled = true;
     }
 }
Пример #8
0
 protected void GV_VesselList_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     //this.FV_Vessel.ChangeMode(FormViewMode.ReadOnly);
     this.FV_Vessel.Visible = false;
     this.lblMessage.Text = "Delete successfully";
     this.lblMessage.ForeColor = Color.Green;
     BindList();
 }
Пример #9
0
 protected void GridViewShopItems_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         //OK
     }
     else
     {
         labelManageShopItemsStatus.Text = "Failed to delete row!";
     }
 }
Пример #10
0
 protected void SectionGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         ShowMessageBox("Section deletion is unsuccessful" );
     }
     else //if (e.Exception == null)
     {
         ShowMessageBox("Section successfully deleted");
     }
 }
 protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null && e.Exception.InnerException != null)
     {
         if (e.Exception.InnerException is System.Data.DBConcurrencyException)
         {
             //hata burada yakalanıp handle edilir eğer DBConcurrencyException hatası aldıysak
             //o zaman conflict olmuş demektir. Hata mesajını gösteren label'ın visible'ını açalım.
             DeleteConflictMessage.Visible = true;
             e.ExceptionHandled = true;
         }
     }
 }
 protected void grdProducts_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblServerError.Visible = true;
         lblServerError.Text = "A database error occured. Message: " + e.Exception.Message;
         e.ExceptionHandled = true;
     }
     else if (e.AffectedRows == 0)
     {
         lblServerError.Visible = true;
         lblServerError.Text = "Another user may have updated this entry already";
     }
 }
        protected void NurseGridView_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
        {
            Label1.Visible = true;

            if (e.AffectedRows > 0)
            {
                Label1.Text      = "Nurse With ID =\"" + e.Keys[0] + "is Successfully Deleted";
                Label1.ForeColor = Color.Green;
            }
            else
            {
                Label1.Text      = "Nurse With ID =\"" + e.Keys[0].ToString() + "\"is not Deleted Due To an Error";
                Label1.ForeColor = Color.Red;
            }
        }
 protected void GridView1_RowDeleted(
 object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
     lblError.Text = "A database error has occurred.<br /><br />" +
         e.Exception.Message;
     if (e.Exception.InnerException != null)
         lblError.Text += "<br />Message: "
             + e.Exception.InnerException.Message;
     e.ExceptionHandled = true;
     }
     else if (e.AffectedRows == 0)
     lblError.Text = "Another user may have updated that category. "
         + "<br />Please try again.";
 }
Пример #15
0
    protected void GridViewTipoDocumento_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
    {
        lblError.Visible = true;

        if (e.Exception == null)
        {
            lblError.ForeColor = Color.Green;
            lblError.Text      = "El Tipo de Documento ha sido borrado exitosamente";
        }
        else
        {
            lblError.ForeColor = Color.Red;
            lblError.Text      = "No se pudo borrar el Tipo de Documento";
            e.ExceptionHandled = true;
        }
    }
        protected void DepartmentGridView_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
        {
            successid.Visible = true;

            if (e.AffectedRows > 0)
            {
                successid.Text = "Department With ID = \""
                                 + e.Keys[0] + "\" is successfully deleted";
                successid.ForeColor = System.Drawing.Color.Green;
            }
            else
            {
                successid.Text = "Department With ID = \""
                                 + e.Keys[0].ToString() + "\" is not Updated Due To an Error";
                successid.ForeColor = System.Drawing.Color.Red;
            }
        }
Пример #17
0
        protected void grdProdutos_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
        {
            var grdProdutos = grdProdutosComposicao.Parent;

            while (grdProdutos.ID != "grdProdutos")
            {
                grdProdutos = grdProdutos.Parent;
            }


            var dtvPedido = grdProdutosComposicao.Parent;

            while (dtvPedido.ID != "mainTable")
            {
                dtvPedido = dtvPedido.Parent;
            }
            dtvPedido = dtvPedido.FindControl("dtvPedido");

            ((DetailsView)dtvPedido).DataBind();
            ((GridView)grdProdutos).DataBind();
        }
Пример #18
0
		bool DeleteCallback (int recordsAffected, Exception exception)
		{
			GridViewDeletedEventArgs dargs = new GridViewDeletedEventArgs (recordsAffected, exception, currentEditRowKeys, currentEditNewValues);
			OnRowDeleted (dargs);
			return dargs.ExceptionHandled;
		}
Пример #19
0
		public virtual void DeleteRow (int rowIndex)
		{
			GridViewRow row = Rows [rowIndex];
			currentEditRowKeys = CopyOrderedDictionary (DataKeys [rowIndex].Values);
			currentEditNewValues = GetRowValues (row, true, true);
			
			GridViewDeleteEventArgs args = new GridViewDeleteEventArgs (rowIndex, currentEditRowKeys, currentEditNewValues);
			OnRowDeleting (args);

			if (args.Cancel || !IsBoundUsingDataSourceID)
				return;
			
			RequireBinding ();
			DataSourceView view = GetData ();
			if (view != null)
				view.Delete (currentEditRowKeys, currentEditNewValues, new DataSourceViewOperationCallback (DeleteCallback));
			else {
				GridViewDeletedEventArgs dargs = new GridViewDeletedEventArgs (0, null, currentEditRowKeys, currentEditNewValues);
				OnRowDeleted (dargs);
			}
		}
Пример #20
0
 protected void gvAllComments_RowDeleted1(object sender, GridViewDeletedEventArgs e)
 {
     gvAllComments.SelectedIndex = -1;
     gvAllComments.DataBind();
     dvCurrComment.ChangeMode(DetailsViewMode.ReadOnly);
 }
        protected void gvNotFound_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {
            if (!UrlTrackerRepository.HasNotFoundEntries())
            {
                lbUrlTrackerView_Click(this, EventArgs.Empty);
                mvSwitchButtons.Visible = false;
            }

            gvUrlTracker.DataBind();
            if (gvUrlTracker.Rows.Count == 0)
            {
                lbDeleteSelected.Visible = false;
            }
        }
Пример #22
0
 protected void OnGridViewRowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     DetailsView1.DataBind();
 }
 protected void gvwOrderStatuses_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     gvwOrderStatuses.SelectedIndex = -1;
      gvwOrderStatuses.DataBind();
      dvwOrderStatus.ChangeMode(DetailsViewMode.Insert);
 }
Пример #24
0
 protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     Response.Redirect("cCart.aspx");
 }
Пример #25
0
 protected void grdProdutos_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
 {
     BindControls();
 }
Пример #26
0
		public void DoOnRowDeleted (GridViewDeletedEventArgs e)
		{
			base.OnRowDeleted (e);
		}
 protected void grwHanhTrinh_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
 }
Пример #28
0
 protected void grdMedia_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
 }
Пример #29
0

        
Пример #30
0
 protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     FormView1.DataBind();
 }
Пример #31
0
		protected virtual void OnRowDeleted (GridViewDeletedEventArgs e)
		{
			if (Events != null) {
				GridViewDeletedEventHandler eh = (GridViewDeletedEventHandler) Events [RowDeletedEvent];
				if (eh != null) eh (this, e);
			}
		}
Пример #32
0
		protected void permisosGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
		{
			if (e.Exception != null)
			{
				ScriptManager.RegisterStartupScript(this.Parent.Page, GetType(), "Message", Funciones.TextoScript(e.Exception.Message), false);
				e.ExceptionHandled = true;
			}
		}
Пример #33
0
		protected void impuestosGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
		{
			if (e.Exception != null)
			{
				ScriptManager.RegisterStartupScript(this.Parent.Page, GetType(), "Message", "<SCRIPT LANGUAGE='javascript'>alert('" + e.Exception.Message.ToString().Replace("'", "") + "');</SCRIPT>", false);
				e.ExceptionHandled = true;
			}
		}
 protected virtual new void OnRowDeleted(GridViewDeletedEventArgs e)
 {
 }
Пример #35
0
        protected void GridViewItemsList_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {
            if (e.Exception == null)
            {
                GroupID = 0;
                RepeaterLang.DataBind();

            }else
            {

            }
        }
 protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     // If we just deleted the last row in the GridView, decrement the PageIndex
     if (GridView1.Rows.Count == 1)
         // we just deleted the last row
         GridView1.PageIndex = Math.Max(0, GridView1.PageIndex - 1);
 }
 protected void grdClientes_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
 }
Пример #38
0
 protected void GridViewProduct_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     AspNetPager1.RecordCount = ProductManage.GetList(Convert.ToInt32(this.DropDownListTree.SelectedValue)).Count;
 }