Пример #1
0
        public int CompareTo(object obj)
        {
            DocumentsDisplayColumnInfo objYItem = null;

            objYItem = (DocumentsDisplayColumnInfo)obj;
            return(DisplayOrder.CompareTo(objYItem.DisplayOrder));
        }
Пример #2
0
        public List <DocumentsDisplayColumnInfo> GetDisplayColumnList(string localResourceFile)
        {
            var objColumnSettings = new List <DocumentsDisplayColumnInfo> ();

            if (!string.IsNullOrWhiteSpace(DisplayColumns))
            {
                // read "saved" column sort orders in first
                foreach (var strColumn in DisplayColumns.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    var strColumnData = strColumn.Split(new [] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                    var strColumnName = strColumnData [0];

                    if (DocumentsDisplayColumnInfo.AvailableDisplayColumns.Contains(strColumnName))
                    {
                        var objColumnInfo = new DocumentsDisplayColumnInfo {
                            ColumnName          = strColumnName,
                            DisplayOrder        = objColumnSettings.Count + 1,
                            Visible             = bool.Parse(strColumnData [1]),
                            LocalizedColumnName = Localization.GetString(strColumnName + ".Header", localResourceFile)
                        };

                        objColumnSettings.Add(objColumnInfo);
                    }
                }
            }

            return(objColumnSettings);
        }