protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Form["answerid"]) && !string.IsNullOrEmpty(Request.Form["answer"]) && !string.IsNullOrEmpty(Request.Form["questionid"])) { Guid answerid = new Guid(Request.Form["answerid"]); Guid questionid = new Guid(Request.Form["questionid"]); string answer = Request.Form["answer"]; Service.BlogService service = new Service.BlogService(); Service.ActionModels.SheetAnswerModel model = new Service.ActionModels.SheetAnswerModel(); model.AnswerID = answerid; model.AnswerName = answer; model.QuestionID = questionid; try { service.UpdateSheetAnswer(model); Guid formid = service.GetFormIDByQuestionID(model.QuestionID); Response.Redirect("~/Admin/Pages/SheetQuestion/Question.aspx?FormID=" + formid); } catch { } } }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Form["questionid"]) && !string.IsNullOrEmpty(Request.Form["answer"]) && !string.IsNullOrEmpty(Request.Form["formid"])) { FBS.Service.BlogService service = new FBS.Service.BlogService(); Service.ActionModels.SheetAnswerModel model = new Service.ActionModels.SheetAnswerModel(); model.QuestionID = new Guid(Request.Form["questionid"]); model.AnswerName = Request.Form["answer"]; model.FormID = new Guid(Request.Form["formid"]); try { service.CreateQuestionAnswer(model); Response.Redirect("~/Admin/Pages/SheetAnswer/AddAnswer.aspx?questionid=" + model.QuestionID); } catch { } } }