internal View(Domino.NotesView view, IDatabase parentDb) { this._parentDb = parentDb; this._view = view; if (this._view.IsCalendar) { this._sourceType = NotesViewType.Calendar; } else { this._sourceType = NotesViewType.Standard; } this._targetType = Enums.MappingInfo.GetTargetViewType(this.SourceType); this._name = this._view.Name; this.DisplayName = this._view.Name; this._isDefualt = view.IsDefaultView; this.IsDefaultView = view.IsDefaultView; this._selectionFormula = view.SelectionFormula; this._notesUrl = view.NotesURL; this._viewCondition = new LogicItem(LogicType.And); this._taskId = string.Empty; this.IsTarget = false; this.RowLimit = 30; this.ShowChecked = false; this.IsPaged = false; }
public static SPViewType GetTargetViewType(NotesViewType viewType) { string typeName = viewType.ToString(); var result = ViewTypeMap.Where(row => row.NotesViewType == typeName); SPViewType type = SPViewType.None; if (result.Count() > 0 && result.First().CanConvert) { if (Enum.TryParse(result.First().SPViewType, out type)) { return(type); } } return(SPViewType.None); }