private void dg_delete(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { int ItemID = int.Parse(e.Item.Cells[0].Text); DictionaryTypes dic = (DictionaryTypes)Enum.Parse(typeof(DictionaryTypes), iDictionaryType.ToString()); Dictionaries.DeleteItem(ItemID, dic); dgDic.EditItemIndex = -1; BindDG(); }
private void dg_delete(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { string dictionaryName = ddDictionaries.SelectedItem.Value; if (dictionaryName == ListManager.ListTypeEnumName) { MetaFieldType mft = Mediachase.Ibn.Core.MetaDataWrapper.GetEnumByName(dictionaryName); if (mft != null) { MetaEnum.RemoveItem(mft, int.Parse(e.CommandArgument.ToString())); } dgEnum.EditItemIndex = -1; } else { int ItemID = int.Parse(e.Item.Cells[0].Text); DictionaryTypes dic = (DictionaryTypes)Enum.Parse(typeof(DictionaryTypes), dictionaryName); Dictionaries.DeleteItem(ItemID, dic); dgDic.EditItemIndex = -1; } BindDG(); }