/// <summary> /// Sets the header. /// </summary> /// <param name="header">Header of the list.</param> public void SetHeader(VisualElement header) { if (header == null) { if (HasHeader()) { RemoveHeader(); } return; } GenItemClass headerTemplate = GetHeaderFooterItemClass(); _headerElement = header; if (HasHeader()) { FirstItem.UpdateItemClass(headerTemplate, header); } else { _headerContext = new ItemContext(); _headerContext.Item = _itemContextList.Count > 0 ? InsertBefore(headerTemplate, header, FirstItem) : Append(headerTemplate, header); _headerContext.Item.SelectionMode = GenItemSelectionMode.None; _headerContext.Item.Deleted += HeaderDeletedHandler; _itemContextList.Insert(0, _headerContext); } }
public override void SetHeader(VisualElement header) { base.SetHeader(header); if (HasHeader() && CircleListView.GetCancelEffect(header)) { FirstItem.UpdateItemClass(GetCancelEffectTemplete(), header); } }
/// <summary> /// Get list of statuses for Manager. /// </summary> public static IEnumerable <SelectListItem> GetStatusList() { var statuses = (from s in OimsDataContext.Requeststatus where s.ForRole.Equals(1) || s.ForRole.Equals(0) select new SelectListItem { Text = s.S_Name, Value = Convert.ToString(s.S_Id) }).ToList(); return(FirstItem.Concat(statuses)); }
public void CopyProperties(QuickNSmart.Contracts.Business.Account.IIdentityUser other) { if (other == null) { throw new System.ArgumentNullException(nameof(other)); } bool handled = false; BeforeCopyProperties(other, ref handled); if (handled == false) { Id = other.Id; RowVersion = other.RowVersion; FirstItem.CopyProperties(other.FirstItem); SecondItem.CopyProperties(other.SecondItem); } AfterCopyProperties(other); }
public void CopyProperties(QuickNSmart.Contracts.Business.Account.IAppAccess other) { if (other == null) { throw new System.ArgumentNullException(nameof(other)); } bool handled = false; BeforeCopyProperties(other, ref handled); if (handled == false) { Id = other.Id; RowVersion = other.RowVersion; FirstItem.CopyProperties(other.FirstItem); ClearSecondItems(); foreach (var item in other.SecondItems) { AddSecondItem(item); } } AfterCopyProperties(other); }
private void UpdateItemFromItems() { if (BlockUpdates || IsFixed) { return; } if (item == null && items.Count > 0) { if (IsClassIdUnique) { Item = (TagModelItem)Activator.CreateInstance(FirstItem.GetType(), new Object[] { }); } else { Item = new TagModelItem(); } } else if (item != null && items.Count == 0) { Item = null; } }
//Select first item in the results list public void SelectResult() { FirstItem.Click(); }
/// <summary> /// /// </summary> /// <param name="listControl"></param> /// <param name="dataSource"></param> /// <param name="dataTextField"></param> /// <param name="dataValueField"></param> /// <param name="type"></param> /// <param name="firstItemText"></param> /// <param name="firstItemValue"></param> public static void BindList(ListControl listControl, DataTable dataSource, string dataTextField, string dataValueField, FirstItem type, string firstItemText, string firstItemValue) { listControl.DataSource = dataSource; listControl.DataTextField = dataTextField; listControl.DataValueField = dataValueField; listControl.DataBind(); if (type == FirstItem.Custom) { ListItem item = new ListItem(); item.Text = firstItemText; item.Value = firstItemValue; listControl.Items.Insert(0, item); } }
/// <summary> /// /// </summary> /// <param name="listControl"></param> /// <param name="dataSource"></param> /// <param name="dataTextField"></param> /// <param name="dataValueField"></param> /// <param name="type"></param> /// <param name="firstItemText"></param> public static void BindList(ListControl listControl, DataTable dataSource, string dataTextField, string dataValueField, FirstItem type, string firstItemText) { BindList(listControl, dataSource, dataTextField, dataValueField, type, firstItemText, ""); }
public ISFTFacade SetSelectedItem(int key) { SelectedItem = FirstItem.Match(key); return(this); }
public ISFTFacade SetSelectedItem(string name) { SelectedItem = FirstItem.Match(name); return(this); }
public ISFTFacade SetSelectedItem(ISFT isft) { SelectedItem = FirstItem.Match(isft); return(this); }