예제 #1
0
 @Override
 public int deleteSharedItems(String leadId) {
   String query = "delete from tbl_crm_share where leadId = ?; ";
   try {
     preparedStatement = DBUtility.connection.prepareStatement(query);
     preparedStatement.setString(1, leadId);
   } catch (SQLException e) {
     ZLog.err("VNC CRM for Zimbra", "Error in deleteSharedItems in LeadHelper", e);
   }
   operationStatus = dbu.delete(preparedStatement);
   return operationStatus;
 }
 @Override
 public int delete(AbstractBean ab) {
   CompanyBean companyBean = (CompanyBean) ab;
   String query = "delete from tbl_crm_company where companyId = ?;";
   try {
     preparedStatement = DBUtility.connection.prepareStatement(query);
     preparedStatement.setInt(1, companyBean.getCompanyId());
   } catch (SQLException e) {
     ZLog.err("VNC CRM for Zimbra", "Error in delete operation in CompanyHelper", e);
   }
   operationStatus = dbu.delete(preparedStatement);
   return operationStatus;
 }
예제 #3
0
 @Override
 public int deleteTask(String array, String leadId) {
   String query = "delete from tbl_crm_lead_task where leadId = ? and taskId IN (" + array + "); ";
   try {
     preparedStatement = DBUtility.connection.prepareStatement(query);
     preparedStatement.setString(1, leadId);
   } catch (SQLException e) {
     ZLog.err("VNC CRM for Zimbra", "Error in deleteTask in LeadHelper", e);
   }
   operationStatus = dbu.delete(preparedStatement);
   if (operationStatus == 1) {
     return Notification.task_detached;
   } else {
     return Notification.task_not_detached;
   }
 }
예제 #4
0
 @Override
 public int delete(AbstractBean ab) {
   LeadBean leadBean = (LeadBean) ab;
   String query = "delete from tbl_crm_lead where leadId = ?;";
   try {
     preparedStatement = DBUtility.connection.prepareStatement(query);
     preparedStatement.setInt(1, leadBean.getLeadId());
   } catch (SQLException e) {
     ZLog.err("VNC CRM for Zimbra", "Error in delete operation in LeadHelper", e);
   }
   operationStatus = dbu.delete(preparedStatement);
   if (operationStatus == 1) {
     return Notification.record_delete;
   } else {
     return Notification.record_not_delete;
   }
 }
 @Override
 public int deleteByIds(String arrayIds, String user) {
   String query =
       "update tbl_crm_company set status = ?, writeBy = ?, writeDate = ? where companyId IN ("
           + arrayIds
           + ");";
   try {
     preparedStatement = DBUtility.connection.prepareStatement(query);
     preparedStatement.setBoolean(1, false);
     preparedStatement.setString(2, user);
     preparedStatement.setTimestamp(3, new Timestamp(System.currentTimeMillis()));
   } catch (SQLException e) {
     ZLog.err("VNC CRM for Zimbra", "Error in deleteByIds in CompanyHelper", e);
   }
   operationStatus = dbu.delete(preparedStatement);
   return operationStatus;
 }