Beispiel #1
0
 protected void btn_submit_Click(object sender, EventArgs e)
 {
     if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString())
     {
         Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString());
         if (Page.IsValid)
         {
             Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());
             if (Captcha1.UserValidated)
             {
                 ReturnClass.ReturnBool rb = new ReturnClass.ReturnBool();
                 bl_feedback            bl = new bl_feedback();
                 dl_feedback            dl = new dl_feedback();
                 bl.Feedback = txt_feedback.Text;
                 bl.Userid   = Session["username"].ToString();
                 bl.Subject  = ddl_subject.SelectedValue;
                 bl.Specify  = txt_sub.Text;
                 rb          = dl.insert_feedback(bl);
                 if (rb.status == true)
                 {
                     Utilities.MessageBox_UpdatePanel_Redirect(udp, "We Recieve Your FeedBack This Is Valuable For Us, We Will Response You Soon Thank You.", "../user/user_detail.aspx");
                 }
                 else
                 {
                     Utilities.MessageBox_UpdatePanel(udp, "Your Feed Back Is Not Registered");
                 }
             }
             else
             {
                 Utilities.MessageBox_UpdatePanel(udp, "Please Enter Right Security code");
             }
         }
     }
 }
Beispiel #2
0
    public ReturnClass.ReturnBool insert_feedback(bl_feedback bl)
    {
        ReturnClass.ReturnBool rb = new ReturnClass.ReturnBool();
        db_maria_connection    db = new db_maria_connection();
        string str = "insert Into feedback(user_id,feedback,subject,specify) VALUES (@userid,@feedback,@subject,@specify)";

        MySqlParameter[] pm = new MySqlParameter[] {
            new MySqlParameter("userid", bl.Userid),
            new MySqlParameter("feedback", bl.Feedback),
            new MySqlParameter("subject", bl.Subject),
            new MySqlParameter("specify", bl.Specify)
        };
        rb = db.executeInsertQuery(str, pm);
        return(rb);
    }