/// <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);
            }
        }
Пример #2
0
 public override void SetHeader(VisualElement header)
 {
     base.SetHeader(header);
     if (HasHeader() && CircleListView.GetCancelEffect(header))
     {
         FirstItem.UpdateItemClass(GetCancelEffectTemplete(), header);
     }
 }
Пример #3
0
        /// <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));
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        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();
 }
Пример #8
0
        /// <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);
            }
        }
Пример #9
0
 /// <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, "");
 }
Пример #10
0
 public ISFTFacade SetSelectedItem(int key)
 {
     SelectedItem = FirstItem.Match(key);
     return(this);
 }
Пример #11
0
 public ISFTFacade SetSelectedItem(string name)
 {
     SelectedItem = FirstItem.Match(name);
     return(this);
 }
Пример #12
0
 public ISFTFacade SetSelectedItem(ISFT isft)
 {
     SelectedItem = FirstItem.Match(isft);
     return(this);
 }