1.VC++ MFCå¦ä½è·åCPU IDå硬ççåºåå·ï¼
2.çµèçå·¥ä½åç
3.急求pb考勤管理系统(pb+access)论文
VC++ MFCå¦ä½è·åCPU IDå硬ççåºåå·ï¼
// âè·å¾Intel CPU IDâæé®æ¶æ¯å¤çå½æ°
void CIntelCPUIDDlg::OnBtnCPUID()
{
unsigned long s1,s2;
unsigned char vendor_id[]="------------";//CPUæä¾åID
CString str1,str2,str3;
// 以ä¸ä¸ºè·å¾CPU IDçæ±ç¼è¯è¨æ令
_asm // å¾å°CPUæä¾åä¿¡æ¯
{
xor eax,eax // å°eaxæ¸ 0
cpuid // è·åCPUIDçæ令
mov dword ptr vendor_id,ebx
mov dword ptr vendor_id[+4],edx
mov dword ptr vendor_id[+8],ecx
}
str1.Format("%s",vendor_id);
_asm // å¾å°CPU IDçé«ä½
{
mov eax,h
xor edx,edx
cpuid
mov s2,eax
}
str2.Format("%X-",s2);
_asm // å¾å°CPU IDçä½ä½
{
mov eax,h
xor ecx,ecx
xor edx,edx
cpuid
mov s1,edx
mov s2,ecx
}
str3.Format("%X-%X\n",s1,s2);
str2=str2+str3;
m_editVendor.SetWindowText(str1);
m_editCPUID.SetWindowText(str2);
}
// GetHDSerial.cpp: implementation of the CGetHDSerial class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "GetHDSerial.h"
char m_buffer[];
WORD m_serial[];
DWORD m_OldInterruptAddress;
DWORDLONG m_IDTR;
// çå¾ ç¡¬ç空é²
static unsigned int WaitHardDiskIdle()
{
BYTE byTemp;
Waiting:
_asm
{
mov dx, 0x1f7
in al, dx
cmp al, 0x
jb Endwaiting
jmp Waiting
}
Endwaiting:
_asm
{
mov byTemp, al
}
return byTemp;
}
//ä¸ææå¡ç¨åº
void _declspec( naked )InterruptProcess(void)
{
int byTemp;
int i;
WORD temp;
//ä¿åå¯åå¨å¼
_asm
{
push eax
push ebx
push ecx
push edx
push esi
}
WaitHardDiskIdle();//çå¾ ç¡¬ç空é²ç¶æ
_asm
{
mov dx, 0x1f6
mov al, 0xa0
out dx, al
}
byTemp = WaitHardDiskIdle(); //è¥ç´æ¥å¨Ring3级æ§è¡çå¾ å½ä»¤ï¼ä¼è¿å ¥æ»å¾ªç¯
if ((byTemp&0x)!=0x)
{
_asm // æ¢å¤ä¸æç°åºå¹¶éåºä¸ææå¡ç¨åº
{
pop esi
pop edx
pop ecx
pop ebx
pop eax
iretd
}
}
_asm
{
mov dx, 0x1f6 //å½ä»¤ç«¯å£1f6,éæ©é©±å¨å¨0
mov al, 0xa0
out dx, al
inc dx
mov al, 0xec
out dx, al //åé读驱å¨å¨åæ°å½ä»¤
}
byTemp = WaitHardDiskIdle();
if ((byTemp&0x)!=0x)
{
_asm // æ¢å¤ä¸æç°åºå¹¶éåºä¸ææå¡ç¨åº
{
pop esi
pop edx
pop ecx
pop ebx
pop eax
iretd
}
}
//读å硬çæ§å¶å¨çå ¨é¨ä¿¡æ¯
for (i=0;i<;i++)
{
_asm
{
mov dx, 0x1f0
in ax, dx
mov temp, ax
}
m_serial[i] = temp;
}
_asm
{
pop esi
pop edx
pop ecx
pop ebx
pop eax
iretd
}
}
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CGetHDSerial::CGetHDSerial()
{
}
CGetHDSerial::~CGetHDSerial()
{
}
// 读å硬çåºåå·å½æ°
char* CGetHDSerial::GetHDSerial()
{
m_buffer[0]='\n';
// å¾å°å½åæä½ç³»ç»çæ¬
OSVERSIONINFO OSVersionInfo;
OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx( &OSVersionInfo);
if (OSVersionInfo.dwPlatformId != VER_PLATFORM_WIN_NT)
{
// Windows 9x/MEä¸è¯»å硬çåºåå·
WORD m_wWin9xHDSerial[];
Win9xReadHDSerial(m_wWin9xHDSerial);
strcpy (m_buffer, WORDToChar (m_wWin9xHDSerial, , ));
}
else
{
// Windows NT//XPä¸è¯»å硬çåºåå·
DWORD m_wWinNTHDSerial[];
// å¤ææ¯å¦æSCSI硬ç
if ( ! WinNTReadIDEHDSerial(m_wWinNTHDSerial))
WinNTReadSCSIHDSerial(m_wWinNTHDSerial);
strcpy (m_buffer, DWORDToChar (m_wWinNTHDSerial, , ));
}
return m_buffer;
}
// Windows9X/MEç³»ç»ä¸è¯»å硬çåºåå·
void _stdcall CGetHDSerial::Win9xReadHDSerial(WORD * buffer)
{
int i;
for(i=0;i<;i++)
buffer[i]=0;
_asm
{
push eax
//è·åä¿®æ¹çä¸æçä¸ææ述符ï¼ä¸æé¨ï¼å°å
sidt m_IDTR
mov eax,dword ptr [m_IDTR+h]
add eax,3*h+h
cli
//ä¿ååå çä¸æå ¥å£å°å
push ecx
mov ecx,dword ptr [eax]
mov cx,word ptr [eax-h]
mov dword ptr m_OldInterruptAddress,ecx
pop ecx
//设置修æ¹çä¸æå ¥å£å°å为æ°çä¸æå¤çç¨åºå ¥å£å°å
push ebx
lea ebx,InterruptProcess
mov word ptr [eax-h],bx
shr ebx,h
mov word ptr [eax+h],bx
pop ebx
//æ§è¡ä¸æï¼è½¬å°Ring 0ï¼ç±»ä¼¼CIHç æ¯åçï¼
int 3h
//æ¢å¤åå çä¸æå ¥å£å°å
push ecx
mov ecx,dword ptr m_OldInterruptAddress
mov word ptr [eax-h],cx
shr ecx,h
mov word ptr [eax+h],cx
pop ecx
sti
pop eax
}
for(i=0;i<;i++)
buffer[i]=m_serial[i];
}
// Windows 9x/MEç³»ç»ä¸ï¼å°åç±»åï¼WORDï¼ç硬çä¿¡æ¯è½¬æ¢ä¸ºå符类åï¼charï¼
char * CGetHDSerial::WORDToChar (WORD diskdata [], int firstIndex, int lastIndex)
{
static char string [];
int index = 0;
int position = 0;
// æç §é«åèå¨åï¼ä½åèå¨åç顺åºå°åæ°ç»diskdata ä¸å 容åå ¥å°å符串stringä¸
for (index = firstIndex; index <= lastIndex; index++)
{
// åå ¥åä¸çé«åè
string [position] = (char) (diskdata [index] / );
position++;
// åå ¥åä¸çä½åè
string [position] = (char) (diskdata [index] % );
position++;
}
// æ·»å å符串ç»ææ å¿
string [position] = '\0';
// å é¤å符串ä¸ç©ºæ ¼
for (index = position - 1; index > 0 && ' ' == string [index]; index--)
string [index] = '\0';
return string;
}
// Windows NT//XPç³»ç»ä¸ï¼å°ååç±»åï¼DWORDï¼ç硬çä¿¡æ¯è½¬æ¢ä¸ºå符类åï¼charï¼
char* CGetHDSerial::DWORDToChar (DWORD diskdata [], int firstIndex, int lastIndex)
{
static char string [];
int index = 0;
int position = 0;
// æç §é«åèå¨åï¼ä½åèå¨åç顺åºå°ååä¸çä½ååå ¥å°å符串stringä¸
for (index = firstIndex; index <= lastIndex; index++)
{
// åå ¥ä½åä¸çé«åè
string [position] = (char) (diskdata [index] / );
position++;
// åå ¥ä½åä¸çä½åè
string [position] = (char) (diskdata [index] % );
position++;
}
// æ·»å å符串ç»ææ å¿
string [position] = '\0';
// å é¤å符串ä¸ç©ºæ ¼
for (index = position - 1; index > 0 && ' ' == string [index]; index--)
string [index] = '\0';
return string;
}
// Windows NT//XPä¸è¯»åIDE硬çåºåå·
BOOL CGetHDSerial::WinNTReadIDEHDSerial(DWORD * buffer)
{
BYTE IdOutCmd [sizeof (SENDCMDOUTPARAMS) + IDENTIFY_BUFFER_SIZE - 1];
BOOL bFlag = FALSE;
int drive = 0;
char driveName [];
HANDLE hPhysicalDriveIOCTL = 0;
sprintf (driveName, "\\\\.\\PhysicalDrive%d", drive);
// Windows NT//XPä¸å建æ件éè¦ç®¡çåæé
hPhysicalDriveIOCTL = CreateFile (driveName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
if (hPhysicalDriveIOCTL != INVALID_HANDLE_VALUE)
{
GETVERSIONOUTPARAMS VersionParams;
DWORD cbBytesReturned = 0;
// å¾å°é©±å¨å¨çIOæ§å¶å¨çæ¬
memset ((void*) &VersionParams, 0, sizeof(VersionParams));
if(DeviceIoControl (hPhysicalDriveIOCTL, IOCTL_GET_VERSION,
NULL, 0, &VersionParams,
sizeof(VersionParams),
&cbBytesReturned, NULL) )
{
if (VersionParams.bIDEDeviceMap > 0)
{
BYTE bIDCmd = 0; // IDEæè ATAPIè¯å«å½ä»¤
SENDCMDINPARAMS scip;
// å¦æ驱å¨å¨æ¯å 驱ï¼éç¨å½ä»¤IDE_ATAPI_IDENTIFYï¼ command,
// å¦åéç¨å½ä»¤IDE_ATA_IDENTIFY读å驱å¨å¨ä¿¡æ¯
bIDCmd = (VersionParams.bIDEDeviceMap >> drive & 0x)?
IDE_ATAPI_IDENTIFY : IDE_ATA_IDENTIFY;
memset (&scip, 0, sizeof(scip));
memset (IdOutCmd, 0, sizeof(IdOutCmd));
// è·å驱å¨å¨ä¿¡æ¯
if (WinNTGetIDEHDInfo (hPhysicalDriveIOCTL,
&scip,
(PSENDCMDOUTPARAMS)&IdOutCmd,
(BYTE) bIDCmd,
(BYTE) drive,
&cbBytesReturned))
{
int m = 0;
USHORT *pIdSector = (USHORT *)
((PSENDCMDOUTPARAMS) IdOutCmd) -> bBuffer;
for (m = 0; m < ; m++)
buffer[m] = pIdSector [m];
bFlag = TRUE; // 读å硬çä¿¡æ¯æå
}
}
}
CloseHandle (hPhysicalDriveIOCTL); // å ³éå¥æ
}
return bFlag;
}
// WindowsNT//XPç³»ç»ä¸è¯»åSCSI硬çåºåå·
BOOL CGetHDSerial::WinNTReadSCSIHDSerial (DWORD * buffer)
{
buffer[0]='\n';
int controller = 0;
HANDLE hScsiDriveIOCTL = 0;
char driveName [];
sprintf (driveName, "\\\\.\\Scsi%d:", controller);
// Windows NT//XPä¸ä»»ä½æéé½å¯ä»¥è¿è¡
hScsiDriveIOCTL = CreateFile (driveName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
if (hScsiDriveIOCTL != INVALID_HANDLE_VALUE)
{
int drive = 0;
DWORD dummy;
for (drive = 0; drive < 2; drive++)
{
char buffer [sizeof (SRB_IO_CONTROL) + SENDIDLENGTH];
SRB_IO_CONTROL *p = (SRB_IO_CONTROL *) buffer;
SENDCMDINPARAMS *pin =
(SENDCMDINPARAMS *) (buffer + sizeof (SRB_IO_CONTROL));
// åå¤åæ°
memset (buffer, 0, sizeof (buffer));
p -> HeaderLength = sizeof (SRB_IO_CONTROL);
p -> Timeout = ;
p -> Length = SENDIDLENGTH;
p -> ControlCode = IOCTL_SCSI_MINIPORT_IDENTIFY;
strncpy ((char *) p -> Signature, "SCSIDISK", 8);
pin -> irDriveRegs.bCommandReg = IDE_ATA_IDENTIFY;
pin -> bDriveNumber = drive;
// å¾å°SCSI硬çä¿¡æ¯
if (DeviceIoControl (hScsiDriveIOCTL, IOCTL_SCSI_MINIPORT,
buffer,
sizeof (SRB_IO_CONTROL) +
sizeof (SENDCMDINPARAMS) - 1,
buffer,
sizeof (SRB_IO_CONTROL) + SENDIDLENGTH,
&dummy, NULL))
{
SENDCMDOUTPARAMS *pOut =
(SENDCMDOUTPARAMS *) (buffer + sizeof (SRB_IO_CONTROL));
IDSECTOR *pId = (IDSECTOR *) (pOut -> bBuffer);
if (pId -> sModelNumber [0])
{
int n = 0;
USHORT *pIdSector = (USHORT *) pId;
for (n = 0; n < ; n++)
buffer[n] =pIdSector [n];
return TRUE; // 读åæå
}
}
}
CloseHandle (hScsiDriveIOCTL); // å ³éå¥æ
}
return FALSE; // 读å失败
}
// Windows NT//XPä¸è¯»åIDE设å¤ä¿¡æ¯
BOOL CGetHDSerial::WinNTGetIDEHDInfo (HANDLE hPhysicalDriveIOCTL, PSENDCMDINPARAMS pSCIP,
PSENDCMDOUTPARAMS pSCOP, BYTE bIDCmd, BYTE bDriveNum,
PDWORD lpcbBytesReturned)
{
// 为读å设å¤ä¿¡æ¯åå¤åæ°
pSCIP -> cBufferSize = IDENTIFY_BUFFER_SIZE;
pSCIP -> irDriveRegs.bFeaturesReg = 0;
pSCIP -> irDriveRegs.bSectorCountReg = 1;
pSCIP -> irDriveRegs.bSectorNumberReg = 1;
pSCIP -> irDriveRegs.bCylLowReg = 0;
pSCIP -> irDriveRegs.bCylHighReg = 0;
// 计ç®é©±å¨å¨ä½ç½®
pSCIP -> irDriveRegs.bDriveHeadReg = 0xA0 | ((bDriveNum & 1) << 4);
// 设置读åå½ä»¤
pSCIP -> irDriveRegs.bCommandReg = bIDCmd;
pSCIP -> bDriveNumber = bDriveNum;
pSCIP -> cBufferSize = IDENTIFY_BUFFER_SIZE;
// 读å驱å¨å¨ä¿¡æ¯
return ( DeviceIoControl (hPhysicalDriveIOCTL, IOCTL_GET_DRIVE_INFO,
(LPVOID) pSCIP,
sizeof(SENDCMDINPARAMS) - 1,
(LPVOID) pSCOP,
sizeof(SENDCMDOUTPARAMS) + IDENTIFY_BUFFER_SIZE - 1,
lpcbBytesReturned, NULL) );
}
çµèçå·¥ä½åç
çµèåçæ¦è¿°
åé¢æ们已ç»æè¿ï¼çµèçå·¥ä½åçè·çµè§æºãVCDæºå·®ä¸å¤ï¼æ¨ç»å®åä¸äºæ令ï¼å®å°±ä¼ææ¨çæææ§è¡æ项åè½ãä¸è¿ï¼æ¨å¯ç¥éï¼è¿äºæ令并ä¸æ¯ç´æ¥åç»æ¨è¦æ§å¶ç硬件ï¼èæ¯å éè¿åé¢æè¿çè¾å ¥è®¾å¤ï¼å¦é®çãé¼ æ ï¼æ¥æ¶æ¨çæ令ï¼ç¶ååç±ä¸å¤®å¤çå¨ï¼CpUï¼æ¥å¤çè¿äºæ令ï¼æåæç±è¾åºè®¾å¤è¾åºæ¨è¦çç»æã
ç°å¨ï¼è®©æ们ç¨ä¸éç®åç计ç®é¢æ¥åæ³ä¸ä¸äººèçå·¥ä½æ¹å¼ã
é¢ç®å¾ç®åï¼8+8÷4=ï¼
é¦å ï¼æ们å¾ç¨ç¬å°è¿éé¢è®°å½å¨çº¸ä¸ï¼è®°å¨å¤§èä¸ï¼åç»è¿èç¥ç»å çæèï¼ç»åæ们以åææ¡çç¥è¯ï¼å³å®ç¨ååè¿ç®è§ååä¹ä¹ä¹æ³å£è¯æ¥å¤çï¼å ç¨èç®åº8÷4=2è¿ä¸ä¸é´ç»æï¼å¹¶è®°å½äºçº¸ä¸ï¼ç¶ååç¨èç®åº8+2=è¿ä¸æç»ç»æï¼å¹¶è®°å½äºçº¸ä¸ã
éè¿åè¿ä¸ç®åè¿ç®é¢ï¼æ们åç°ä¸è§å¾ï¼é¦å éè¿ç¼ãè³çæè§å¨å®å°ææçä¿¡æ¯è¾éå°å¤§èä¸å¹¶åå¨èµ·æ¥ï¼ç¶å对è¿ä¸ä¿¡æ¯è¿è¡å å·¥å¤çï¼åç±å¤§èæ§å¶äººææç»ç»æï¼ä»¥æç§æ¹å¼è¡¨è¾¾åºæ¥ã
çµèæ£æ¯æ¨¡ä»¿äººèè¿è¡å·¥ä½çï¼è¿ä¹æ¯âçµèâå称çæ¥æºï¼ï¼å ¶é¨ä»¶å¦è¾å ¥è®¾å¤ãåå¨å¨ãè¿ç®å¨ãæ§å¶å¨ãè¾åºè®¾å¤çåå«ä¸äººèçåç§åè½å¨å®å¯¹åºï¼ä»¥å®æä¿¡æ¯çè¾å ¥ãå¤çãè¾åºã
ä¸å¾å³ä¸ºè®¡ç®æºçå·¥ä½åçå¾ãæ¥ä¸æ¥æ们å°ä»å 个æ¦å¿µæ¥äºè§£ä¸ä¸çµèã
äºã硬件å软件çæ¦å¿µ
å¨åé¢æ们ä»ç»äºçµèæ¯ä»ä¹æ ·çï¼åçµèå é¨æ¯ææ ·ç»æçï¼è¿äºé½æ¯æ们è½å¤å®å®å¨å¨å°âçå°âçä¸è¥¿æ设å¤ï¼é£äºææçµèççå¾è§æ¸å¾ççä¸è¥¿ï¼å¦å å¨ä»¶ãçµè·¯æ¿ãé¶é¨ä»¶çç©çå®ä½åç©çè£ ç½®ï¼æ们æè¿äºè®¾å¤é½å«åçµè硬件ãä¸ä¸ªçµèç³»ç»ä¸åªæ硬件æ¯ä¸å¤çï¼å 为å®ä¸è½ä¸ºæ们åä»»ä½äºæ ï¼åªæå¨çµèç³»ç»ä¸æ·»å äºç¸åºç软件åï¼çµèæè½åæ¥å®å·¨å¤§çä½ç¨ï¼æè½å®ç°æ们æè¦æ±çç®çãç»ç¡¬ä»¶é å¤âææ³âå³ææ¥å®å¦ä½å·¥ä½ç软件就使å®æ为令æ们æå¥ççµâèâã
æè°è½¯ä»¶ï¼å°±æ¯å®è£ æåå¨å¨çµèä¸çç¨åºï¼ææ¶è¿äºè½¯ä»¶ä¹åå¨å¨å¤åå¨å¨ä¸ï¼å¦å çæ软çä¸ãæ们æç¥éç软件æï¼ WindowsãOfficeåå ¬è½¯ä»¶ãéå±±è¯é¸ã幸ç¦ä¹å®¶ãè¶ çº§è§£é¸ççã
æ们å¯ä»¥éè¿ä¸äºä¾åï¼æ¥è¿ä¸æ¥ç解软件ã硬件çæ¦å¿µãæ¯å¦ï¼æ们ç»å¸¸ä½¿ç¨çVCDç¢çï¼å°±è¿å¼ ç¢çæ¬èº«æ¥è¯´ï¼å®åªæ¯ä¸ä¸ªç¡¬ä»¶ï¼ç¨æ¥ææ¾VCDçå½±ç¢æºä¹æ¯ä¸ä¸ªç¡¬ä»¶ï¼èåå¨å¨ç¢çä¸çå¾è±¡åé³ä¹å°±æ¯è½¯ä»¶ã
软件å¯å为系ç»è½¯ä»¶ååºç¨è½¯ä»¶ï¼è±¡Windows è¿æ ·ç软件ï¼ä¹å«åæä½ç³»ç»ï¼å°±æ¯ç³»ç»è½¯ä»¶ï¼è象âéå±±è¯é¸âè¿æ ·ç软件就æ¯åºç¨è½¯ä»¶ã
éè¿äºè§£è½¯ä»¶ã硬件çæ¦å¿µï¼æ们ä¹å°±ç¥éäºå®ä»¬ä¹é´çå ³ç³»ï¼é£å°±æ¯ï¼ç¡¬ä»¶å软件æ¯ç¸äºä¾åçï¼ç¡¬ä»¶ä¸ºè½¯ä»¶æä¾äºç©è´¨åºç¡ï¼ä¹å°±æ¯è¯´è½¯ä»¶ç¦»å¼äºç¸åºç¡¬ä»¶çæ¯æï¼æ¯æ æ³åæ¥å ¶ä½ç¨çï¼èåªææäºè½¯ä»¶çæ¯æï¼ä¹æè½ä½¿ç¡¬ä»¶æäºç¨æ¦ä¹å°ãä½æ¯ï¼å¹¶ä¸æ¯æäºæç§ç¡¬ä»¶å°±è½è¿è¡ææç软件ï¼ä¹ä¸æ¯æäºæ个软件就è½å¨ææç硬件ä¸è¿è¡ï¼è¿å°±æ¯çµèä¸å¾æ®éçå ¼å®¹æ§é®é¢ã
çµèç硬件å软件æ¯ç¸è¾ ç¸æçãå®ä»¬å ±åææå®æ´ççµèç³»ç»ï¼ç¼ºä¸ä¸å¯ï¼æ²¡æ软件ççµèçäºä¸å åºéçéï¼æ ä»»ä½ä½ç¨ï¼åæ ·ï¼æ²¡æ硬件ï¼è½¯ä»¶ä¹å°±å¦æ æºä¹æ°´ï¼å°¤å¦ç©ºä¸æ¥¼éãå®ä»¬åªæç¸äºé åï¼çµèæè½æ£å¸¸è¿è¡ã
ä¸ãåºæ¬è¾å ¥è¾åºç³»ç»
é¦å ï¼æ们ä»ç»ä¸ä¸è£¸æºçæ¦å¿µï¼ç®åç说ï¼è£¸æºå³æ¯çµè硬件çç»åï¼ä¹å°±æ¯å¤§å®¶å¹³æ¶æ说ççµèãä¸è¬æ åµä¸ï¼æ们ä¸è½ç´æ¥æä½è£¸æºï¼å¿ é¡»éè¿ä¸ä¸ªå«åâåºæ¬è¾å ¥è¾åºç³»ç»âç软件系ç»ï¼è±æ为basic Input/Output Systemï¼ç®ç§°bIOSï¼ï¼æè½æä½æ§å¶è£¸æºï¼ä¹æ以è¿æ ·ç§°å¼å®ï¼æ¯å 为å®æä¾äºæåºæ¬ç计ç®æºæä½åè½ï¼å¦å¨å±å¹ä¸æ¾ç¤ºä¸ç¹ï¼æ¥æ¶ä¸ä¸ªé®çå符çè¾å ¥çã
åºæ¬è¾å ¥è¾åºç³»ç»å¯¹çµèæ¥è¯´æ¯é常éè¦çï¼è¿ä¸ªç³»ç»çä½ç¨ç´æ¥å½±åçµèçè½å¦ä½¿ç¨ãåæ¶å ä¹ææçµèåè½æç»é½æ¯å解为ä¸ä¸ªä¸ªç®åçåºæ¬è¾å ¥è¾åºæä½æ¥å®ç°ãè¾å¦ç»ä¸å¹ é£æ¯ï¼å°±æ¯ç±ä¸ç³»åä¸åé¢è²å亮度ç¹çåºæ¬è¾å ¥è¾åºæä½æ¥å®æã
åºæ¬è¾å ¥è¾åºç³»ç»åæ¾å¨ä¸»æ¿çåªè¯»åå¨å¨ï¼è±æ为Read Only Memoryï¼ç®ç§°ROMï¼è¯çä¸ï¼å¹³æ¶ä¸å¯ä¿®æ¹ï¼ä¹æ²¡å¿ è¦ä¿®æ¹ï¼ä½æ¶æ§è®¡ç®æºç æ¯é¤å¤ï¼å¹´4ææ¥å¸å·å ¨ççCIHç æ¯å°±ç ´åäºç¸å½ä¸é¨ä»½çµèçbIOSç³»ç»ï¼å¼å¾å¤§å®¶åªå¥½æ¾ä¸å®¶æè½ä¿®å¤ã
åãæä½ç³»ç»çæ¦å¿µ
å¨åºæ¬è¾å ¥è¾åºç³»ç»çå¤é¢ï¼ææ¯æ们平常念å¨çWindowsæWindowsç³»ç»ï¼å¨çµèçï¼è¿äºè½¯ä»¶åå«æä½ç³»ç»ï¼Operating Systemç®ç§°OSï¼ï¼ä¸é¨è´è´£ç®¡ç计ç®æºçåç§èµæºï¼å¹¶æä¾æä½çµèæéçå·¥ä½çé¢ãæäºå®ä»¬ï¼äººä»¬æå¯ä»¥æ¹ä¾¿èªå¦å°ä½¿ç¨çµèãæ£æ¯ç±äºæä½ç³»ç»çé£éåå±ï¼æ使计ç®æºç使ç¨ä»é«åº¦ä¸ä¸åçææ¯äººåæä¸ï¼èµ°åäºå¹¿å¤§æ®éç¨æ·æä¸ï¼åæ ·ä¹æ£æ¯ç±äºæä½ç³»ç»çé£éåå±ï¼æ使å¾è®¡ç®æºçåºç¨åºç°äºå¤å§¿å¤å½©çä»å¤©ã
æä½ç³»ç»æ¯ç®¡ç计ç®æºè½¯ç¡¬ä»¶èµæºçä¸ä¸ªå¹³å°ï¼æ²¡æå®ï¼ä»»ä½è®¡ç®æºé½æ æ³æ£å¸¸è¿è¡ãå¨ä¸ªäººçµèåå±å²ä¸ï¼åºç°è¿è®¸å¤ä¸åçæä½ç³»ç»ï¼å ¶ä¸æ为常ç¨çæäºç§ï¼DosãwindowsãLinuxãUnix/XenixãOS/2ï¼ä¸é¢åå«ä»ç»è¿äºç§çµèæä½ç³»ç»çåå±è¿ç¨ååè½ç¹ç¹ã
Dosæä½ç³»ç»
ä»å¹´é®ä¸è³ä»ï¼Dosç»åäº7次大ççæ¬å级ï¼ä»1.0çå°ç°å¨ç7.0çï¼ä¸æå°æ¹è¿åå®åãä½æ¯ï¼Dosç³»ç»çåç¨æ·ãåä»»å¡ãå符çé¢åä½çå¤§æ ¼å±æ²¡æååï¼å æ¤å®å¯¹äºå åç管çä¹å±éå¨Kbçèå´å ã
Dosæåæ¯ä¸ºIbM-pCå¼åçæä½ç³»ç»ï¼å æ¤å®å¯¹ç¡¬ä»¶å¹³å°çè¦æ±å¾ä½ï¼å³ä½¿å¯¹äºDos6.è¿æ ·çé«çæ¬Dosï¼å¨Kbå åãMb硬çãå¤çå¨çç¯å¢ä¸ä¹å¯æ£å¸¸è¿è¡ï¼å æ¤Dosç³»ç»æ¢éåäºé«æ¡£çµè使ç¨ï¼åéåäºä½æ¡£çµè使ç¨ã
常ç¨çDosæä¸ç§ä¸åçåçï¼å®ä»¬æ¯Microsoftå ¬å¸çMS-DosãIbMå ¬å¸çpC-Dos以åNovellå ¬å¸çDR_Dosï¼è¿ä¸ç§Dosé½æ¯å ¼å®¹çï¼ä½ä»æä¸äºåºå«ï¼ä¸ç§Dosä¸ä½¿ç¨æå¤çæ¯MS-Dosã
Dosç³»ç»ä¸ä¸ªæ大çä¼å¿æ¯å®æ¯æä¼å¤çéç¨è½¯ä»¶ï¼å¦åç§è¯è¨å¤çç¨åºãæ°æ®åºç®¡çç³»ç»ãæåå¤ç软件ãçµåè¡¨æ ¼ãèä¸å´ç»Doså¼åäºå¾å¤åºç¨è½¯ä»¶ç³»ç»ï¼å¦è´¢å¡ã人äºãç»è®¡ã交éãå»é¢çåç§ç®¡çç³»ç»ãé´äºè¿ä¸ªåå ï¼å°½ç®¡Doså·²ç»ä¸è½éåºä½æºç硬件系ç»ï¼ä½æ¯ä»å¹¿æ³æµè¡ï¼èä¸å¨æªæ¥çå å¹´å ä¹ä¸ä¼å¾å¿«è¢«æ·æ±°ã
windowsç³»ç»
windowsæ¯Microsoftå ¬å¸å¨å¹´æåå¸ç第ä¸ä»£çªå£å¼å¤ä»»å¡ç³»ç»ï¼å®ä½¿pCæºå¼å§è¿å ¥äºæè°çå¾å½¢ç¨æ·çé¢ï¼GUIï¼Graphic User Interfaceï¼æ¶ä»£ãå¨å¾å½¢ç¨æ·çé¢ä¸ï¼æ¯ä¸ç§åºç¨è½¯ä»¶ï¼å³ç±windowsæ¯æç软件ï¼é½ç¨ä¸ä¸ªå¾æ ï¼Iconï¼è¡¨ç¤ºï¼ç¨æ·åªéæé¼ æ 移å°æå¾æ ä¸ï¼åå»è¯¥å¾æ å³å¯è¿å ¥è¯¥è½¯ä»¶åºç¨çªå£ï¼è¿ç§çé¢æ¹å¼ä¸ºç¨æ·æä¾äºå¾å¤§çæ¹ä¾¿ï¼æ计ç®æºç使ç¨æé«å°äºä¸ä¸ªæ°çé¶æ®µã
windows1.Xçæ¯ä¸ä¸ªå ·æå¤çªå£åå¤ä»»å¡åè½ççæ¬ï¼ä½ç±äºå½æ¶ç硬件平å°ä¸ºpC/XTï¼é度å¾æ ¢ï¼æ以windows1.Xçæ¬å¹¶æªååæµè¡ãå¹´åºMicrosoftå ¬å¸åæ¨åºäºMS-windows2.X çï¼å®å ·æçªå£éå åè½ï¼çªå£å¤§å°ä¹å¯ä»¥è°æ´ï¼å¹¶å¯ææ©å±å ååæ©å å åä½ä¸ºç£çé«éç¼åï¼ä»èæé«äºæ´å°è®¡ç®æºçæ§è½ï¼æ¤å¤å®è¿æä¾äºä¼å¤çåºç¨ç¨åºï¼ååæ¿Writeãè®°äºæ¬Notepadã计ç®å¨Calculatorãæ¥åCalendarâ¦â¦çãéåå¨å¹´ãå¹´åå åæ¨åºäºMS-windows/-V2.1åMS-windows/ V2.1è¿ä¸¤ä¸ªçæ¬ã
å¹´ï¼Microsoftå ¬å¸æ¨åºäºwindows3.0ï¼å®çåè½è¿ä¸æ¥å 强ï¼å ·æ强大çå å管çï¼ä¸æä¾äºæ°éç¸å½å¤çwindowsåºç¨è½¯ä»¶ï¼å æ¤æ为ãå¾®æºæ°çæä½ç³»ç»æ åãéåï¼windowså表3.1çï¼èä¸æ¨åºäºç¸åºçä¸æçã3.1çè¾ä¹3.0çå¢å äºä¸äºæ°çåè½ï¼åå°äºç¨æ·æ¬¢è¿ï¼æ¯å½æ¶ææµè¡çwindowsçæ¬ãå ¶ä¸æç为windows 3.2ã
å¹´ï¼Microsoftå ¬å¸æ¨åºäºwindowsï¼ä¹ç§°ä¸ºChicagoæwindows4.0ï¼ãå¨æ¤ä¹åçwindowsé½æ¯ç±Doså¼å¯¼çï¼ä¹å°±æ¯è¯´å®ä»¬è¿ä¸æ¯ä¸ä¸ªå®å ¨ç¬ç«çç³»ç»ï¼èwindowsæ¯ä¸ä¸ªå®å ¨ç¬ç«çç³»ç»ï¼å¹¶å¨å¾å¤æ¹é¢ä½äºè¿ä¸æ¥çæ¹è¿ï¼è¿éæäºç½ç»åè½åå³æå³ç¨ï¼plug and playï¼åè½ï¼æ¯ä¸ä¸ªå ¨æ°çä½æä½ç³»ç»ã
å¹´ï¼Microsoftå ¬å¸æ¨åºäºwindowsçæ¹è¿çwindowsï¼windowsçä¸ä¸ªæ大ç¹ç¹å°±æ¯æ微软çInternetæµè§å¨ææ¯æ´åå°äºwindowséé¢ï¼ä½¿å¾è®¿é®Internetèµæºå°±å访é®æ¬å°ç¡¬çä¸æ ·æ¹ä¾¿ï¼ä»èæ´å¥½å°æ»¡è¶³äºäººä»¬è¶æ¥è¶å¤ç访é®Internetèµæºçéè¦ã
windowsæ¯ç®åå®é 使ç¨ç主æµæä½ç³»ç»ã
è¿æ¥ï¼æå ³windowsçå®£ä¼ æ¯è¶æ¥è¶å¤ï¼è¯´å°windowsï¼æ们ä¸è½ä¸æä¸ä¸Microsoftå ¬å¸çå¦ä¸ä¸ªäº§å----windowsNTç³»ç»ï¼NTæ¯New Technologyå³æ°ææ¯ç缩åï¼ï¼windowsNTæ¯çæ£çä½æä½ç³»ç»ï¼ä¸æ®éçwindowsç³»ç»ä¸åï¼å®ä¸»è¦é¢ååä¸ç¨æ·ï¼ææå¡å¨çåå·¥ä½çä¹åï¼æå计åï¼Microsoftå ¬å¸åå¤å¨å¹´å°ææ°çå·¥ä½ç«çæ¬NT 5.0åæ®éçwindowsç»ä¸ä¸ºä¸ä¸ªå®æ´çæä½ç³»ç»ï¼å³windows professionalï¼è¿æ ·ï¼æ 论对åä¸ç¨æ·è¿æ¯æ®é个人ç¨æ·ï¼ä»¥åMicrosoftå ¬å¸å°±åªæä¸ä¸ªwindowsæä½ç³»ç»äºã
Linuxç³»ç»
Linuxæ¯å½ä»çµèçä¸ä¸ªèç¼çååï¼å®æ¯ç®åå ¨çæ大çä¸ä¸ªèªç±å 费软件ï¼å ¶æ¬èº«æ¯ä¸ä¸ªåè½å¯ä¸Unixåwindowsç¸åª²ç¾çæä½ç³»ç»ï¼å ·æå®å¤çç½ç»åè½ã
Linuxæåç±è¬å °äººLinus Torvaldså¼åï¼å ¶æºç¨åºå¨Internetç½ä¸å ¬å¼åå¸ï¼ç±æ¤ï¼å¼åäºå ¨ççµèç±å¥½è çå¼åçæ ï¼è®¸å¤äººä¸è½½è¯¥æºç¨åºå¹¶æèªå·±çææ¿å®åæä¸æ¹é¢çåè½ï¼åååç½ä¸ï¼Linuxä¹å æ¤è¢«éç¢æ为ä¸ä¸ªå ¨çæ稳å®çãææåå±åæ¯çæä½ç³»ç»ãæ¾ç»æ人æè¨ï¼è¦æ¯æ¯å°Â·çè¨æwindowsçæºä»£ç ä¹ä½åæ ·å¤çï¼ç°å¨windowsä¸æ®çç许å¤bUGï¼é误ï¼æ©å·²ä¸å¤åå¨ï¼å ä¸ºå ¨ä¸çççµèç±å¥½è é½ä¼æ为windowsçä¹å¡æµè¯åç¼ç¨äººåã
Linuxæä½ç³»ç»å ·æå¦ä¸ç¹ç¹ï¼
1ï¼å®æ¯ä¸ä¸ªå 费软件ï¼æ¨å¯ä»¥èªç±å®è£ 并任æä¿®æ¹è½¯ä»¶çæºä»£ç ã
2ï¼Linuxæä½ç³»ç»ä¸ä¸»æµçUNIXç³»ç»å ¼å®¹ï¼è¿ä½¿å¾å®ä¸åºç°å°±æäºä¸ä¸ªå¾å¥½çç¨æ·ç¾¤ã
3ï¼æ¯æå ä¹ææç硬件平å°ï¼å æ¬Intelç³»åï¼x0ç³»åï¼Alphaç³»åï¼MIpSç³»åçï¼å¹¶å¹¿æ³æ¯æåç§å¨è¾¹è®¾å¤ã
ç®åï¼Linuxæ£å¨å ¨çåå°è¿ éæ®åæ¨å¹¿ï¼å大软件åå¦OracleãSybaseãNovellãIbMçååå¸äºLinuxçç产åï¼è®¸å¤ç¡¬ä»¶ååä¹æ¨åºäºé¢è£ Linuxæä½ç³»ç»çæå¡å¨äº§åï¼å½ç¶ï¼pCç¨æ·ä¹å¯ä½¿ç¨Linuxãå¦å¤ï¼è¿æä¸å°å ¬å¸æç»ç»æ计åå°æ¶éæå ³Linuxç软件ï¼ç»åæä¸å¥å®æ´çLinuxåè¡çæ¬ä¸å¸ï¼æ¯è¾èåçæRedHat(å³çº¢å¸½å)ãSlackwareçå ¬å¸ãç®åè¾ä¸ºæµè¡ççæ¬æRedHat Linuxã红æLinuxçãè½ç¶ï¼ç°å¨è¯´Linuxä¼å代Unixåwindowsè¿ä¸ºæ¶è¿æ©ï¼ä½ä¸ä¸ªç¨³å®æ§ãçµæ´»æ§åæç¨æ§é½é常好ç软件ï¼è¯å®ä¼å¾å°è¶æ¥è¶å¹¿æ³çåºç¨ã
Unixç³»ç»
Unixç³»ç»æ¯å¹´é®ä¸çï¼æåæ¯å¨ä¸å°å计ç®æºä¸è¿ç¨ãææ©ç§»æ¤å°å¾®æºä¸çUnixç³»ç»ï¼ç§°ä¸ºXenixãXenixç³»ç»çç¹ç¹æ¯çå°ç²¾å¹²ï¼ç³»ç»å¼éå°ï¼è¿è¡é度快ãç»è¿å¤å¹´çåå±ï¼Xenixå·²æ为ååæççç³»ç»ï¼ææ°çæ¬çXenixæ¯SCO UnixåSCO CDTãå½åç主è¦çæ¬æ¯Unix 3.2 V4.2以åODT 3.0ã
Unixæ¯ä¸ä¸ªå¤ç¨æ·ç³»ç»ï¼ä¸è¬è¦æ±é æ8M以ä¸çå ååè¾å¤§å®¹éç硬çã
OS/2ç³»ç»
å¹´IbMå ¬å¸å¨æ¿ççå¸åºç«äºä¸æ¨åºäºpS/2ï¼personal System/2ï¼ä¸ªäººçµèãpS/2ç³»åçµèå¤§å¹ åº¦çªç ´äºç°è¡pCæºçä½ç³»ï¼éç¨äºä¸å ¶å®æ»çº¿äºä¸å ¼å®¹çå¾®ééæ»çº¿MCAï¼å¹¶ä¸IbMèªè¡è®¾è®¡äºè¯¥ç³»ç»çº¦%çé¶é¨ä»¶ï¼ä»¥é²æ¢å ¶å®å ¬å¸ä»¿å¶ã
OS/2ç³»ç»æ£æ¯ä¸ºpS/2ç³»åæºå¼åçä¸ä¸ªæ°åå¤ä»»å¡æä½ç³»ç»ãOS/2å æäºDosç³»ç»Kb主åçéå¶ï¼å ·æå¤ä»»å¡åè½ãOS/2ä¹éç¨å¾å½¢çé¢ï¼å®æ¬èº«æ¯ä¸ä¸ªä½ç³»ç»ï¼ä¸ä» å¯ä»¥å¤çä½OS/2ç³»ç»çåºç¨è½¯ä»¶ï¼ä¹å¯ä»¥è¿è¡ä½Dosåwindows软件ã
OS/2ç³»ç»é常è¦æ±å¨4Mbå ååMb硬çææ´é«ç硬件ç¯å¢ä¸è¿è¡ã
äºãåºç¨è½¯ä»¶çæ¦å¿µ
顾åæä¹ï¼åºç¨è½¯ä»¶å³æ¯æä¾æç§ç¹å®åè½ç软件ï¼å¦ç°å¨æ¨ä½¿ç¨çãWpSãããWORDãçï¼å®ä»¬ä¸è¬é½è¿è¡å¨æä½ç³»ç»(å¦Windows)ä¹ä¸ï¼ç±ä¸ä¸äººåæ ¹æ®åç§éè¦å¼åãæ们平æ¶è§å°å使ç¨çç»å¤§é¨å软件å为åºç¨è½¯ä»¶ï¼å¦ææ¯è½¯ä»¶ï¼æåå¤ç软件ï¼å¦ä¹ 软件ï¼æ¸¸æ软件ï¼ä¸ç½è½¯ä»¶ççã
ä¸å¾å³ä¸ºä¸å¥å®æ´ççµèç³»ç»ç¤ºææ¡å¾ã
å°ç°å¨æ们ä¼åç°ï¼çµèçç»æé常象æ们人å人çè¡ä¸ºï¼çµèç主æºå°±ç±»ä¼¼ä¸æ们ç大èï¼å 为ï¼æ们人æ¯ç¨å¤§èå¨æèé®é¢è¿è¡è¿ç®çï¼åæ¶æ们ç大èè¿è½è®°å¿å¾å¤æ们æéè§è¿çåå¦ä¹ è¿çä¸è¥¿ãè¿ä¹æ¯ä¸ºä»ä¹å«åçµèçåå ï¼çµèçå¤è®¾å°±ç±»ä¼¼ä¸äººçç¼ãè³ãåè¢çï¼ä»¥åæ们ç¨æ¥è®°å½æåççäºæ æè¦åçäºæ çç¬è®°æ¬ãä½çµèä¸äººææ¬è´¨çä¸åï¼è¿å°±æ¯çµèæ°¸è¿æ¯ç±äººæ¥æ§å¶çï¼æ¯å¸®å©äººè¿è¡èåå³å¨çå·¥å ·ã
急求pb考勤管理系统(pb+access)论文
文字自己想办法
一:变量说明
1:application :
test
2:窗体
login:登陆窗口
w_main:考勤管理系统的主界面,选择操作
w_chuli:个人考勤记录处理
w_shengding:缺勤类型设定
w_tongji:员工考勤统计
w_yuangong:员工基本信息
3:数据窗口
dw_chuli1:个人考勤记录处理
dw_shengding:缺勤类型设定
dw_chuli:员工考勤统计
w_yuangong:员工基本信息
二:函数说明
一:application test中的函数
1. 函数名:test::open( )
作用:将test这个数据库注册为当前机器的用户的数据源
代码:
String ls_odbc //数据库名
String currdir = Space(), key//数据库“test”的完整路径
Environment env
string gs_currdir = GetCurrentDirectory()//得到运行程序的当前路径
GetEnvironment(env)
ls_odbc = "test"//数据库名为“test”
currdir=GetCurrentDirectory() + "\" + ls_odbc + ".mdb"//当前运行程序路径加上数据库名就是数据库“test”的完整路径
RegistryGet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", ls_odbc, RegString!, key)
if key="" then
CHOOSE CASE env.OSType//判断操作系统的类型,注册响应的数据源的驱动
CASE Windows!//为Windows
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", ls_odbc, RegString!, "Microsoft Access Driver (*.mdb)")
CASE WindowsNT!//为WindowsNT
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", ls_odbc, RegString!, "Driver do Microsoft Access (*.mdb)")
CASE ELSE
END CHOOSE
// 将数据库test注册为用户的数据源
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "", RegString!, "")
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "DBQ", RegString!, "" + currdir )
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "Driver", RegString!, "odbcjt.dll")
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "DriverId" , ReguLong!, )
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "FIL" , RegString!, "MS Access;" )
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "SafeTransactions", RegString!, "0" )
RegistrySet("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\" + ls_odbc, "UID" , RegString!, "" )
end if
open(login)// 打开登陆窗口
二:登陆窗口中的函数
1:函数名:login.open()
作用:连接到本机器数据源为test的数据库
代码:
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=test;UID=;PWD='"
connect;
if sqlca.sqlcode<>0 then
Messagebox("错误!,无法连接数据库:",sqlca.sqlerrtext)
halt close
end if
2:函数名:cb1。Clicked() 即点击登陆按钮的事件
作用:当用户输入帐号和密码后,判断是否在“操作员表”中 ,存在就打开考勤管理系统主界面
代码:
//定义两个变量
string password,cmir2 源码usename
// 数据库连接参数
//检索用户名和密码记录
SELECT 操作员表.用户名,
操作员表.密码
INTO :usename,
:password
FROM 操作员表
WHERE 操作员表.用户名 = :sle_1.text ;
//判断用户输入的用户名是否正确
if sle_1.text="" or sle_2.text="" then
messagebox("错误!","用户名或密码不能为空!",exclamation!,ok!,2)
else
if usename=sle_1.text and password=sle_2.text then
messagebox("通过验证!","用户名和密码正确,欢迎您使用本系统!",Information!,ok!,2)
open(w_main)// 打开考勤管理系统主界面
close(parent)
else
messagebox("错误!","用户名或密码错误,请重新输入!eve脚本源码",exclamation!,ok!,2)
end if
end if
3:函数名:cb2。Clicked() 即点击取消按钮的事件
作用:关闭窗口
代码:
close(parent)
二:主窗口中的函数
1:函数名:rb_1。Clicked()
作用:关闭当前窗口,打开员工基本信息窗口
代码:open(w_yuangong)
close(parent)
2:函数名:rb_2。Clicked()
作用:关闭当前窗口,打开考勤信息处理窗口
代码:open(w_chuli)
close(parent)
3:函数名:rb_3。缩头缩脚 源码Clicked()
作用:关闭当前窗口,打开缺勤类型设定窗口
代码:open(w_shengding)
close(parent)
4:函数名:rb_4。Clicked()
作用:关闭当前窗口,打开员工考勤统计窗口
代码:open(w_tongji)
close(parent)
5:函数名:pb_1。Clicked()
作用:关闭当前窗口
代码:close(parent)
三:考勤信息处理窗口中的函数
1:函数名:open( )
作用:将数据窗口和数据库连接,并且显示数据库存在的2017笑话源码程序数据
代码:dw_1.settransobject(sqlca)
dw_1.retrieve()
2:函数名:pb_1。Clicked()
作用:插入一条新记录
代码:dw_1.insertrow(0)
3:函数名:pb_2。Clicked()
作用:删除一条当前记录
代码:dw_1.deleterow(0)
4:函数名:pb_3。Clicked()
作用:向数据库提交插入,删除和修改的操作,如果成功就发到数据库
代码:
integer returncode
returncode=dw_1.update()
if returncode>0 then
commit using sqlca;
else
rollback using sqlca;
end if
4:函数名:pb_4。Clicked()
作用:关闭当前窗口,cf红名开枪源码回到主界面
代码:
open(w_main)
close(parent)
四:缺勤类型设定窗口中的函数
1:函数名:open( )
作用:将数据窗口和数据库连接,并且显示数据库存在的数据
代码:dw_1.settransobject(sqlca)
dw_1.retrieve()
2:函数名:pb_1。Clicked()
作用:插入一条新记录
代码:dw_1.insertrow(0)
3:函数名:pb_2。Clicked()
作用:删除一条当前记录
代码:dw_1.deleterow(0)
4:函数名:pb_3。Clicked()
作用:向数据库提交插入,删除和修改的操作,如果成功就发到数据库
代码:
integer returncode
returncode=dw_1.update()
if returncode>0 then
commit using sqlca;
else
rollback using sqlca;
end if
4:函数名:pb_4。Clicked()
作用:关闭当前窗口,回到主界面
代码:
open(w_main)
close(parent)
五:员工基本信息窗口中的函数
1:函数名:open( )
作用:将数据窗口和数据库连接,并且显示数据库存在的数据
代码:dw_1.settransobject(sqlca)
dw_1.retrieve()
2:函数名:pb_1。Clicked()
作用:插入一条新记录
代码:dw_1.insertrow(0)
3:函数名:pb_2。Clicked()
作用:删除一条当前记录
代码:dw_1.deleterow(0)
4:函数名:pb_3。Clicked()
作用:向数据库提交插入,删除和修改的操作,如果成功就发到数据库
代码:
integer returncode
returncode=dw_1.update()
if returncode>0 then
commit using sqlca;
else
rollback using sqlca;
end if
4:函数名:pb_4。Clicked()
作用:关闭当前窗口,回到主界面
代码:
open(w_main)
close(parent)
六:员工考勤统计窗口中的函数
1:函数名:open( )
作用:将数据窗口和数据库连接,并且显示数据库存在的数据
代码:dw_1.settransobject(sqlca)
dw_1.retrieve()
2:函数名:ddlb_1。Selectchange()
作用: 改变数据窗口中数据的大小
代码:dw_1.modify('DataWindow.Zoom = '+ trim(ddlb_1.text))
3:函数名:cb1。Clicked()
作用: 回到数据窗口中上一页
代码:dw_1.scrollpriorpage()
4:函数名:cb2。Clicked()
作用: 回到数据窗口中下一页
代码:dw_1.scrollnextpage()
5:函数名:cb3。Clicked()
作用: 打印数据窗口
代码:dw_1.print()
6:函数名:cb4。Clicked()
作用: 打印设置
代码:printsetup()
7:函数名:cb5。Clicked()
作用: 打印预览
代码:
dw_1.Modify("DataWindow.Print.Orientation = '1'") //横向
dw_1.Modify("DataWindow.Print.Orientation = '2'") //纵向
dw_1.Modify("DataWindow.Print.Preview = yes")
dw_1.Modify("DataWindow.Print.Preview.Rulers = yes")
dw_1.modify('DataWindow.Print.Preview.Zoom = '+ trim(ddlb_1.text))
8:函数名:cb5。Clicked()
作用: 打印预览
9:函数名:ddlb_2。Selectchange()
作用: 改变打印预览窗口的大小
代码:
dw_1.modify('DataWindow.Print.Preview.Zoom = '+ trim(ddlb_2.text))
:函数名:cb6。Clicked()
作用: 将数据窗口中的数据保存为表格形式的文件
代码:string ls_path, ls_file
int li_rc
ls_path = sle_1.Text
li_rc = GetFileSaveName ( "Select File", ls_path, ls_file, "xls", "*.xls,*.xls" )
//得到路径名
IF li_rc = 1 Then
OLEObject ole_object , ole_workbooks
ole_object = CREATE OLEObject
//创建Excel对象
IF ole_object.ConnectToNewObject("Excel.Application") <> 0 THEN
MessageBox('OLE错误','OLE无法连接!')
return
END IF
ole_object.workbooks.add
ole_object.Visible = True
ole_workbooks = ole_object.Worksheets(1)
ole_workbooks.cells(1,1).value="员工号"
ole_workbooks.cells(1,2).value="时间"
ole_workbooks.cells(1,3).value="天数"
ole_workbooks.cells(1,4).value="类型"
ole_workbooks.cells(1,5).value="原因"
long l_row
for l_row = 2 to dw_1.rowcount()+1
ole_workbooks.cells(l_row,1).value=dw_1.getitemstring(l_row - 1,1)
ole_workbooks.cells(l_row,2).value=dw_1.getitemstring(l_row - 1,2)
ole_workbooks.cells(l_row,3).value=dw_1.getitemstring(l_row - 1,3)
ole_workbooks.cells(l_row,4).value=dw_1.getitemstring(l_row - 1,4)
ole_workbooks.cells(l_row,5).value=dw_1.getitemstring(l_row - 1,5)
next
ole_workbooks.SaveAs ( ls_path)
ole_object.quit()
Ole_Object.DisConnectObject()
Destroy Ole_Object
destroy ole_workbooks
messagebox("!","文件保存到"+ ls_path)
End If
:函数名:sel。modify()
作用: 将数据窗口中的数据按输入的员工号显示
代码:
string emp_no
string condition
if sle_1.text <> "" then
emp_no=trim(sle_1.text)
condition="emp_no="+"'"+ emp_no+"'"
dw_1.setfilter( condition)
filter(dw_1)
dw_1.retrieve()
end if