protected void UpdateFeedback(object sender, EventArgs e) { Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new DistributionManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); string handlers = DropDownList_Distribution.SelectedItem.Text; Model.Feedback feedback = new Model.Feedback(); BLL.FeedbackManager Fmanager = new FeedbackManager(); feedback.feedbackID = Convert.ToInt32(Labeltest.Text.Trim()); feedback.handler = handlers; string Str1 = "handler='" + handlers + "'"; string Str2 = "feedbackID='" + Labeltest.Text.Trim() + "'"; bool bo2 = Fmanager.UpdateHandler(Str1, Str2); if (bo2 == true) { Response.Write("<script language=javascript>alert('修改成功!')</script>"); BindY(); BindN(); } }
protected void GetLoginName() { BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["NadminID"].ToString()); LabelUser.Text = admin1.adminName; }
protected void Btn_Solve_Click(object sender, EventArgs e) { string state = "1"; string idList = GetSelIDList(); if (idList.Trim().Length == 0) { return; } BLL.DistributionManager manager = new BLL.DistributionManager(); manager.UpdateList(state, idList); Response.Write("<script language=javascript>alert('标记成功!')</script>"); NewBind(); HisBind(); Model.Feedback feedback = new Model.Feedback(); BLL.FeedbackManager Fmanager = new FeedbackManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["GadminID"].ToString()); int ID = Convert.ToInt32(admin1.adminID); string Str1 = "solutionState='" + state + "'"; string Str2 = "adminID='" + ID + "' and state = '" + state + "'"; Fmanager.UpdateSolution(Str1, Str2); }
protected void BntReply_Click(object sender, EventArgs e) { Model.Reply reply = new Model.Reply(); BLL.ReplyManager replyManager = new ReplyManager(); Model.Reply reply1 = new Model.Reply(); BLL.ReplyManager replyManager1 = new ReplyManager(); string str = "replyID='" + Labeltest.Text + "'"; string id = replyManager1.GetUserID(str); string str1 = "replyID='" + Labeltest.Text + "'"; string replyFB = replyManager1.GetFBID(str); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); int s = Convert.ToInt32(admin1.adminID); reply.feedbackID = Convert.ToInt32(replyFB); reply.text = txtReply.Text; reply.replierID = s; reply.receiverID = Convert.ToInt32(id); bool bo = replyManager.Add(reply); if (bo == true) { Response.Write("<script language=javascript>alert('回复成功!')</script>"); } else { Response.Write("<script language=javascript>alert('回复失败!请重试')"); } }
protected void Btn_Distribution_Click(object sender, EventArgs e) { Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new DistributionManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); int s = Convert.ToInt32(admin1.adminID); distribution.feedbackID = Convert.ToInt32(Labeltest.Text); distribution.description = txtDistribution.Text.Trim(); distribution.adminID = Convert.ToInt32(DropDownList_Distribution.SelectedValue.ToString()); distribution.assignerID = s; distribution.state = "待处理"; bool bo = manager.Add(distribution); if (bo == true) { Response.Write("<script language=javascript>alert('分配成功!')</script>"); txtDistribution.Text = ""; DropDownList_Distribution.SelectedIndex = 0; UpdateFeedback(sender, e); BindY(); BindN(); } else { Response.Write("<script language=javascript>alert('分配失败!请重试')"); } }
protected void BntReply_Click(object sender, EventArgs e) { Model.Reply reply = new Model.Reply(); BLL.ReplyManager replyManager = new ReplyManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); int s = Convert.ToInt32(admin1.adminID); reply.feedbackID = Convert.ToInt32(Labeltest.Text); reply.text = txtReply.Text; reply.replierID = s; reply.remark = "1"; reply.receiverID = Convert.ToInt32(LabelName.Text.Trim()); bool bo = replyManager.Add(reply); if (bo == true) { Response.Write("<script language=javascript>alert('回复成功!')</script>"); txtReply.Text = ""; } else { Response.Write("<script language=javascript>alert('回复失败!请重试')"); } }
protected void GetMessage() { BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["NadminID"].ToString()); LabelUser.Text = admin1.adminName; txtID.Text = Convert.ToString(admin1.adminID); txtName.Text = admin1.adminName; txtDepartment.Text = admin1.department; txtJob.Text = admin1.job; }
protected void NewBind() { Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new BLL.DistributionManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["GadminID"].ToString()); int ID = Convert.ToInt32(admin1.adminID); string Str = " adminID='" + ID + "'and state != '" + "1" + "'"; GridView1.DataSource = manager.GetList(Str); GridView1.DataBind(); }
protected void ReplyNumber() { Model.Reply reply1 = new Model.Reply(); BLL.ReplyManager replyManager1 = new ReplyManager(); BLL.AdminManager adminManager = new BLL.AdminManager(); Model.Admin admin = adminManager.GetModel1(Session["SadminID"].ToString()); int s = Convert.ToInt32(admin.adminID); string str = "0"; int id = s; replyManager1.UpdateState(str, s); LabelApply.Text = "0"; LabelApply.Visible = false; }
protected void Bind() { BLL.AdminManager adminManager = new BLL.AdminManager(); Model.Admin admin = adminManager.GetModel1(Session["SadminID"].ToString()); int ID = Convert.ToInt32(admin.adminID); Model.Reply reply = new Model.Reply(); BLL.ReplyManager replyManager = new BLL.ReplyManager(); string Str = " receiverID='" + ID + "'"; GridView1.DataSource = replyManager.GetFBList(Str); GridView1.DataBind(); }
protected void ReplyNumber() { Model.Reply reply = new Model.Reply(); BLL.ReplyManager replyManager = new ReplyManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); int s = Convert.ToInt32(admin1.adminID); string str = "remark='" + "1" + "'and receiverID='" + s + "'"; int number = replyManager.GetRecordCount(str); if (number > 0) { LabelMessage.Visible = true; LabelMessage.Text = Convert.ToString(number); } }
protected void btn_Dealwith_Click(object sender, EventArgs e) { string solution = "1"; string idList = GetSelIDList(); if (idList.Trim().Length == 0) { return; } BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); string name = Convert.ToString(admin1.adminName); Model.Feedback feedback = new Model.Feedback(); BLL.FeedbackManager Fmanager = new FeedbackManager(); string Str1 = "solutionState='" + solution + "' , handler = '" + name + "'"; string Str2 = "feedbackID in(" + idList + ")"; Fmanager.UpdateSolution(Str1, Str2); Response.Write("<script language=javascript>alert('已标记为已处理!')</script>"); BindY(); BindN(); }