//=============================================================== // Function: saveButton_Click //=============================================================== protected void saveButton_Click(object sender, EventArgs e) { SedogoTimezone timezone = new SedogoTimezone(Session["loggedInAdministratorName"].ToString()); timezone.shortCode = shortCodeTextBox.Text; timezone.description = descriptionTextBox.Text; timezone.GMTOffset = int.Parse(offsetTextBox.Text); timezone.Add(); Response.Redirect("editTimezone.aspx?TID=" + timezone.timezoneID.ToString()); }
//=============================================================== // Function: saveButton_Click //=============================================================== protected void saveButton_Click(object sender, EventArgs e) { int timezoneID = int.Parse(Request.QueryString["TID"]); SedogoTimezone timezone = new SedogoTimezone(Session["loggedInAdministratorName"].ToString(), timezoneID); timezone.shortCode = shortCodeTextBox.Text; timezone.description = descriptionTextBox.Text; timezone.GMTOffset = int.Parse(offsetTextBox.Text); timezone.Update(); }
//=============================================================== // Function: Page_Load //=============================================================== protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int timezoneID = int.Parse(Request.QueryString["TID"]); SedogoTimezone timezone = new SedogoTimezone(Session["loggedInAdministratorName"].ToString(), timezoneID); shortCodeTextBox.Text = timezone.shortCode; descriptionTextBox.Text = timezone.description; offsetTextBox.Text = timezone.GMTOffset.ToString(); } }