欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    教师工资系统VF程序源代码及其说明.docx

    • 资源ID:9857616       资源大小:169.88KB        全文页数:15页
    • 资源格式: DOCX        下载积分:3金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    教师工资系统VF程序源代码及其说明.docx

    1、教师工资系统VF程序源代码及其说明程序源代码及其说明1、 登陆界面实现代码及截图1.1核心代码void CLogInDlg:OnOK() / TODO: Add extra validation here UpdateData(TRUE); if(m_usrName = ) AfxMessageBox(用户账号不能为空!); return; if(m_usrPasswd = ) AfxMessageBox(用户密码不能为空!); return; CDatabase db; CString sql; db.Open(NULL,FALSE,FALSE,ODBC;DSN=salaryDB;UID=z

    2、hang,PWD=NULL); ClogInSet* pset = new ClogInSet(&db); sql.Format(select * fromlogin where ID=%s and passwd=%s,m_usrName,m_usrPasswd); pset-Open(AFX_DB_USE_DEFAULT_TYPE,sql); if(m_usrName != pset-m_ID | m_usrPasswd != pset-m_passwd) AfxMessageBox(用户账号或密码错误!); return; CDialog:OnOK();1.2 登陆界面2、 工资查询实现代

    3、码及截图2.1 核心代码void CpaySearch:OnQuery() / TODO: Add your control notification handler code here CDatabase db; CString sql; db.Open(NULL,FALSE,FALSE,ODBC;DSN=salaryDB;UID=zhang,PWD=NULL); Csalaryset* pset = new Csalaryset(&db); int i=0; CString str; CString ty,tm,td; m_years.GetWindowText(ty); m_months

    4、.GetWindowText(tm); m_departments.GetWindowText(td);/ str.Format(%d,m_years.GetCurSel();/ AfxMessageBox(str); if(radioSel = 0) if(m_years.GetCurSel() = 0) if(m_months.GetCurSel() = 0 & m_departments.GetCurSel() != 0) sql.Format(select * from searchSalary where dept=%s,td); else if(m_months.GetCurSel

    5、() != 0 & m_departments.GetCurSel() = 0) sql.Format(select * from searchSalary where month=%s,tm); else if(m_months.GetCurSel() != 0 & m_departments.GetCurSel() != 0) sql.Format(select * from searchSalary where dept=%s and month=%s,td,tm); else sql.Format(select * from searchSalary); else/ if(m_year

    6、s.GetCurSel() != 0) if(m_months.GetCurSel() = 0 & m_departments.GetCurSel() != 0) sql.Format(select * from searchSalary where dept=%s and year=%s,td,ty); else if(m_months.GetCurSel() != 0 & m_departments.GetCurSel() = 0) sql.Format(select * from searchSalary where month=%s and year=%s,tm,ty); else i

    7、f(m_months.GetCurSel() != 0 & m_departments.GetCurSel() != 0) sql.Format( select * from searchSalary where year=%s and month=%s and dept=%s, ty,tm,td ); else sql.Format(select * from searchSalary where year=%s,ty); else UpdateData(TRUE); if(m_years.GetCurSel() = 0) if(m_months.GetCurSel() = 0 & m_de

    8、partments.GetCurSel() != 0) sql.Format(select * from searchSalary where ID=%s and dept=%s,m_ID,td); else if(m_months.GetCurSel() != 0 & m_departments.GetCurSel() = 0) sql.Format(select * from searchSalary where ID=%s and month=%s,m_ID,tm); else if(m_months.GetCurSel() != 0 & m_departments.GetCurSel(

    9、) != 0) sql.Format(select * from searchSalary where ID=%s and dept=%s and month=%s,m_ID,td,tm); else sql.Format(select * from searchSalary where ID=%s,m_ID); else/ if(m_years.GetCurSel() != 0) if(m_months.GetCurSel() = 0 & m_departments.GetCurSel() != 0) sql.Format(select * from searchSalary where I

    10、D=%s and dept=%s and year=%s,m_ID,td,ty); else if(m_months.GetCurSel() != 0 & m_departments.GetCurSel() = 0) sql.Format(select * from searchSalary where ID=%s and month=%s and year=%s,m_ID,tm,ty); else if(m_months.GetCurSel() != 0 & m_departments.GetCurSel() != 0) sql.Format( select * from searchSal

    11、ary where ID=%s and year=%s and month=%s and dept=%s, m_ID,ty,tm,td ); else sql.Format(select * from searchSalary where ID=%s and year=%s,m_ID,ty); UpdateData(FALSE); / sql.Format(select * from searchSalary); AfxMessageBox(sql); m_printList.DeleteAllItems(); pset-Open(AFX_DB_USE_DEFAULT_TYPE,sql); i

    12、f(pset-GetRecordCount() = 0) delete pset; return; while(!pset-IsEOF() str.Format(%s,pset-m_ID); m_printList.InsertItem(i,str); str.Format(%s,pset-m_name); m_printList.SetItemText(i,name,str); str.Format(%s,pset-m_dept); m_printList.SetItemText(i,department,str); str.Format(%s,pset-m_position); m_pri

    13、ntList.SetItemText(i,position,str); str.Format(%.2f,pset-m_allowance); m_printList.SetItemText(i,allowance,str); str.Format(%.2f,pset-m_salary); m_printList.SetItemText(i,salary,str); str.Format(%.2f,pset-m_reward); m_printList.SetItemText(i,reward,str); str.Format(%d,pset-m_year); m_printList.SetIt

    14、emText(i,year,str); str.Format(%d,pset-m_month); m_printList.SetItemText(i,month,str); i+; pset-MoveNext(); db.Close(); delete pset;2.2 查询界面3、教职工基本信息添加实现代码及截图3.1核心代码void CWorkersInfo:OnModify() / TODO: Add your control notification handler code here int count = m_wkrsInfo.GetItemCount(); try CDataba

    15、se db; CString sql; db.Open(NULL,FALSE,FALSE,ODBC;DSN=salaryDB;UID=zhang,PWD=NULL); CsysSet *sset = new CsysSet(&db); double al = 0; double sal = 0; / CcheckOnSet *cset = new CcheckOnSet(&db); CTime times = CTime:GetCurrentTime(); int year=times.GetYear(); int month=times.GetMonth();/* sql.Format(%d

    16、,count); AfxMessageBox(sql); sql.Format(%d-%d,year,month); AfxMessageBox(sql);*/ CString ID,Name,Pos,Title,Dept,Phone; for(int i = 0;i Open(AFX_DB_USE_DEFAULT_TYPE,sql); sal = sset-m_salary; al = sset-m_pAllowance; sql.Format(%.2f,sal); /* AfxMessageBox(sql); / Print the sql statement for check. */

    17、sset-Close(); /Close is needed. sql.Format(insert into searchSalary (ID,name,dept,position,allowance,salary,reward,year,month) values (%s,%s,%s,%s,%.2f,%.2f,0,%d,%d), ID,Name,Dept,Pos,al,sal,year,month); db.ExecuteSQL(sql); db.Close(); catch(CDBException e) CString err; err.Format(数据库操作错误!); AfxMess

    18、ageBox(err); 3.2 教职工信息查询界面4、 系统设置实现代码和截图4.1确定修改系统设置实现代码void CSystemSetting:OnConfirm() / TODO: Add your control notification handler code here CDatabase db; CString sql,sql1,sql2,sql3,sql4,sql5; sql.Format(select * from sysSet); db.Open(NULL,FALSE,FALSE,ODBC;DSN=salaryDB;UID=zhang,PWD=NULL); CsysSet

    19、 *pset = new CsysSet(&db); pset-Open(AFX_DB_USE_DEFAULT_TYPE,sql); m_1_1 = pset-m_salary; m_1_2 = pset-m_aAllowance; m_1_3 = pset-m_pAllowance; m_1_4 = pset-m_tAllowance; pset-MoveNext(); m_2_1 = pset-m_salary; m_2_2 = pset-m_aAllowance; m_2_3 = pset-m_pAllowance; m_2_4 = pset-m_tAllowance; pset-Mov

    20、eNext(); m_3_1 = pset-m_salary; m_3_2 = pset-m_aAllowance; m_3_3 = pset-m_pAllowance; m_3_4 = pset-m_tAllowance; pset-MoveNext(); m_4_1 = pset-m_salary; m_4_2 = pset-m_aAllowance; m_4_3 = pset-m_pAllowance; m_4_4 = pset-m_tAllowance; pset-MoveNext(); m_5_1 = pset-m_salary; m_5_2 = pset-m_aAllowance;

    21、 m_5_3 = pset-m_pAllowance; m_5_4 = pset-m_tAllowance; pset-MoveFirst(); UpdateData(TRUE); sql1.Format(update sysSet set salary=%.1f,aAllowance=%.1f,pAllowance=%.1f,tAllowance=%.1f where SID=0001, m_1_1,m_1_2,m_1_3,m_1_4); sql2.Format(update sysSet set salary=%.1f,aAllowance=%.1f,pAllowance=%.1f,tAl

    22、lowance=%.1f where SID=0002, m_2_1,m_2_2,m_2_3,m_2_4); sql3.Format(update sysSet set salary=%.1f,aAllowance=%.1f,pAllowance=%.1f,tAllowance=%.1f where SID=0003, m_3_1,m_3_2,m_3_3,m_3_4); sql4.Format(update sysSet set salary=%.1f,aAllowance=%.1f,pAllowance=%.1f,tAllowance=%.1f where SID=0004, m_4_1,m

    23、_4_2,m_4_3,m_4_4); sql5.Format(update sysSet set salary=%.1f,aAllowance=%.1f,pAllowance=%.1f,tAllowance=%.1f where SID=0005, m_5_1,m_5_2,m_5_3,m_5_4); db.ExecuteSQL(sql1); db.ExecuteSQL(sql2); db.ExecuteSQL(sql3); db.ExecuteSQL(sql4); db.ExecuteSQL(sql5); db.Close();4.2删除教职工信息功能实现代码void CSystemSetti

    24、ng:OnDelete() / TODO: Add your control notification handler code here UpdateData(TRUE); if(m_delete=) AfxMessageBox(请输入教职工编号!); return; Calert *dlg = new Calert(); if(dlg-DoModal()=IDOK) CString sql; CDatabase db; sql.Format(delete from baseInfo where ID=%s,m_delete); db.Open(NULL,FALSE,FALSE,ODBC;DSN=salaryDB;UID=zhang,PWD=NULL); db.ExecuteSQL(sql); db.Close();


    注意事项

    本文(教师工资系统VF程序源代码及其说明.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开