Example #1
0
        public void GetViewList(Control listControl, IDataBoundListControl lv, List <WACParameter> parms)
        {
            Enum state = WACListControl.ListState.ListEmpty;

            try
            {
                ListSource.FList = null;
                if (parms.Count == 0)
                {
                    ListSource.GetFullItemList(DataProvider.GetList);
                }
                else
                {
                    ListSource.GetFilteredItemList(parms, DataProvider.GetFilteredList);
                }
                state = processIDataBoundListControlList(listControl, lv);
            }
            catch (Exception ex)
            {
                throw new Exception("Can not bind IDataBoundListControl " + listControl.ID + " " + ex.Message);
            }
            finally
            {
                ContentStateChanged(listControl, state);
            }
        }
Example #2
0
        public void GetViewList(Control listControl, IDataBoundListControl lv)
        {
            List <WACParameter> parms = new List <WACParameter>();

            if (ListSource.SelectedKey != null)
            {
                parms.Add(ListSource.SelectedKey);
            }
            GetViewList(listControl, lv, parms);
        }
        internal static void EnablePersistedSelectionInternal(BaseDataBoundControl dataBoundControl)
        {
            IDataBoundListControl dataBoundListControl = dataBoundControl as IDataBoundListControl;

            if (dataBoundListControl != null)
            {
                dataBoundListControl.EnablePersistedSelection = true;
                //

                if (dataBoundListControl.SelectedIndex < 0)
                {
                    // Force the first item to be selected
                    dataBoundListControl.SelectedIndex = 0;
                }
            }
        }
Example #4
0
        public void GetViewList(Control listControl, IDataBoundListControl lv, List <WACParameter> parms, MasterDetailDataObject.FilteredListGetterDelegate _getList)
        {
            Enum state = WACListControl.ListState.ListEmpty;

            try
            {
                ListSource.FList = null;
                ListSource.GetFilteredItemList(parms, _getList);
                state = processIDataBoundListControlList(listControl, lv);
            }
            catch (Exception ex)
            {
                throw new Exception("Can not bind IDataBoundListControl " + listControl.ID + " " + ex.Message);
            }
            finally
            {
                ContentStateChanged(listControl, state);
            }
        }
Example #5
0
 private Enum processIDataBoundListControlList(Control listControl, IDataBoundListControl lv)
 {
     if (ListSource.VList != null || ListSource.VList.Count < 1)
     {
         if (ListSource.VList.Count == 1)
         {
             ListSource.SetPrimaryKeyValue(DataProvider.PrimaryKeyName(), DataProvider.PrimaryKeyValue(ListSource.VList));
             ListSource.SetSelectedKeyValue(DataProvider.PrimaryKeyName(), DataProvider.PrimaryKeyValue(ListSource.VList));
             return(WACGridControl.ListState.ListSingle);
         }
         else
         {
             return(WACGridControl.ListState.ListFull);
         }
     }
     else
     {
         return(WACGridControl.ListState.ListEmpty);
     }
 }