Пример #1
0
        public void Save()
        {
            var store = DynamicDataStoreFactory.Instance.CreateStore(typeof(DynamicComment));

            store.Save(this);

            // Check PageID exist in ListPage
            if (ListPage == null)
            {
                ListPage.Add(DynamicComment.LastComment().PageID);
            }
            else
            {
                int testIdExitsInList = 0;
                foreach (int newID in ListPage)
                {
                    if (newID == LastComment().PageID)
                    {
                        testIdExitsInList = 1;
                        break;
                    }
                }

                if (testIdExitsInList == 0)
                {
                    ListPage.Add(LastComment().PageID);
                }
            }
        }
Пример #2
0
 public DynamicComment(int PageID, String email, String text)
 {
     this.IdComment   = DynamicComment.LastId().IdComment + 1;
     this.PageID      = PageID;
     this.Comment     = text;
     this.Email       = email;
     this.TimeComment = DateTime.Now;
     this.Status      = "none";
 }