Exemplo n.º 1
0
        public void Save(CmsSavedForm tempForm)
        {
            CmsSavedFormDao dao = new CmsSavedFormDao();
            CmsSavedForm exists = dao.FindBySiteAndName(tempForm.SubscriptionId, tempForm.Name);
            if (exists == null)
                exists = new CmsSavedForm();

            if (tempForm.Guid == null)
                exists.Guid = System.Guid.NewGuid().ToString();
            if (tempForm.SubscriptionId == null)
                exists.SubscriptionId = CurrentSite.Guid.Value;
            exists.Markup = tempForm.Markup;
            exists.DateSaved = tempForm.DateSaved;
            exists.Name = tempForm.Name;

            using (Transaction tx = new Transaction())
            {
                dao.Save<CmsSavedForm>(exists);
                tx.Commit();
            }
        }
Exemplo n.º 2
0
 public IList<CmsSavedForm> GetSavedForms(Data.Guid siteGuid)
 {
     CmsSavedFormDao dao = new CmsSavedFormDao();
     return dao.FindBySite(siteGuid);
 }
Exemplo n.º 3
0
 public CmsSavedForm GetSavedForm(Data.Guid siteGuid, Data.Guid guid)
 {
     CmsSavedFormDao dao = new CmsSavedFormDao();
     return dao.FindBySiteAndGuid(siteGuid, guid);
 }