unit ClassInput;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, DBCtrls, DBTables, Db, Grids, Wwdbigrd, Wwdbgrid, wwTrDBGrid,
Mask, wwdbdatetimepicker, wwdblook,wwdbedit;
Type
TClassInput=class
private
// qry_prim:Tquery;
FTbName:string
CForm:Tform //当前窗体
DBName:string;
state:string;
PrimaryKeyChange:boolean;
published
Function GetTbname():string;
procedure SetTbName(TbNam:string);
property TbName : string read GetTbName write SetTbName;
property SetCForm : Tform read CForm write CForm;
property SetDBName : string read DBName write DBName;
property SetState: String read state write State;
property SetPrimaryKeyChange:boolean read PrimaryKeyChange write PrimaryKeyChange;
Public
Constructor create(Form:TForm;dataBaseName:string;STbName:string);
destructor Destroy();Override
function CheckNull(TitleText,InputBoxName:string):boolean
//空值校验
function CheckPrimaryKey(KeyName:string;KeyValue:string):boolean;overload;//主键校验验
function CheckPrimaryKey(KeyName,KeyValue,KeyName2,KeyValue2:string):boolean;overload;
function CheckPrimaryKey(KeyName,KeyValue,KeyName2,KeyValue2,
KeyName3,KeyValue3:string):boolean;overload;
function CheckDigit(sender: Tobject
Width, dec: integer;
var key1: char): boolean;//校验输入的数字
function CalcFieldName(FTable,FieldName,FieldValue,FindField:string):string;//为计算字段赋值
function DeptNam(deptNum:string): string;
function EmpNam(EmpNum:string) : string;
function UserCodeToEmpNam(UserCode:string): string;
function MaxValue(FieldName:string):string;
function CreateID(BeginPos:Integer =1;StrID:string='';TieleText:string =''):string;
procedure GetUsedItem(qry_Item:Tquery;TableName:string);//取得可用的值ISUSE=1
procedure Del(qry_del:Tquery)
overload;
procedure Del(TBL_DEL:TTable)
overload;
procedure MyMessage(S:string)
//对话框;
end;