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) { Service.BlogService service = new Service.BlogService(); if (!string.IsNullOrEmpty(Request.QueryString["questionID"]) && !string.IsNullOrEmpty(Request.QueryString["formID"])) { Guid questionID = new Guid(Request.QueryString["questionID"]); Guid formID = new Guid(Request.QueryString["formID"]); try { service.DeleteQuestion(questionID); Response.Write("删除成功"); Response.Redirect("Question.aspx?FormID=" + formID); } catch {} } if (!string.IsNullOrEmpty(Request.QueryString["answerid"]) && !string.IsNullOrEmpty(Request.QueryString["formID"])) { Guid answerid = new Guid(Request.QueryString["answerid"]); Guid formID = new Guid(Request.QueryString["formID"]); try { service.DeleteQuestionAnswer(answerid); Response.Write("删除成功"); Response.Redirect("Question.aspx?FormID=" + formID); } catch { } } if (!string.IsNullOrEmpty(Request.Form["formid"]) && !string.IsNullOrEmpty(Request.Form["question"])) { string formid = Request.Form["formid"]; Service.ActionModels.AnswerSheetQuestionModel model = new Service.ActionModels.AnswerSheetQuestionModel(); model.FormID = new Guid(Request.Form["formid"]); model.QuestionName = Request.Form["question"]; try { service.CreateQuestion(model); Response.Redirect("Question.aspx?formid=" + formid); } catch { } } }
protected void Page_Load(object sender, EventArgs e) { Service.BlogService service = new Service.BlogService(); if (!string.IsNullOrEmpty(Request.Form["title"]) && !string.IsNullOrEmpty(Request.Form["formid"]) && !string.IsNullOrEmpty(Request.Form["description"])) { Service.ActionModels.FormInfoModel model = new Service.ActionModels.FormInfoModel(); model.Title = Request.Form["title"]; model.Description = Request.Form["description"]; model.FormID = new Guid(Request.Form["formid"]); try { service.UpdateFormInfo(model); Response.Redirect("FormInfoList.aspx"); } catch { } } }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Form["formid"]) && !string.IsNullOrEmpty(Request.Form["questionid"]) && !string.IsNullOrEmpty(Request.Form["question"])) { Guid formid = new Guid(Request.Form["formid"]); Service.BlogService service = new Service.BlogService(); Service.ActionModels.AnswerSheetQuestionModel model = new Service.ActionModels.AnswerSheetQuestionModel(); model.QuestionID = new Guid(Request.Form["questionid"]); model.QuestionName = Request.Form["question"]; try { service.UpdateSheetQuestion(model); Response.Redirect("Question.aspx?FormID=" + formid); } catch { } } }
public ControllerBase() { UserService = new Service.UserService(); BlockService = new Service.BlockService(); BlogService = new Service.BlogService(); }