public virtual IEnumerable <string> GetOperator(OperateRightEventArgs e) { DataRow row = e.Row; if (row == null) { return(EmptyRowRights); } try { object value = row[FieldName]; if (value == DBNull.Value) { if (fNullItem != null) { return(fNullItem.Rights); } } else { FieldOperateRightItem item = fList[value.ToString()]; if (item != null) { return(item.Rights); } } } catch { } return(null); }
public void AddItem(FieldOperateRightItem item) { TkDebug.AssertArgumentNull(item, "item", this); fList.Add(item); if (fNullItem == null && item.ContainsNull) { fNullItem = item; } }