Exemple #1
0
        private void ReflectFieldType(ViewItem vi, ViewItemCollection vic)
        {
            if (!vi.HasValidated)
            {
                if (vi.IsVirtual)
                {
                    HandleOtherField(vi);
                }
                else
                {
                    switch (this.BusinessObject.GetType().GetField(vi.FieldName).FieldType.Name)
                    {
                    case "BoolField":
                        vi.SetFieldType(ViewItemDisplayType.CheckBox);
                        break;

                    case "DateField":
                        vi.SetFieldType(ViewItemDisplayType.DateTime);
                        break;

                    default:
                        HandleOtherField(vi);
                        break;
                    }
                }
                vi.HasValidated = true;
            }

            vic.Add(vi);
        }
Exemple #2
0
 private void MergeVisibleColumnCollection(ViewItemCollection vic)
 {
     for (int i = 0; i < vic.Count; i++)
     {
         if (!this.visibleColumnCollection.Contains(vic[i]))
         {
             this.visibleColumnCollection.Add(vic[i]);
         }
     }
 }
Exemple #3
0
 private void SetVisibleColumnCollection(ViewItemCollection vic)
 {
     if (IsEmptyVisibleColumnCollection())
     {
         this.visibleColumnCollection = vic;
     }
     else
     {
         MergeVisibleColumnCollection(vic);
     }
 }
Exemple #4
0
        private void DoValidation()
        {
            ViewItemCollection vic = new ViewItemCollection();

            for (int i = 0; i < this.visibleColumnCollection.Count; i++)
            {
                if (vic.Contains(visibleColumnCollection[i]))
                {
                    continue;
                }

                if (IsValidField(visibleColumnCollection[i]))
                {
                    ReflectFieldType(visibleColumnCollection[i], vic);
                }
            }
            this.visibleColumnCollection = vic;
        }