Beispiel #1
0
    public void Page_Load(object sender, EventArgs e)
    {
        gridManageReminderAccountProperties.OnGetDataSource += new EventHandler(gridManageReminderAccountProperties_OnGetDataSource);

        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Reminders", Request, "SystemRemindersManage.aspx"));

            inputDataObject.DataSource = SessionManager.ObjectService.GetDataObjects(
                SessionManager.Ticket, null);
            inputDataObject.DataBind();

            inputDataObject_SelectedIndexChanged(sender, e);

            if (RequestId > 0)
            {
                TransitReminder t = SessionManager.ObjectService.GetReminderById(
                    SessionManager.Ticket, RequestId);
                inputUrl.Text = t.Url;

                ListItemManager.SelectAdd(inputDeltaHours,
                                          string.Format("Every {0} Hours", t.DeltaHours),
                                          t.DeltaHours);

                ListItemManager.TrySelect(inputDataObjectField, t.DataObjectField);

                inputEnabled.Checked   = t.Enabled;
                inputRecurrent.Checked = t.Recurrent;

                GetAccountPropertiesData(sender, e);
                GetAccountProperties(sender, e);

                sitemapdata.Add(new SiteMapDataAttributeNode(t.Url, Request.Url));
            }
            else
            {
                panelAccountProperties.Visible = false;
                sitemapdata.Add(new SiteMapDataAttributeNode("New Reminder", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
        PageManager.SetDefaultButton(addAccountProperty, panelAccountProperties.Controls);
        PageManager.SetDefaultButton(inputTest, inputTestAccountId);
    }
Beispiel #2
0
    public void save_Click(object sender, EventArgs e)
    {
        TransitReminder t = new TransitReminder();

        t.Id              = RequestId;
        t.Url             = inputUrl.Text;
        t.DeltaHours      = int.Parse(inputDeltaHours.SelectedValue);
        t.Enabled         = inputEnabled.Checked;
        t.Recurrent       = inputRecurrent.Checked;
        t.DataObject_Id   = int.Parse(inputDataObject.SelectedValue);
        t.DataObjectField = inputDataObjectField.SelectedValue;
        t.LastRun         = DateTime.UtcNow;
        SessionManager.CreateOrUpdate <TransitReminder>(
            t, SessionManager.ObjectService.CreateOrUpdateReminder);
        Redirect("SystemRemindersManage.aspx");
    }
 public void save_Click(object sender, EventArgs e)
 {
     TransitReminder t = new TransitReminder();
     t.Id = RequestId;
     t.Url = inputUrl.Text;
     t.DeltaHours = int.Parse(inputDeltaHours.SelectedValue);
     t.Enabled = inputEnabled.Checked;
     t.Recurrent = inputRecurrent.Checked;
     t.DataObject_Id = int.Parse(inputDataObject.SelectedValue);
     t.DataObjectField = inputDataObjectField.SelectedValue;
     t.LastRun = DateTime.UtcNow;
     SessionManager.CreateOrUpdate<TransitReminder>(
         t, SessionManager.ObjectService.CreateOrUpdateReminder);
     Redirect("SystemRemindersManage.aspx");
 }
Beispiel #4
0
 public int CreateOrUpdateReminder(string ticket, TransitReminder reminder)
 {
     return(WebServiceImpl <TransitReminder, ManagedReminder, Reminder> .CreateOrUpdate(
                ticket, reminder));
 }
Beispiel #5
0
 public int CreateOrUpdateReminder(string ticket, TransitReminder reminder)
 {
     return WebServiceImpl<TransitReminder, ManagedReminder, Reminder>.CreateOrUpdate(
         ticket, reminder);
 }