public override void ShowEditTreeDefault(TreeDefaultValueDO tdv)
        {
            TreeDefaultValueDO temp = new TreeDefaultValueDO(tdv);

            try
            {
                using (FormAddTreeDefault dialog = new FormAddTreeDefault(this.ApplicationController.SetupService.GetProductCodes()))
                {
                    if (dialog.ShowDialog(temp) == DialogResult.OK)
                    {
                        try
                        {
                            tdv.SetValues(temp);
                            tdv.Save();
                        }
                        catch (FMSC.ORM.UniqueConstraintException ex)
                        {
                            throw new UserFacingException("Values Conflict With Existing Tree Default", ex);
                        }
                        catch (FMSC.ORM.ConstraintException ex)
                        {
                            throw new UserFacingException("Invalid Values", ex);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                if (!this.ApplicationController.ExceptionHandler.Handel(ex))
                {
                    throw;
                }
            }
        }
 public override TreeDefaultValueDO ShowAddTreeDefault(TreeDefaultValueDO newTDV)
 {
     try
     {
         FormAddTreeDefault dialog = new FormAddTreeDefault(ApplicationController.SetupService.GetProductCodes());
         if (dialog.ShowDialog(newTDV) == DialogResult.OK)
         {
             newTDV.Save();
             return newTDV;
         }
         else
         {
             return null;
         }
     }
     catch (Exception ex)
     {
         if (!this.ApplicationController.ExceptionHandler.Handel(ex))
         {
             throw;
         }
         else
         {
             return null;
         }
     }
 }