Esempio n. 1
0
        /// <summary>
        /// Carga de manera asincrona los Dominios relacionados entre si en la grilla.-
        /// </summary>
        public void PopulateAsync()
        {
            Exception ex = null;

            Fwk.UI.Common.HelperFunctions.DelegateWithOutAndRefParameters s = new Fwk.UI.Common.HelperFunctions.DelegateWithOutAndRefParameters(Populate);

            s.BeginInvoke(out ex, new AsyncCallback(EndPopulate), null);
        }
Esempio n. 2
0
        /// <summary>
        /// Fin de el metodo populate que fue llamado de forma asincrona
        /// </summary>
        /// <param name="res"></param>
        void EndPopulate(IAsyncResult res)
        {
            Exception ex;

            if (this.InvokeRequired)
            {
                AsyncCallback d = new AsyncCallback(EndPopulate);
                this.Invoke(d, new object[] { res });
            }
            else
            {
                AsyncResult result = (AsyncResult)res;

                Fwk.UI.Common.HelperFunctions.DelegateWithOutAndRefParameters del = (Fwk.UI.Common.HelperFunctions.DelegateWithOutAndRefParameters)result.AsyncDelegate;
                del.EndInvoke(out ex, res);

                treeList1.BeginUnboundLoad();
                this.rulesCategoryBEListBindingSource.DataSource = _Categories;

                treeList1.RefreshDataSource();
                treeList1.EndUnboundLoad();
            }
        }