protected void ButtonSubmit_OnClick(object sender, EventArgs e) { searchBid.FullName = fullname.Value; searchBid.Email = email.Value; searchBid.ConfirmInvestments = SqlBoolean.Parse(confirminvestments.Checked.ToString()); searchBid.ConfirmServices = SqlBoolean.Parse(confirmservices.Checked.ToString()); searchBid.RequiredRevenue = decimal.Parse(requirerevenue.Value); searchBid.RequiredRevenueExplanation = requirerevenueexplanation.Value; searchBid.AncillaryServices = ancillaryservices.Value; searchBid.SaveRecordToDatabase(new Guid("17F6FCEB-CF02-E411-9726-D8D385C29900")); foreach (RepeaterItem item in RepeaterSearchQuestions.Items) { HiddenField hiddenField = (HiddenField)item.FindControl("SearchQuestionId"); SearchQuestion searchQuestion = new SearchQuestion(new Guid(hiddenField.Value.ToString())); SearchBidQuestion searchBidQuestion = searchBidQuestions.Find(x => x.SearchQuestionId == searchQuestion.Id); CheckBox checkBox = (CheckBox)item.FindControl("SearchQuestionAnswer"); searchBidQuestion.AnswerValue = SqlBoolean.Parse(checkBox.Checked.ToString()); searchBidQuestion.SaveRecordToDatabase(new Guid("17F6FCEB-CF02-E411-9726-D8D385C29900")); } }
private void btnSave_Click(object sender, EventArgs e) { if (String.IsNullOrWhiteSpace(cboIsFinalist.Text)) { CurrentSearchBid.IsFinalist = null; } else { CurrentSearchBid.IsFinalist = SqlBoolean.Parse(cboIsFinalist.Text.ToLower()); } if (String.IsNullOrWhiteSpace(cboIsRecommended.Text)) { CurrentSearchBid.IsRecommended = null; } else { CurrentSearchBid.IsRecommended = SqlBoolean.Parse(cboIsRecommended.Text.ToLower()); } CurrentSearchBid.Notes = txtNotes.Text; CurrentSearchBid.SaveRecordToDatabase(frmMain_Parent.CurrentUser.UserId); this.Close(); }