protected void ButtonSave_Click(object sender, EventArgs ex) { long id = long.Parse(Request["Id"]); VolunteerTracker.Event e = new VolunteerTracker.Event(id); e.Name = Name.Text.Trim(); e.Date = DateTime.Parse(Date.Text); e.Date = new DateTime(e.Date.Year, e.Date.Month, e.Date.Day, int.Parse(Time.SelectedValue), 0, 0); e.Save(); message = "<font color=\"red\">Saved</font>"; }
protected void ButtonSave_Click(object sender, EventArgs ex) { VolunteerTracker.Event e = new VolunteerTracker.Event(); e.Name = Name.Text.Trim(); e.Date = DateTime.Parse(Date.Text); e.Email = ""; e.Notes = ""; e.Save(); //message = "<font color=\"red\">Saved</font>"; Response.Redirect("../Event/Event.aspx?Id=" + e.Id); }
public void AddDefaultVolunteersAndEvents() { Database.SetConnectionString(Database.CreateConnectionString(DatabasePath, DatabaseName, DatabaseUserName, DatabasePassword)); VolunteerTracker.Volunteer v1 = new Volunteer(1); v1.FirstName = "Default Volunteer"; v1.LastName = ""; v1.CellPhone = ""; v1.HomePhone = ""; v1.OfficePhone = ""; v1.Save(); VolunteerTracker.Event e = new VolunteerTracker.Event(); e.Name = "Default Event"; e.Save(); }