public async Task <HttpResponseMessage> PostFeedback(int reasonID, string comment, int react, string fullname) { try { FeedbackDAL dal = new FeedbackDAL(); JsonResponse data = await dal.PostFeedback(reasonID, comment, react, fullname); if (data != null && data.Flag) { return(Request.CreateResponse <JsonResponse>(HttpStatusCode.OK, data)); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, Constants.ErrorNotFound)); } } catch (DbEntityValidationException ex) { var controllerName = ControllerContext.RouteData.Values["controller"].ToString(); var actionName = ControllerContext.RouteData.Values["action"].ToString(); Logger log = new Logger(); log.ErrorLog(ex, controllerName, actionName); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, Constants.ErrorSysError)); } }
public async Task <HttpResponseMessage> GetFeedbackReasonList() { try { FeedbackDAL dal = new FeedbackDAL(); List <FeedbackReasonList> data = await dal.GetFeedbackReasonList(); if (data != null) { return(Request.CreateResponse <List <FeedbackReasonList> >(HttpStatusCode.OK, data)); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, Constants.ErrorNotFound)); } } catch (DbEntityValidationException ex) { var controllerName = ControllerContext.RouteData.Values["controller"].ToString(); var actionName = ControllerContext.RouteData.Values["action"].ToString(); Logger log = new Logger(); log.ErrorLog(ex, controllerName, actionName); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, Constants.ErrorSysError)); } }
protected void Page_Load(object sender, EventArgs e) { try { this.Master.name.Text = Session["User"].ToString(); } catch (Exception ex) { Response.Redirect("index.aspx"); } int sid = Convert.ToInt32(Session["Feedback_Key"]); FeedbackDAL fdal = new FeedbackDAL(); DataSet ds = fdal.GetAll(sid); if (ds.Tables[0].Rows.Count > 0) { DataTable dt = ds.Tables[0]; DataRow dr = dt.Rows[0]; string a = Session["Feedback_Key"].ToString(); string b = dr["student_id"].ToString(); if (a == b) { pnlFeedback.Visible = false; lblSubmitted.Text = "Feedback Already Submitted"; } } }
protected void Button1_Click(object sender, EventArgs e) { instructor(); venue(); volunteer(); hospitality(); course(); registration(); atmosphere(); /* v.instructor = 1; * v.venue = 2; * v.Volunteer = 4; * v.hospitality = 5; * v.course = 1; * v.registration = 2; * v.atmosphere = 5;*/ FeedbackDAL d = new FeedbackDAL(); int sid = Convert.ToInt32(Session["Feedback_Key"]); d.Addfeedback(v, sid); }
public ActionResult Feedback_Post(FormCollection collection) { Feedback feedback = new Feedback(); feedback.Pusername = TempData["username"].ToString(); TempData.Keep(); feedback.Dfirstname = TempData["fdfirstname"].ToString(); TempData.Keep(); feedback.Dlastname = TempData["fdlastname"].ToString(); TempData.Keep(); TryUpdateModel(feedback); if (ModelState.IsValid) { feedback.Dinfoid = 0; feedback.Pinfoid = 0; FeedbackDAL.Feedback(feedback); return(RedirectToAction("Index")); } else { return(View()); } }
//删除,软删除 public int DeleteFeedback(int opId, int mid) { FeedbackDAL feedback = new FeedbackDAL(); return(feedback.DeleteFeedback(opId, mid)); }
//查询 public List <opinionModel> Thequery(string opContent) { FeedbackDAL feedback = new FeedbackDAL(); return(feedback.Thequery(opContent)); }
//投诉—未投诉 public List <opinionModel> Complaints(int opBrowsed, int opType) { FeedbackDAL feedback = new FeedbackDAL(); return(feedback.Complaints(opBrowsed, opType)); }
//未回复 public List <opinionModel> Didnotreturn() { FeedbackDAL feedback = new FeedbackDAL(); return(feedback.Didnotreturn()); }
//已回复 public List <opinionModel> Havetoreply() { FeedbackDAL feedback = new FeedbackDAL(); return(feedback.Havetoreply()); }
public List <opinionModel> OpinionsList() { FeedbackDAL feedback = new FeedbackDAL(); return(feedback.OpinionsList()); }
public FeedbackBLL() { feedbackDAL = new FeedbackDAL(); }
public FeedbackBLL() { _feedbackDal = new FeedbackDAL(); }