protected void grid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ntf.Show("Cannot delete! check the data again"); } }
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; Master.ShowWarn(" cannot be deleted (check for MR Items In MTN) : " + e.Exception.Message); } }
protected void projectsGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('Project Name has been used for payments...Cannot Delete', 'Error');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Deleted Successfully', 'Success');", true); } }
protected void deptsGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('Department has existing members...Cannot Delete', 'Error');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Deleted Successfully', 'Success');", true); } }
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; DisplayMessage(true, "Customer " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["SubjectName"] + " cannot be deleted."); } else { DisplayMessage(false, "Customer " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["SubjectName"] + " deleted"); } }
protected void programmeGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('" + e.Exception.Message.Replace("'", "").Replace("\r\n", "") + "', 'Error');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Deleted Successfully', 'Success');", true); } }
protected void attendanceGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('Error occured during delete. Try again', 'Error');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Deleted Successfully', 'Success');", true); } }
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; SetMessage("Delete failed! Reason: " + e.Exception.Message); } else { SetMessage("Item deleted!"); } }
protected void currencyGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('Currency has related records...Cannot Delete', 'Error');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Deleted Successfully', 'Success');", true); } }
protected void GridDemoRadGrid_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; DisplayMessage(true, "Employee " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"] + " cannot be deleted. Reason: " + e.Exception.Message); } else { DisplayMessage(false, "Employee " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"] + " deleted"); } }
protected void serviceGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('Attendance have been registered on this service...Cannot Delete', 'Error');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Deleted Successfully', 'Success');", true); } }
protected void RadGrid1_ItemDeleted(object sender, GridDeletedEventArgs e) { var dataItem = (GridDataItem)e.Item; var id = dataItem.GetDataKeyValue("UserId").ToString(); if (e.Exception != null) { e.ExceptionHandled = true; SetMessage("El registro con ID: # <strong>" + id + "</strong> no pudo ser eliminado. Error: " + e.Exception.Message + " TRACE: " + e.Exception.StackTrace); } else { SetMessage("Registro eliminado!"); } }
protected void rg_ItemDeleted(object source, GridDeletedEventArgs e) { GridDataItem dataItem = (GridDataItem)e.Item; String id = dataItem.GetDataKeyValue("UserId").ToString(); if (e.Exception != null) { e.ExceptionHandled = true; SetMessage("UserId with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message); } else { SetMessage("User with ID " + id + " is deleted!"); } }
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e) { GridDataItem dataItem = (GridDataItem)e.Item; String id = dataItem.GetDataKeyValue("StakeholderTypeID").ToString(); if (e.Exception != null) { e.ExceptionHandled = true; SetMessage("Supplier with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message); } else { SetMessage("Supplier with ID " + id + " is deleted!"); } }
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e) { GridDataItem dataItem = (GridDataItem)e.Item; String id = dataItem.GetDataKeyValue("ProductID").ToString(); if (e.Exception != null) { e.ExceptionHandled = true; NotifyUser("Product with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message); } else { NotifyUser("Product with ID " + id + " is deleted!"); } }
protected void RadGridEditor_ItemDeleted(object source, GridDeletedEventArgs e) { LblState.Text = string.Empty; if (e.Exception != null) { e.ExceptionHandled = true; SqlException ex = e.Exception as SqlException; if (ex == null) DisplayMessage("لم نتمكن من حذف الصف وذلك بسبب: " + Environment.NewLine + e.Exception.Message); else DisplayMessage("لم نتمكن من حذف الصف وذلك بسبب: " + Environment.NewLine + MC.CheckExp(ex)); } else { SqlConnection con = MC.EStoreConnection; SqlCommand cmd = new SqlCommand("", con); try { string sheek_no = e.Item.KeyValues.Substring(e.Item.KeyValues.LastIndexOf(":") + 2); sheek_no = sheek_no.Substring(0, sheek_no.Length - 2); con.Open(); cmd.CommandText = "Update TBLsheekno Set used = 'False' Where sheek_no = " + sheek_no; cmd.ExecuteNonQuery(); LoadSheek(DDLbankacountcode.SelectedValue); } catch (SqlException ex) { DisplayMessage(MC.CheckExp(ex)); } con.Close(); DisplayMessage("تم الحذف"); } }
protected void RadGrid1_ItemDeleted(object sender, GridDeletedEventArgs e) { }
protected void RadGridEditor_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; SqlException ex = e.Exception as SqlException; if (ex == null) DisplayMessage("لم نتمكن من حذف الصف وذلك بسبب: " + Environment.NewLine + e.Exception.Message); else DisplayMessage("لم نتمكن من حذف الصف وذلك بسبب: " + Environment.NewLine + MC.CheckExp(ex)); } else DisplayMessage("تم الحذف"); }
protected void dleGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { }
protected void RadGrid1_ItemDeleted(object sender, GridDeletedEventArgs e) { Bas_Utility.Misc.Alert(Page, e.Item.ItemIndex.ToString()); }
protected void RadGrid2_ItemDeleted(object source, GridDeletedEventArgs e) { RadGrid2.DataBind(); hlActivityChangeRequest.Visible = true; }
protected void gridValidity_ItemDeleted(object sender, GridDeletedEventArgs e) { }
protected void RGTestName_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; //e.KeepInInsertMode = true; ShowErrorMessage(); } }
protected void RadGridEditor_ItemDeleted(object source, GridDeletedEventArgs e) { if (e.Exception != null) { e.ExceptionHandled = true; SqlException ex = e.Exception as SqlException; if (ex == null) DisplayMessage("لم نتمكن من حذف الصف وذلك بسبب: " + Environment.NewLine + e.Exception.Message); else DisplayMessage("لم نتمكن من حذف الصف وذلك بسبب: " + Environment.NewLine + MC.CheckExp(ex)); } else { SqlConnection con = MC.EStoreConnection; SqlTransaction tr = null; SqlCommand cmd = new SqlCommand("", con); try { string MaterialId = e.Item.KeyValues.Substring(e.Item.KeyValues.LastIndexOf(":") + 2); MaterialId = MaterialId.Substring(0, MaterialId.Length - 2); con.Open(); tr = con.BeginTransaction(); cmd.Transaction = tr; cmd.CommandText = string.Format(@"UPDATE TblWaredSerial SET OUT = 0 FROM TblWaredSerial INNER JOIN tblOutDetails ON TblWaredSerial.MaterialId = tblOutDetails.MaterialId INNER JOIN TblSerOut ON TblWaredSerial.InnerSerial = TblSerOut.InnerSerial AND tblOutDetails.InvIDOut = TblSerOut.InvIDOut WHERE (tblOutDetails.InvIDOut = {0}) AND (tblOutDetails.MaterialId = {1})", RadComboBoxBillz.SelectedValue, MaterialId); cmd.ExecuteNonQuery(); cmd.CommandText = string.Format(@"DELETE FROM TblSerOut FROM TblSerOut INNER JOIN tblOutDetails ON TblSerOut.InvIDOut = tblOutDetails.InvIDOut INNER JOIN TblWaredSerial ON TblSerOut.InnerSerial = TblWaredSerial.InnerSerial AND tblOutDetails.MaterialId = TblWaredSerial.MaterialId WHERE (tblOutDetails.InvIDOut = {0}) AND (tblOutDetails.MaterialId = {1})", RadComboBoxBillz.SelectedValue, MaterialId); cmd.ExecuteNonQuery(); tr.Commit(); LblState.Text = "تم الحذف"; LblState.ForeColor = Color.Green; LblState.Visible = true; } catch (SqlException ex) { LblState.Text = MC.CheckExp(ex); LblState.ForeColor = Color.Red; LblState.Visible = true; tr.Rollback(); } con.Close(); DisplayMessage("تم الحذف"); } }
protected void radgridTransactions_ItemDeleted(object source, GridDeletedEventArgs e) { }
protected void RadGrid2_ItemDeleted(object source, GridDeletedEventArgs e) { RadGrid1.DataBind(); }
protected void OverviewActivities_ItemDeleted(object sender, GridDeletedEventArgs e) { var s = sender as RadGrid; if (s.Items.Count - 1 == 0) { if (OpNevenActiviteit.Visible) { OpNevenActiviteit.Items[0].Enabled = true; } else { AtpNevenActiviteiten.Items[0].Enabled = true; } } }
protected void MySolutions_ItemDeleted(object source, GridDeletedEventArgs e) { Util util = new Util(); Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID]; if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return; int row = e.Item.ItemIndex; // RadGrid MySolutions = (RadGrid) State["MySolutions"]; string app = MySolutions.Items[row].Cells[2].Text; //delete app State["SelectedApp"] = app; util.DeleteApplication(State); util.ResetAppStateVariables(State); LoadData(); }
protected void LanesRadGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { }
protected void StoreDelivGroupsRadGrid_ItemDeleted(object sender, GridDeletedEventArgs e) { }
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e) { string item = getItemName(e.Item.OwnerTableView.Name); string field = getFieldName(e.Item.OwnerTableView.Name); if (e.Exception != null) { e.ExceptionHandled = true; DisplayMessage(item + " " + e.Item[field].Text + " cannot be deleted. Reason: " + e.Exception.Message); } else { DisplayMessage(item + " " + e.Item[field].Text + " deleted"); } }