コード例 #1
0
        public bool AddPerson(int id, string name, int position, bool is_valid)
        {
            if (!_personSelectListFilter)
            {
                is_valid = true;
            }

            for (int i = 0; i < Count; i++)
            {
                var old = this[i] as PersonListItem;
                if (old != null && old.ID == id)
                {
                    old.IsValid = is_valid;
                    old.UpdateStyle();

                    if (old.Removable)
                    {
                        if (position != 0)
                        {
                            old.Position = position;
                        }
                    }
                    return(true);
                }
            }

            list.Items.Add(new PersonListItem(id, name, Environment.PersonURL + id.ToString(), position, is_valid));

            person.Clear();
            ParsePerson(false);

            OnPersonAdded(id);
            OnCountChanged();
            return(true);
        }
コード例 #2
0
 public void ClearText()
 {
     textEmp.Clear();
     lastEmployeeText = "";
     findEmployeeID   = 0;
     OnFindEmployee(findEmployeeID);
 }
コード例 #3
0
 public void Clear()
 {
     if (ClearAfterSelect)
     {
         textEmp.Clear();
     }
     lastEmployeeText = "";
 }