⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customersharemgr.java

📁 oa 源码
💻 JAVA
字号:
package com.redmoon.oa.visual.module.sales;import java.util.Calendar;import cn.js.fan.db.Conn;import cn.js.fan.util.*;import java.sql.*;import com.redmoon.oa.pvg.Privilege;import cn.js.fan.util.ErrMsgException;import javax.servlet.http.*;import org.apache.log4j.Logger;import cn.js.fan.web.Global;public class CustomerShareMgr {  Logger logger = Logger.getLogger( CustomerShareMgr.class.getName() );  public CustomerShareMgr() {  }  public boolean modify(HttpServletRequest request) throws ErrMsgException {      Privilege privilege = new Privilege();                    boolean re = true;      String errmsg = "";      int id = ParamUtil.getInt(request, "id");      int customerId = ParamUtil.getInt(request, "customerId");      String sharePerson = ParamUtil.get(request, "sharePerson");      if (!errmsg.equals(""))          throw new ErrMsgException(errmsg);      CustomerShareDb cd =  getCustomerShareDb(id);      cd.setCustomerId(customerId);      cd.setSharePerson(sharePerson);      re = cd.save();      return re;  }  public CustomerShareDb getCustomerShareDb(int id) {      CustomerShareDb addr = new CustomerShareDb();      return addr.getCustomerShareDb(id);  }  public boolean create(HttpServletRequest request) throws ErrMsgException {      Privilege privilege = new Privilege();                  boolean re = true;      String errmsg = "";      int customerId = ParamUtil.getInt(request, "customerId");      String sharePerson = ParamUtil.get(request, "sharePerson");      if (!errmsg.equals(""))          throw new ErrMsgException(errmsg);      CustomerShareDb cd = new CustomerShareDb();      cd.setCustomerId(customerId);      if (cd.isExist(sharePerson, customerId))          throw new ErrMsgException("该共享人员已存在!");      else {          cd.setSharePerson(sharePerson);          re = cd.create();      }      return re;  }  public boolean del(HttpServletRequest request) throws ErrMsgException {      int id = ParamUtil.getInt(request, "delId");      CustomerShareDb cd = getCustomerShareDb(id);      if (cd==null || !cd.isLoaded())          throw new ErrMsgException("该项已不存在!");      Privilege privilege = new Privilege();                  return cd.del();  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -