コード例 #1
0
        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));
            }
        }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
    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";
            }
        }
    }
コード例 #4
0
    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);
    }
コード例 #5
0
        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());
            }
        }
コード例 #6
0
ファイル: FeedbackBLL.cs プロジェクト: dwjkkl39/pigfly
        //删除,软删除
        public int DeleteFeedback(int opId, int mid)
        {
            FeedbackDAL feedback = new FeedbackDAL();

            return(feedback.DeleteFeedback(opId, mid));
        }
コード例 #7
0
ファイル: FeedbackBLL.cs プロジェクト: dwjkkl39/pigfly
        //查询
        public List <opinionModel> Thequery(string opContent)
        {
            FeedbackDAL feedback = new FeedbackDAL();

            return(feedback.Thequery(opContent));
        }
コード例 #8
0
ファイル: FeedbackBLL.cs プロジェクト: dwjkkl39/pigfly
        //投诉—未投诉
        public List <opinionModel> Complaints(int opBrowsed, int opType)
        {
            FeedbackDAL feedback = new FeedbackDAL();

            return(feedback.Complaints(opBrowsed, opType));
        }
コード例 #9
0
ファイル: FeedbackBLL.cs プロジェクト: dwjkkl39/pigfly
        //未回复
        public List <opinionModel> Didnotreturn()
        {
            FeedbackDAL feedback = new FeedbackDAL();

            return(feedback.Didnotreturn());
        }
コード例 #10
0
ファイル: FeedbackBLL.cs プロジェクト: dwjkkl39/pigfly
        //已回复
        public List <opinionModel> Havetoreply()
        {
            FeedbackDAL feedback = new FeedbackDAL();

            return(feedback.Havetoreply());
        }
コード例 #11
0
ファイル: FeedbackBLL.cs プロジェクト: dwjkkl39/pigfly
        public List <opinionModel> OpinionsList()
        {
            FeedbackDAL feedback = new FeedbackDAL();

            return(feedback.OpinionsList());
        }
コード例 #12
0
 public FeedbackBLL()
 {
     feedbackDAL = new FeedbackDAL();
 }
コード例 #13
0
 public FeedbackBLL()
 {
     _feedbackDal = new FeedbackDAL();
 }