Пример #1
0
        public void ConfigureBucket(string strEntity, int setId,
                                    GetListDelegate getListDelegate, GetDataDelegate getDataDelegate, GetSaveDelegate saveDelegate,
                                    string sourceTextColumn = "", string sourceValueColumn = "")
        {
            EntityName            = strEntity;
            lblCurrentTitle.Text  = "Currently Associated " + EntityName + "(s) :";
            lblPossibleTitle.Text = "Possible " + EntityName + "(s) :";
            PrimaryKeyId          = setId;
            _getList = getListDelegate;
            _getData = getDataDelegate;
            _save    = saveDelegate;

            SourceTextColumn  = sourceTextColumn;
            SourceValueColumn = sourceValueColumn;

            LoadSource();
            LoadCurrentTarget();
        }
Пример #2
0
        public void ConfigureBucket(string strEntity1, string strEntity2, string strEntity1TextField, string strEntity2TextField, int setId,
                                    GetListDelegate getListDelegateEntity1, GetListDelegate getListDelegateEntity2, GetDataDelegate getDataDelegate,
                                    GetSaveDelegate saveDelegate, GetRemoveDelegate removeDelegate)
        {
            EntityName1 = strEntity1;
            EntityName2 = strEntity2;

            Entity1TextField = strEntity1TextField;
            Entity2TextField = strEntity2TextField;

            lblEntity1.Text = EntityName1 + "(s) :";
            lblEntity2.Text = EntityName2 + "(s) :";
            SetId           = setId;
            _getListEntity1 = getListDelegateEntity1;
            _getListEntity2 = getListDelegateEntity2;

            _getData = getDataDelegate;
            _save    = saveDelegate;
            _remove  = removeDelegate;

            LoadSource();
            LoadTarget();
            //LoadCurrentTarget();
        }
Пример #3
0
 public static void Test()
 {
     // I would call it like so, but first line gets exception, where indicated above
     GetListDelegate        getList = Lists.GetListDelegateForType(typeof(BaseItem));
     IEnumerable <BaseItem> myList  = getList();
 }