//字典类别删除 protected void btnDel_Click(object sender, EventArgs e) { MyTable mtTable = new MyTable(strTable, "CODE"); mtTable.ColRow["CODE"] = PubFunc.FormDataGet(FormMx, "CODE"); if (PubFunc.StrIsEmpty(mtTable.ColRow["CODE"].ToString())) { Alert.Show("请选择要删除的数据!"); return; } else if (DbHelperOra.Exists("select 1 from " + strTable + " where SJCODE='" + mtTable.ColRow["CODE"].ToString() + "'")) { Alert.Show("数据【" + mtTable.ColRow["CODE"].ToString() + "】有下级,不能删除!"); return; } mtTable.DeleteExec(""); InitDdl(); InitTree(); InitFrom(""); tbxCode.Enabled = true; Alert.Show("数据【" + mtTable.ColRow["CODE"] + "】删除成功!"); }