private void btn_Finish_Click(object sender, EventArgs e) { this.Hide(); form_register fr = new form_register(); fr.ShowDialog(); }
private void btn_SubmitRideRequest_Click(object sender, EventArgs e) { string values = txt_DesiredTime.Text; TimeSpan dtime = TimeSpan.Parse(values); user.Location = txt_StreetAddress.Text + " " + cb_State.Text + ", OR"; request.Destination = txt_destination.Text + " " + cb_State.Text + ", OR"; request.CreditCard_ = txt_CreditCard.Text; request.Rider_Desired_Time = dtime; rider.RideRequest1 = request; user.Rider = rider; _dbContext.RideRequests.Add(request); _dbContext.Riders.Add(rider); _dbContext.Users.Add(user); _dbContext.SaveChanges(); this.Hide(); form_register fr = new form_register(); fr.ShowDialog(); }