void Feedback() { BLL.dt_feedback bll = new BLL.dt_feedback(); string title = request["title"]; string content = request["content"]; try { Model.dt_feedback item = new Model.dt_feedback { Title = title, Content = content, AddTime = DateTime.Now, IsDel = 0, ManagerId = 2 }; int re = bll.Add(item); if (re > 0) { this.res = JsonHelper2.GetCommonObj(0, "反馈成功"); } else { this.res = JsonHelper2.GetCommonObj(1, "反馈失败"); } }catch (Exception ex) { Log.Error(ex.Message); this.res = JsonHelper2.GetCommonObj(1, "系统异常"); } }
protected void btnSave_Click(object sender, EventArgs e) { string name = txtUserName.Value; string sex = "男"; if (radio2.Checked == true) { sex = "女"; } string mobile = txtPhone.Value; string telNuM = txtTel.Value; string EmailValue = txtEmail.Value; string NoteBookContent = txtContent.Value; string zhuzhi = Request.Form["chkZhuZhi"]; string DiDian = Request.Form["dpProvince"] + "|"; DiDian += Request.Form["dpCity"] + "|"; DiDian += txtWrite.Value; string ClassName = Request.Form["chkCatagory"]; string GongNeng = Request.Form["chkFunction"]; string Money = txtOwer.Value; string MianJi = txtOwerTel.Value; Model.dt_feedback Model = new Model.dt_feedback(); Model.UserID = WEBUserCurrent.UserID; Model.user_name = name; Model.user_qq = sex; Model.user_tel = mobile; Model.title = telNuM; Model.user_email = EmailValue; Model.content = NoteBookContent; Model.zhuzhi = zhuzhi; //if (Model.zhuzhi == "介紹房屋出售") //{ // BLL.users User = new BLL.users(); // User.UpPoint(WEBUserCurrent.UserID, 5000); //} Model.user_Address = DiDian; Model.user_Class = ClassName; Model.user_Function = GongNeng; Model.user_Money = Money; Model.user_MianJi = MianJi; BLL.dt_feedback bll = new BLL.dt_feedback(); bll.Add(Model); this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('留言添加成功');window.location.href='index.aspx'</script>"); }