ImageVerifierCode 换一换
格式:DOCX , 页数:17 ,大小:221.84KB ,
资源ID:21645956      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/21645956.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(SQLserver 数据库课程设计Word下载.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

SQLserver 数据库课程设计Word下载.docx

1、四、 应用系统实现与测试 登陆界面系统界面文档基本信息日志管理文档类别单位列表五、部分代码/ ADO.cpp: implementation of the CADO class./#include stdafx.hADO.h#include #ifdef _DEBUG#undef THIS_FILEstatic char THIS_FILE=_FILE_;#define new DEBUG_NEW#endif/ Construction/Destructionint ConCount = 0;CADOConnection g_Connection;/全局数据库连接对象CADOConnectio

2、n * GetConnection() return &g_Connection;CADOConnection:CADOConnection() InitADO(); m_Connection.CreateInstance(ADODB.Connection);CADOConnection() if (IsOpen() m_Connection-Close(); m_Connection = NULL; UnInitADO();void CADOConnection:InitADO() if (ConCount+ = 0) CoInitialize(NULL);UnInitADO() if (-

3、ConCount = 0) CoUninitialize();BOOL CADOConnection:Open(CString ConStr) m_Connection-Open(_bstr_t)ConStr,adModeUnknown); return IsOpen();CString CADOConnection:GetSQLConStr(CString IP, CString DBName) CString Str; Str.Format(Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=

4、%s;Data Source=%s,DBName,IP); return Str;_ConnectionPtr CADOConnection:GetConnection() return m_Connection;IsOpen() long State;get_State(&State); if (State = adStateOpen) return true; return false;/CADODataSet:CADODataSet() m_DataSet.CreateInstance(ADODB.RecordsetCADODataSet() m_DataSet- m_DataSet =

5、 NULL;void CADODataSet:SetConnection(CADOConnection *pCon) m_Connection = pCon;int CADODataSet:GetRecordCount() return m_DataSet-GetRecordCount(); else return 0;BOOL CADODataSet:Open(CString SQLStr) /*/ m_DataSet-Open(_bstr_t(SQLStr), _variant_t(IDispatch*)g_Connection.GetConnection(), true), adOpen

6、Keyset, adLockOptimistic, adCmdText);FieldsPtr CADODataSet:GetFields() return m_DataSet-GetFields();Next() if (m_DataSet-adoEOF) return false;MoveNext(); return true;AddNew()AddNew();SetFieldValue(CString FieldName, _variant_t Value)PutCollect(_bstr_t)FieldName,Value);Save()Update();move(int nIndex)

7、MoveFirst();Move(nIndex);GetRecordNo()AbsolutePosition;Delete()Delete(adAffectCurrent);Open(CString SQLStr, int LockType) adOpenKeyset,(LockTypeEnum) LockType, adCmdText);/ CheckSum.cpp : implementation filePerson.hCheckSum.hstatic char THIS_FILE = _FILE_;/ CCheckSum dialogCCheckSum:CCheckSum(CWnd*

8、pParent /*=NULL*/) : CDialog(CCheckSum:IDD, pParent) /AFX_DATA_INIT(CCheckSum) m_emp = _T( m_mm = _T( m_yy = _T( /AFX_DATA_INITvoid CCheckSum:DoDataExchange(CDataExchange* pDX) CDialog:DoDataExchange(pDX); /AFX_DATA_MAP(CCheckSum) DDX_Control(pDX, IDC_LISTEMP, m_list); DDX_Control(pDX, IDC_CYY, m_cy

9、y); DDX_Control(pDX, IDC_CMM, m_cmm); DDX_Control(pDX, IDC_CEMP, m_cemp); DDX_CBString(pDX, IDC_CEMP, m_emp); DDX_CBString(pDX, IDC_CMM, m_mm); DDX_CBString(pDX, IDC_CYY, m_yy); /AFX_DATA_MAPBEGIN_MESSAGE_MAP(CCheckSum, CDialog) /AFX_MSG_MAP(CCheckSum) ON_CBN_CLOSEUP(IDC_CEMP, OnCloseupCemp) ON_CBN_

10、CLOSEUP(IDC_CYY, OnCloseupCyy) ON_CBN_CLOSEUP(IDC_CMM, OnCloseupCmm) /AFX_MSG_MAPEND_MESSAGE_MAP()/ CCheckSum message handlersBOOL CCheckSum:OnInitDialog() OnInitDialog(); int i = 0; m_list.InsertColumn(i,人员姓名 m_list.SetColumnWidth(i+,100);工作总天数迟到总天数早退总天数病假总天数事假总天数 m_list.SetExtendedStyle(LVS_EX_FUL

11、LROWSELECT|LVS_EX_GRIDLINES); int curyear,curmonth; CTime time(CTime:GetCurrentTime(); curyear = time.GetYear(); curmonth = time.GetMonth(); char value10; for (int y = 2000; y 2100 ;y+) _itoa(y,value,10); m_cyy.InsertString(y-2000,value); m_cyy.SetCurSel(curyear-2000); for (int n = 1 ; n=12 ;n+) _it

12、oa(n,value,10); m_cmm.InsertString(n-1,value); m_cmm.SetCurSel(curmonth-1); CADODataSet dataset; dataset.SetConnection(:GetConnection(); dataset.Open(Select * From tab_Employees m_cemp.InsertString(0,(全部) for (int index = 1 ; index Itememp_name-Value); dataset.Next(); m_cemp.SetCurSel(0); UpdateList

13、(); return TRUE; / return TRUE unless you set the focus to a control / EXCEPTION: OCX Property Pages should return FALSEUpdateList() m_list.DeleteAllItems(); this-UpdateData(); CString str,temp,where,datestr,StartDate,EndDate; StartDate = m_yy + - + m_mm + -1 ; EndDate.Format(DATEADD(month,1,%s),Sta

14、rtDate); datestr.Format( between and %s,StartDate,EndDate); temp += select emp.emp_name ,ROUND(isnull(works.workday,0),2); workday,ROUND(isnull(lates.lateday,0),2) lateday, ROUND(isnull(leaveearlys.leaveearlyday,0),2) leaveearlyday, ROUND(isnull(bjdays.bjday,0),2) bjday,ROUND(isnull(sjdays.sjday,0),

15、2) sjday from tab_Employees emp left join (select sum(DATEDIFF(second,ontime,offtime) / 60.0 / 60.0 / 8.0 as workday,name From tab_Check where checkdate %s group by name) works on emp.emp_name = works.name (select (sum(DATEPART(Hour,latetime) * 60 * 60 + sum(DATEPART(minute,latetime) * 60 + sum(DATE

16、PART(second,latetime) /60.0 /60.0 /8.0 as lateday,name From tab_Check where checkdate %s group by name) lates on emp.emp_name = lates.name (select (sum(DATEPART(Hour,leaveearly) * 60 * 60 + sum(DATEPART(minute,leaveearly) * 60 + sum(DATEPART(second,leaveearly) /60.0 /60.0 /8.0 as leaveearlyday,name

17、From tab_Check where checkdate %s group by name) leaveearlys on emp.emp_name = leaveearlys.name (select isnull(sum(DATEDIFF(second,onleave,offleave) / 60.0 / 60.0 / 8.0,0) as bjday,name From tab_Check where leave = 病假 and checkdate %s group by name) bjdays on emp.emp_name = bjdays.name (select isnul

18、l(sum(DATEDIFF(second,onleave,offleave) / 60.0 / 60.0 / 8.0,0) as sjday,name From tab_Check where 事假 sjdays on emp.emp_name = sjdays.name %s/*/ / where.Format( where emp.emp_name = ,m_emp); if (m_emp = ) str.Format(temp,datestr,datestr,datestr,datestr,datestr, str.Format(temp,datestr,datestr,datestr,datestr,datestr,where); dataset.Open(str,adLockUnspecified); for (int i = 0; i workdaylatedayleaveearlydaybjdaysjday /*/OnCloseupCemp() OnCloseupCyy() OnCloseupCmm() 六、课程设计心得体会这次历时两周的课程设计,对于我们来说确实收获了不少。第一天我们查找资料、了解有关的知识,相互探讨,了解文档管理系统的需求,做好需求分析后,开始系统的设计,画出E-R图,写出各个实体的属性。对于数据库的创建,虽然出现很多的问题,

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1