protected void btnSubmit_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(chkPointValue.Value) || chkPointValue.Value == "否") { if (chkPoint.Checked == true) { //model.point = point + 5000; BLL.users BLLUser = new BLL.users(); if (!string.IsNullOrEmpty(lblEmail.Text)) { if (BLLUser.ExistsEmail(lblEmail.Text)) { int UID = BLLUser.GetIDByExistsEmail(lblEmail.Text); BLLUser.UpPoint(UID, 5000); BLL.point_log point = new BLL.point_log(); Model.point_log model = new Model.point_log(); model.user_id = UID; model.user_name = ""; model.value = 5000; model.remark = "介紹房屋出售"; model.add_time = DateTime.Now; model.type = 1;//2標誌點數是減少 int m = point.Add(model); } } } } else if (chkPointValue.Value == "是") { if (chkPoint.Checked == false) { BLL.users BLLUser = new BLL.users(); if (!string.IsNullOrEmpty(lblEmail.Text)) { if (BLLUser.ExistsEmail(lblEmail.Text)) { int UID = BLLUser.GetIDByExistsEmail(lblEmail.Text); BLLUser.UpJianPoint(UID, 5000); BLL.point_log point = new BLL.point_log(); Model.point_log model = new Model.point_log(); model.user_id = UID; model.user_name = ""; model.value = 5000; model.remark = "取消介紹房屋出售點數"; model.type = 2;//2標誌點數是減少 model.add_time = DateTime.Now; int m = point.Add(model); } } } } string replayContent = txtReContent.Text.Trim(); Model.dt_feedback feedback = new Model.dt_feedback(); if (chkPoint.Checked == true) { feedback.user_Function = "是"; } else { feedback.user_Function = "否"; } feedback.reply_content = replayContent; feedback.reply_time = DateTime.Now; feedback.id = int.Parse(Request.QueryString["id"].ToString()); if (bllNot.Update(feedback)) { setEmail(); Response.Redirect("admin/NoteBook.aspx"); JscriptMsg("留言回覆成功!", "admin/NoteBook.aspx.aspx", "Success"); } }