Пример #1
0
    //===============================================================
    // Function: addReminderLink_click
    //===============================================================
    protected void addReminderLink_click(object sender, EventArgs e)
    {
        int eventID = int.Parse(Request.QueryString["EID"]);

        DateTime alertDate = CalendarAlertDate.SelectedDate;
        string alertText = newAlertTextBox.Text;

        EventAlert eventAlert = new EventAlert((string)Application["connectionString"]);
        eventAlert.alertDate = alertDate;
        eventAlert.eventID = eventID;
        eventAlert.alertText = alertText;
        eventAlert.Add();

        newAlertTextBox.Text = "";
        CalendarAlertDate.SelectedDate = DateTime.Now;
        PickerAlertDate.SelectedDate = DateTime.Now;

        Response.Redirect("viewEvent.aspx?EID=" + eventID.ToString());
    }
Пример #2
0
    //===============================================================
    // Function: saveChangesButton_click
    //===============================================================
    protected void saveChangesButton_click(object sender, EventArgs e)
    {
        int eventID = int.Parse(Request.QueryString["EID"]);

        if (eventPicFileUpload.PostedFile.ContentLength != 0)
        {
            int fileSizeBytes = eventPicFileUpload.PostedFile.ContentLength;

            GlobalData gd = new GlobalData((string)Session["loggedInUserFullName"]);
            string fileStoreFolder = gd.GetStringValue("FileStoreFolder") + @"\temp";

            string originalFileName = Path.GetFileName(eventPicFileUpload.PostedFile.FileName);
            string destPath = Path.Combine(fileStoreFolder, originalFileName);
            if ((eventPicFileUpload.PostedFile.ContentType == "image/jpeg"
                || eventPicFileUpload.PostedFile.ContentType == "image/gif"
                || eventPicFileUpload.PostedFile.ContentType == "image/png")
                && Path.GetExtension(destPath) != ""
                )
            {
                destPath = destPath.Replace(" ", "_");
                destPath = MiscUtils.GetUniqueFileName(destPath);
                string savedFilename = Path.GetFileName(destPath);

                eventPicFileUpload.PostedFile.SaveAs(destPath);

                MiscUtils.CreateEventPicPreviews(Path.GetFileName(destPath), eventID);
            }
        }

        DateTime alertDate = CalendarAlertDate.SelectedDate;
        string alertText = newAlertTextBox.Text.Trim();

        if (alertText != "")
        {
            EventAlert eventAlert = new EventAlert((string)Application["connectionString"]);
            eventAlert.alertDate = alertDate;
            eventAlert.eventID = eventID;
            eventAlert.alertText = alertText;
            eventAlert.Add();

            newAlertTextBox.Text = "";
            CalendarAlertDate.SelectedDate = DateTime.Now;
            PickerAlertDate.SelectedDate = DateTime.Now;
        }

        SedogoEvent sedogoEvent = new SedogoEvent((string)Session["loggedInUserFullName"], eventID);
        sedogoEvent.Update();

        Response.Redirect("addEventInvites.aspx?EID=" + eventID.ToString());
    }
Пример #3
0
    //===============================================================
    // Function: createAlertLink_click
    //===============================================================
    protected void createAlertLink_click(object sender, EventArgs e)
    {
        int eventID = int.Parse(Request.QueryString["EID"]);

        DateTime alertDate = CalendarAlertDate.SelectedDate;
        string alertText = newAlertTextBox.Text;

        EventAlert eventAlert = new EventAlert(Session["loggedInUserFullName"].ToString());
        eventAlert.alertDate = alertDate;
        eventAlert.eventID = eventID;
        eventAlert.alertText = alertText;
        eventAlert.Add();

        newAlertTextBox.Text = "";
        CalendarAlertDate.SelectedDate = DateTime.Now;
        PickerAlertDate.SelectedDate = DateTime.Now;

        PopulateAlerts(eventID);
    }
Пример #4
0
    //===============================================================
    // Function: createAlertLink_click
    //===============================================================
    protected void createAlertLink_click(object sender, EventArgs e)
    {
        int eventID = int.Parse(Request.QueryString["EID"]);

        DateTime alertDate = CalendarAlertDate.SelectedDate;
        string alertText = newAlertTextBox.Text;

        EventAlert eventAlert = new EventAlert((string)Application["connectionString"]);
        eventAlert.alertDate = alertDate;
        eventAlert.eventID = eventID;
        eventAlert.alertText = alertText;
        eventAlert.Add();

        newAlertTextBox.Text = "";
        CalendarAlertDate.SelectedDate = DateTime.Now;
        PickerAlertDate.SelectedDate = DateTime.Now;

        PopulateAlerts(eventID);
    }