Пример #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
                {
                    var adp = new FeedbackTableAdapter();
                    adp.Insert(txtName.Text, txtEmail.Text, txtWebAddress.Text,
                        txtSubject.Text, txtMessage.Text);

                }
                catch
                {
                }

                try
                {
                    SendMessage();

                }
                catch
                {

                }
                tableForm.Visible = false;
                DoneMessage.Visible = true;
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            FeedbackTableAdapter feedback = new FeedbackTableAdapter();

            feedback.Insert(1, true, "Avaliação de atendimento", TxtFeedback.Text, DateTimeOffset.Now, 1);
            this.Visible = false;
        }
Пример #3
0
        public JsonResult Feedback(string content)
        {
            DateTime date = DateTime.Now;
            string username = AccountInfo.GetUserName(Request);
            var message = "Gửi phản hồi thành công!";

            try
            {
                FeedbackTableAdapter feedbackAdapter = new FeedbackTableAdapter();
                feedbackAdapter.Insert(content, date, username);
            }
            catch (Exception ex)
            {
                Log.ErrorLog(ex.Message);
                message = "Gửi phản hồi thất bại!";
            }

            return Json(message, JsonRequestBehavior.AllowGet);
        }
Пример #4
0
 public void Insert(string feedback, int userid, DateTime date)
 {
     _feedback.Insert(feedback, userid, date);
 }