Esempio n. 1
0
 /// <summary>
 /// Raises the <see cref="E:CopyToFinished"/> event.
 /// </summary>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 /// <remarks>Documented by Dev08, 2008-09-26</remarks>
 private void OnCopyToFinished(CopyToEventArgs e)
 {
     if (CopyToFinished != null)
         CopyToFinished(this, e);
 }
Esempio n. 2
0
        /// <summary>
        /// Handles the CopyToFinished event of the Dictionary control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MLifter.BusinessLayer.CopyToEventArgs"/> instance containing the event data.</param>
        /// <returns></returns>
        /// <remarks>Documented by Dev08, 2008-09-26</remarks>
        static void Dictionary_CopyToFinished(object sender, CopyToEventArgs e)
        {
            //e.source.Save();
            e.source.Dispose();
            e.sourceUser.Logout();

            if (e.success)
            {
                e.target.Save();
                e.target.Dispose();
                e.targetUser.Logout();
            }
            else
            {
                e.target.Dispose();
                try
                {
                    e.targetUser.BaseUser.List().Delete(e.targetUser.BaseUser.ConnectionString);
                }
                catch { }
                e.targetUser.Logout();
            }

            //send EventArg to Interface, so that this can react on this.
            OnCopyToFinished(e);
        }