📄 acttopsf03linkman.java~1~
字号:
package com.tops.crm.action;
import com.tops.j2eebase.web.TopsBaseDispatchAction;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.tops.j2eebase.exception.*;
import com.tops.crm.model.*;
import com.tops.crm.control.*;
import com.tops.j2eebase.model.*;
public class ActTopsF03Linkman extends TopsBaseDispatchAction {
public ActionForward add(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
String userName = getLoginUserName(request);
ActfrmTopsF03Linkman obj = new ActfrmTopsF03Linkman();
obj.setClientUuid(request.getParameter("clientUuid"));
if (obj.getClientUuid() != null) {
request.setAttribute("clientName",
com.tops.crm.control.EMTopsF01Client.
getInstance().
load(obj.getClientUuid()).getClientName());
}
obj.setProviderUuid(request.getParameter("providerUuid"));
if (obj.getProviderUuid() != null) {
request.setAttribute("providerName",
com.tops.crm.control.EMTopsF02Provider.
getInstance().
load(obj.getProviderUuid()).getProriderName());
}
obj.setZzCreateDate(new java.util.Date());
obj.setZzCreateUser(userName);
obj.setMethod("addresult");
request.setAttribute("actfrmTopsF03Linkman", obj);
return mapping.findForward("actfrmTopsF03Linkman.editor");
}
public ActionForward init(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
EMTopsF03Linkman em = EMTopsF03Linkman.getInstance();
request.getSession().removeAttribute("ActfrmTopsF03Linkman_condition");
String currentPage = request.getParameter("page");
if (currentPage == null) {
currentPage = String.valueOf(1);
}
String pageUrl = request.getContextPath() +
"/actTopsF03Linkman.do?method=init";
DataPage result = em.findAllByPage(pageUrl,
Integer.parseInt(currentPage));
request.setAttribute("objlist", result.getPageData());
request.setAttribute("pageStr", result.getPageStr());
return mapping.findForward("actfrmTopsF03Linkman.list");
}
public ActionForward search(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
EMTopsF03Linkman em = EMTopsF03Linkman.getInstance();
ActfrmTopsF03Linkman searchCondition = null;
//通过查询按钮递交
if (request.getMethod().toUpperCase().equals("POST")) {
searchCondition = (ActfrmTopsF03Linkman) form;
request.getSession().setAttribute(
"ActfrmTopsF03Linkman_condition",
searchCondition);
} else { //通过分页链接递交
searchCondition = (ActfrmTopsF03Linkman) request.
getSession().getAttribute(
"ActfrmTopsF03Linkman_condition");
request.setAttribute(
"actfrmTopsF03Linkman",
searchCondition);
}
String currentPage = request.getParameter("page");
if (currentPage == null) {
currentPage = String.valueOf(1);
}
String pageUrl = request.getContextPath() +
"/actTopsF03Linkman.do?method=search";
DataPage result = em.findPageByCondition(searchCondition, pageUrl,
Integer.parseInt(currentPage));
request.setAttribute("objlist", result.getPageData());
request.setAttribute("pageStr", result.getPageStr());
return mapping.findForward("actfrmTopsF03Linkman.list");
}
public ActionForward addresult(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
ActfrmTopsF03Linkman one = (ActfrmTopsF03Linkman) form;
EMTopsF03Linkman em = EMTopsF03Linkman.getInstance();
em.add(one);
String currentPage = request.getParameter("page");
if (currentPage == null) {
currentPage = String.valueOf(1);
}
String pageUrl = request.getContextPath() +
"/actTopsF03Linkman.do?method=init";
DataPage result = em.findAllByPage(pageUrl,
Integer.parseInt(currentPage));
request.setAttribute("objlist", result.getPageData());
request.setAttribute("pageStr", result.getPageStr());
return mapping.findForward("actfrmTopsF03Linkman.list");
}
public ActionForward modify(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
EMTopsF03Linkman em = EMTopsF03Linkman.getInstance();
String id = request.getParameter("id");
ActfrmTopsF03Linkman obj = em.load(id);
if (obj.getClientUuid() != null) {
request.setAttribute("clientName",
com.tops.crm.control.EMTopsF01Client.
getInstance().
load(obj.getClientUuid()).getClientName());
}
if (obj.getProviderUuid() != null) {
request.setAttribute("providerName",
com.tops.crm.control.EMTopsF02Provider.
getInstance().
load(obj.getProviderUuid()).getProriderName());
}
obj.setMethod("modifyresult");
request.setAttribute("actfrmTopsF03Linkman", obj);
return mapping.findForward("actfrmTopsF03Linkman.editor");
}
public ActionForward modifyresult(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
ActfrmTopsF03Linkman one = (ActfrmTopsF03Linkman) form;
EMTopsF03Linkman em = EMTopsF03Linkman.getInstance();
em.modify(one);
String currentPage = request.getParameter("page");
if (currentPage == null) {
currentPage = String.valueOf(1);
}
String pageUrl = request.getContextPath() +
"/actTopsF03Linkman.do?method=init";
DataPage result = em.findAllByPage(pageUrl,
Integer.parseInt(currentPage));
request.setAttribute("objlist", result.getPageData());
request.setAttribute("pageStr", result.getPageStr());
return mapping.findForward("actfrmTopsF03Linkman.list");
}
public ActionForward delete(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
BugReportBaseException {
//编写你的代码
EMTopsF03Linkman em = EMTopsF03Linkman.getInstance();
String[] ids = request.getParameterValues(com.tops.j2eebase.web.taglib.
TagSelectCheckBox.
dufaultCheckBoxName);
em.deleteList(ids);
String currentPage = request.getParameter("page");
if (currentPage == null) {
currentPage = String.valueOf(1);
}
String pageUrl = request.getContextPath() +
"/actTopsF03Linkman.do?method=init";
DataPage result = em.findAllByPage(pageUrl,
Integer.parseInt(currentPage));
request.setAttribute("objlist", result.getPageData());
request.setAttribute("pageStr", result.getPageStr());
return mapping.findForward("actfrmTopsF03Linkman.list");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -