📄 calendarplansmanager.java
字号:
package com.gforce.gfoa;
/**
* <p>Title: 吉力科技办公自动化系统</p>
* <p>Description: 吉力科技办公自动化系统</p>
* <p>Copyright: 版权所有 2003 (c) 西安吉力科技发展有限公司 Copyright (c) 2003 GForce Sceince & Technology</p>
* <p>Company: 西安吉力科技发展有限公司 (GForce Sceince & Technology)</p>
* 日程计划管理类
* @author 王江涛
* @version 1.0
*/
import com.gforce.currency.database.*;
import com.gforce.currency.*;
import java.util.*;
public class CalendarPlansManager
extends RecordManager
{
public CalendarPlansManager()
{
}
protected final static String TableName = "CalendarPlans"; //定义声明本类操作表名称
protected final static String IDFieldName = "ID"; //定义声明主键或者可以确定唯一记录的字段名称为“ID”,必须为自增整型
protected final static String[] NumericFieldsName = {"UserID", "ImportLevel",
"RemindInterval","IsFinished"}; //声明数值型字段名称
protected final static String[] DatetimeFieldsName ={"AddTime","PlanBeginDate","PlanEndDate","RealBeginDate","RealEndDate"}; //声明日期时间型字段名称
protected final static String[] StringFieldsName = {"PlanTitle"}; //声明字符型字段名称
protected final static String[] TextFieldsName = {"PlanContent","Remark"}; //声明大字符串型字段名称
/** 根据字段名称获取插入数据时表单元素名称
* @param strFieldName 字段名称
* @return 表单素名称
*/
protected String InsertParament(String strFieldName)
{
return "" + strFieldName + ""; //可以根据需要加前缀、后缀
}
/**
* 根据字段名称获取修改数据时表单元素名称
* @param strFieldName 字段名称
* @return 表单素名称
*/
protected String UpdateParament(String strFieldName)
{
return "" + strFieldName + ""; //可以根据需要加前缀、后缀
}
/**
* 获取本类操作表名称
* @return 表名称
*/
public String getTableName()
{ //获取本类操作表名称
return TableName;
}
protected String getIDFieldName()
{ //获取主键或者可以确定唯一记录的字段名称
return IDFieldName;
}
protected String[] getNumericFieldsName()
{ //获取数值型字段名称
return NumericFieldsName;
}
protected String[] getStringFieldsName()
{ //获取字符型字段名称
return StringFieldsName;
}
protected String[] getDatetimeFieldsName()
{ //获取日期时间型字段名称
return DatetimeFieldsName;
}
protected String[] getTextFieldsName() { //获取大字符串型字段名称
return TextFieldsName;
}
/**
* 获取指定用户的日程计划
* @param strUserID 指定的用户ID
* @return 指定用户的日程计划记录集
*/
public static Vector getAllRecord(int iUserID)
{
Vector vt = SQLManager.GetResultSet("SELECT * FROM " + TableName +
" WHERE UserID = " + iUserID);
return vt;
}
/**
* 获取指定的记录
* @param intRecordID 指定记录ID
* @param intUserID
* @return 指定记录的ID
*/
public static Vector getRecordByID(int intRecordID,int intUserID)
{
Vector vt = SQLManager.GetResultSet("SELECT * FROM " + TableName +
" WHERE ID = " + intRecordID + "");
return vt;
}
/**
* 获取指定时间段内的日程计划记录(未完成的计划)
* @param iUserID 用户ID
* @return 记录集
*/
public static Vector getRecordByDate(int iUserID)
{
String strDate = StringNew.GetDateString(new Date(),"yyyy-MM-dd");
Vector vt = SQLManager.GetResultSet("SELECT * FROM " + TableName +
" WHERE UserID = " + iUserID + " and ('"+ strDate +" 00:00:00' >= PlanBeginDate) and ('"+ strDate +" 23:59:59' <= PlanEndDate) and( IsFinished = 0)" );
return vt;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -