public void Test_Save()
        {
            TestArticle article = CreateStrategy.New <TestArticle>(false).Create <TestArticle>();

            article.ID = Guid.NewGuid();

            StrategyInfo  info     = StrategyState.Strategies["Save", "IEntity"];
            ISaveStrategy strategy = SaveStrategy.New <TestArticle>(false);

            strategy.Save(article);

            TestArticle foundArticle = Data.DataAccess.Data.Reader.GetEntity <TestArticle>("ID", article.ID);

            Assert.IsNotNull(foundArticle);
        }
Beispiel #2
0
 protected override void OnSave()
 {
     try
     {
         if (!PanelForm.Enabled)
         {
             throw new ApplicationException("No se puede guardar este parte");
         }
         saver.Save(EditObject, Usuario.Id, DAOFactory);
     }
     catch (Exception ex)
     {
         LblInfo.Text = ex.Message;
         STrace.Exception(GetType().FullName, ex);
         throw;
     }
 }
Beispiel #3
0
 public void Save()
 {
     SaveStrategy.Save();
 }