Beispiel #1
0
 public override bool SaveStep(ref System.Collections.Specialized.NameValueCollection queryString)
 {
     try
     {
         survey.MailTo    = txtMT.Text;
         survey.IsContest = Convert.ToBoolean(Convert.ToInt32(rblIsContest.SelectedValue));
         survey.ShowForm  = Convert.ToBoolean(Convert.ToInt32(rblShowForm.SelectedValue));
         survey.StartDate = AccessMode == AccessMode.Insert && !rdtpActiveFrom.SelectedDate.HasValue ? DateTime.Now : rdtpActiveFrom.SelectedDate.Value;
         if (rdtpActiveTo.SelectedDate.HasValue)
         {
             survey.EndDate = rdtpActiveTo.SelectedDate.Value;
         }
         GetHiddenFields();
         survey.Update(UserDataContext.GetUserDataContext());
         return(true);
     }
     catch (Exception ex)
     {
         this.litMsg.Text = "Fehler beim Speichern: " + ex.Message;
         return(false);
     }
 }
        public override bool SaveStep(ref System.Collections.Specialized.NameValueCollection queryString)
        {
            try
            {
                survey.Title  = txtTitle.Text;
                survey.Footer = txtFooter.Content;
                survey.Header = txtHeader.Content;
                if (AccessMode == AccessMode.Insert)
                {
                    survey.StartDate = DateTime.Now;
                    survey.ShowState = ObjectShowState.Draft;
                }
                GetHiddenFields();

                survey.Update(UserDataContext.GetUserDataContext());
                return(true);
            }
            catch (Exception ex)
            {
                this.litMsg.Text = "Fehler beim Speichern: " + ex.Message;
                return(false);
            }
        }