public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "AgentAudit"); if (!loginUser.Pass)//权限验证 { return; } AgentBLL bll = new AgentBLL(context, loginUser); if (context.Request["action"] == "gridLoad") { //加载DataGrid int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string agentId = context.Request["agentId"]; string agentName = context.Request["agentName"]; bll.LoadGrid(page, rows, agentName, agentId, "", ((int)AuditStauts.NotAudit).ToString()); } else if (context.Request["action"] == "areaListLoad") { //加载区域列表 Combobox com = new Combobox(context, loginUser); com.AreaCombobox(); } else if (context.Request["action"] == "auditListLoad") { //加载审核状态列表 Combobox com = new Combobox(context, loginUser); com.AuditCombobox(); } else if (context.Request["action"] == "load") { //加载信息 bll.Load(context.Request["agentId"]); } else if (context.Request["action"] == "audit") { //审核 TBAgent agent = new TBAgent(); agent.agentId = context.Request["agentId"]; agent.auditStatus = context.Request["auditStatus"]; agent.status = "0"; if (agent.auditStatus == ((int)AuditStauts.AuditSucces).ToString()) { agent.status = "1"; } agent.remark = context.Request["remark"]; bll.Audit(agent); } } catch (Exception e) { Message.error(context, e.Message); } }
public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "AgentAdd"); if (!loginUser.Pass)//权限验证 { return; } AgentBLL bll = new AgentBLL(context, loginUser); if (context.Request["action"] == "gridLoad") { //加载DataGrid int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string agentName = context.Request["agentName"]; string agentId = context.Request["agentId"]; string auditStatus = context.Request["auditStatus"]; bll.LoadGrid(page, rows, agentName, agentId, "", auditStatus); } else if (context.Request["action"] == "areaListLoad") { //加载区域列表 Combobox com = new Combobox(context, loginUser); com.AreaCombobox(); } else if (context.Request["action"] == "auditListLoad") { //加载审核状态列表 Combobox com = new Combobox(context, loginUser); com.AuditCombobox(); } else if (context.Request["action"] == "load") { //加载信息 bll.Load(context.Request["agentId"]); } else if (context.Request["action"] == "add") { //增加 TBAgent agent = new TBAgent(); TSAgentUser tsAgentUser = new TSAgentUser(); agent.agentId = context.Request["agentId"]; agent.agentName = context.Request["agentName"]; agent.rebate = double.Parse(context.Request["rebate"]); agent.warnValue = double.Parse(context.Request["warnValue"]); agent.contact = context.Request["contact"]; agent.telephone = context.Request["telephone"]; agent.areaId = context.Request["areaId"]; agent.address = context.Request["address"]; agent.IDNumber = context.Request["IDNumber"]; agent.bankCardId = context.Request["bankCardId"]; agent.bankName = context.Request["bankName"]; agent.status = "0"; agent.fixedLine = context.Request["fixedLine"]; agent.remark = context.Request["remark"]; tsAgentUser.roleId = "001"; tsAgentUser.userCode = context.Request["agentUserCode"]; tsAgentUser.userPwd = tsAgentUser.userCode; bll.Add(agent, tsAgentUser); } else if (context.Request["action"] == "edit") { //修改 TBAgent agent = new TBAgent(); agent.agentId = context.Request["agentId"]; agent.agentName = context.Request["agentName"]; agent.rebate = double.Parse(context.Request["rebate"]); agent.contact = context.Request["contact"]; agent.telephone = context.Request["telephone"]; agent.areaId = context.Request["areaId"]; agent.address = context.Request["address"]; agent.IDNumber = context.Request["IDNumber"]; agent.bankCardId = context.Request["bankCardId"]; agent.bankName = context.Request["bankName"]; agent.status = context.Request["status"]; agent.warnValue = double.Parse(context.Request["warnValue"]); agent.auditStatus = "0"; agent.fixedLine = context.Request["fixedLine"]; agent.remark = context.Request["remark"]; bll.Edit(agent); } else if (context.Request["action"] == "delete") { //删除 string agentId = context.Request["agentId"]; bll.Delete(agentId); } } catch (Exception e) { Message.error(context, e.Message); } }
public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "SiteAdd"); if (!loginUser.Pass)//权限验证 { return; } SiteBLL bll = new SiteBLL(context, loginUser); if (context.Request["action"] == "gridLoad") { //加载DataGrid int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string siteId = context.Request["siteId"]; string siteName = context.Request["siteName"]; string auditStatus = context.Request["auditStatus"]; bll.LoadGrid(page, rows, siteId, siteName, auditStatus); } else if (context.Request["action"] == "agentListLoad") { //加载代理商列表 Combobox com = new Combobox(context, loginUser); com.AgentCombobox(); } else if (context.Request["action"] == "auditListLoad") { //加载审核状态列表 Combobox com = new Combobox(context, loginUser); com.AuditCombobox(); } else if (context.Request["action"] == "load") { //加载信息 bll.Load(context.Request["siteId"]); } else if (context.Request["action"] == "add") { //增加 TBSite tbSite = new TBSite(); tbSite.siteId = context.Request["siteId"]; tbSite.siteName = context.Request["siteName"]; tbSite.agentId = context.Request["agentId"]; tbSite.contact = context.Request["contact"]; tbSite.pointRule = int.Parse(context.Request["pointRule"]); tbSite.address = context.Request["address"]; tbSite.telephone = context.Request["telephone"]; tbSite.status = "0"; tbSite.specialArea = double.Parse(context.Request["specialArea"]); tbSite.auditStatus = ((int)AuditStauts.NotAudit).ToString(); tbSite.remark = context.Request["remark"]; bll.Add(tbSite); } else if (context.Request["action"] == "edit") { //修改 TBSite tbSite = new TBSite(); tbSite.siteId = context.Request["siteId"]; tbSite.siteName = context.Request["siteName"]; tbSite.agentId = context.Request["agentId"]; tbSite.contact = context.Request["contact"]; tbSite.pointRule = int.Parse(context.Request["pointRule"]); tbSite.address = context.Request["address"]; tbSite.telephone = context.Request["telephone"]; tbSite.status = context.Request["status"]; tbSite.auditStatus = "0"; tbSite.specialArea = double.Parse(context.Request["specialArea"]); tbSite.remark = context.Request["remark"]; bll.Edit(tbSite); } else if (context.Request["action"] == "audit") { //审核 TBSite tbSite = new TBSite(); tbSite.siteId = context.Request["siteId"]; tbSite.auditStatus = context.Request["auditStatus"]; if (tbSite.auditStatus == ((int)AuditStauts.AuditSucces).ToString()) { tbSite.status = "1"; } else { tbSite.status = "0"; } tbSite.remark = context.Request["remark"]; bll.Audit(tbSite); } else if (context.Request["action"] == "delete") { //删除 string siteId = context.Request["siteId"]; bll.Delete(siteId); } } catch (Exception e) { Message.error(context, e.Message); } }
public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "AgentOam"); if (!loginUser.Pass)//权限验证 { return; } AgentBLL bll = new AgentBLL(context, loginUser); if (context.Request["action"] == "gridLoad") { //加载DataGrid int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string agentId = context.Request["agentId"]; string agentName = context.Request["agentName"]; bll.LoadGrid(page, rows, agentName, agentId, "", ((int)AuditStauts.AuditSucces).ToString()); } else if (context.Request["action"] == "areaListLoad") { //加载区域列表 Combobox com = new Combobox(context, loginUser); com.AreaCombobox(); } else if (context.Request["action"] == "auditListLoad") { //加载审核状态列表 Combobox com = new Combobox(context, loginUser); com.AuditCombobox(); } else if (context.Request["action"] == "load") { //加载信息 bll.Load(context.Request["agentId"]); } else if (context.Request["action"] == "edit") { //修改 TBAgent agent = new TBAgent(); agent.agentId = context.Request["agentId"]; agent.agentName = context.Request["agentName"]; agent.rebate = double.Parse(context.Request["rebate"]); agent.contact = context.Request["contact"]; agent.telephone = context.Request["telephone"]; agent.areaId = context.Request["areaId"]; agent.address = context.Request["address"]; agent.IDNumber = context.Request["IDNumber"]; agent.bankCardId = context.Request["bankCardId"]; agent.bankName = context.Request["bankName"]; agent.status = context.Request["status"]; agent.auditStatus = ((int)AuditStauts.AuditSucces).ToString(); agent.fixedLine = context.Request["fixedLine"]; agent.remark = context.Request["remark"]; agent.warnValue = double.Parse(context.Request["warnValue"]); bll.Edit(agent); } //密码重置 if (context.Request["action"] == "pwdReset") { string staffId = context.Request["agentId"];//员工编号 bll.PawReset(staffId, "0"); return; } } catch (Exception e) { Message.error(context, e.Message); } }