📄 dmain.cpp
字号:
// DMain.cpp : implementation file
//
#include "stdafx.h"
#include "Rsglxt.h"
#include "DMain.h"
#include "BAK.h"
#include "DOp.h"
#include "Dep.h"
#include "DCont.h"
#include "externdllHeader.h"
#include "DBaseQuery.h"
#include "DHoliday.h"
#include "DEvect.h"
#include "YHSZ.h"
#include "Wage.h"
#include "DWagecollect.h"
//人事管理
#include "StaffInfo.h"
#include "CAttendInfo.h"
#include "CTraingInfo.h"
#include "CEvaluationInfo.h"
#include "MobilizeInfo.h"
#include "CIncentiveInfo.h"
#include "CSperationInfo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CRsglxtApp theApp;
extern CString Lever;
/////////////////////////////////////////////////////////////////////////////
// CDMain dialog
CDMain::CDMain(CWnd* pParent /*=NULL*/)
: CDialog(CDMain::IDD, pParent)
{
//{{AFX_DATA_INIT(CDMain)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDMain::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDMain)
DDX_Control(pDX, IDC_GZHZ_BTN, m_Gzhz_btn);
DDX_Control(pDX, IDC_GZSZ_BTN, m_Gzsz_btn);
DDX_Control(pDX, IDC_WAGE_BTN, m_Wage_btn);
DDX_Control(pDX, IDC_ZCKH_BTN, m_Zckh_btn);
DDX_Control(pDX, IDC_YHGL_BTN, m_Yhgl_btn);
DDX_Control(pDX, IDC_YGPX_BTN, m_Ygpx_btn);
DDX_Control(pDX, IDC_YGJC_BTN, m_Ygjc_btn);
DDX_Control(pDX, IDC_XTHY_BTN, m_Xthy_btn);
DDX_Control(pDX, IDC_XTBF_BTN, m_Xtbf_btn);
DDX_Control(pDX, IDC_RSDN_BTN, m_Rsda_btn);
DDX_Control(pDX, IDC_QXGL_BTN, m_Qxgl_btn);
DDX_Control(pDX, IDC_LZLX_BTN, m_Lzlx_btn);
DDX_Control(pDX, IDC_KQGL_BTN, m_Kqgl_btn);
DDX_Control(pDX, IDC_JQGL_BTN, m_Jqgl_btn);
DDX_Control(pDX, IDC_HTGL_BTN, m_Htgl_btn);
DDX_Control(pDX, IDC_DDGL_BTN, m_Ddgl_btn);
DDX_Control(pDX, IDC_BMGL_BTN, m_Bmgl_btn);
DDX_Control(pDX, IDC_CCGL_BTN, m_Ccgl_btn);
DDX_Control(pDX, IDC_XTSZ_BTN, m_Xtsz_btn);
DDX_Control(pDX, IDC_YHSZ_BTN, m_Yhsz_btn);
DDX_Control(pDX, IDC_ZHGL_BTN, m_Zhgl_btn);
DDX_Control(pDX, IDC_RSGL_BTN, m_Rsgl_btn);
DDX_Control(pDX, IDC_EXIT_BTN, m_Exit_btn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDMain, CDialog)
//{{AFX_MSG_MAP(CDMain)
ON_WM_PAINT()
ON_WM_CANCELMODE()
ON_WM_LBUTTONDOWN()
ON_BN_CLICKED(IDC_RSGL_BTN, OnRsglBtn)
ON_BN_CLICKED(IDC_ZHGL_BTN, OnZhglBtn)
ON_BN_CLICKED(IDC_XTSZ_BTN, OnXtszBtn)
ON_BN_CLICKED(IDC_YHSZ_BTN, OnYhszBtn)
ON_BN_CLICKED(IDC_EXIT_BTN, OnExitBtn)
ON_BN_CLICKED(IDC_RSDN_BTN, OnRsdnBtn)
ON_BN_CLICKED(IDC_ZCKH_BTN, OnZckhBtn)
ON_BN_CLICKED(IDC_LZLX_BTN, OnLzlxBtn)
ON_BN_CLICKED(IDC_JQGL_BTN, OnJqglBtn)
ON_BN_CLICKED(IDC_XTBF_BTN, OnXtbfBtn)
ON_BN_CLICKED(IDC_KQGL_BTN, OnKqglBtn)
ON_BN_CLICKED(IDC_DDGL_BTN, OnDdglBtn)
ON_BN_CLICKED(IDC_BMGL_BTN, OnBmglBtn)
ON_BN_CLICKED(IDC_CCGL_BTN, OnCcglBtn)
ON_BN_CLICKED(IDC_YHGL_BTN, OnYhglBtn)
ON_BN_CLICKED(IDC_YGPX_BTN, OnYgpxBtn)
ON_BN_CLICKED(IDC_YGJC_BTN, OnYgjcBtn)
ON_BN_CLICKED(IDC_HTGL_BTN, OnHtglBtn)
ON_BN_CLICKED(IDC_XTHY_BTN, OnXthyBtn)
ON_BN_CLICKED(IDC_QXGL_BTN, OnQxglBtn)
ON_BN_CLICKED(IDC_WAGE_BTN, OnWageBtn)
ON_BN_CLICKED(IDC_GZSZ_BTN, OnGzszBtn)
ON_BN_CLICKED(IDC_GZHZ_BTN, OnGzhzBtn)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDMain message handlers
void CDMain::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
CRect rect;
CBitmap bit;
CDC memDC;
this->GetClientRect(&rect);
bit.LoadBitmap(IDB_BIT_BLACK);
memDC.CreateCompatibleDC(&dc);
memDC.SelectObject(&bit);
dc.BitBlt(0,0,rect.Width(),rect.Height(),&memDC,0,0,SRCCOPY);
memDC.DeleteDC();
::DeleteObject(&bit);
CDialog::OnPaint();
// Do not call CDialog::OnPaint() for painting messages
}
BOOL CDMain::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_Rsda_btn.LoadPic(IDB_BIT_RSDA,IDB_BIT_RSDA,IDB_BIT_RSDA);
m_Kqgl_btn.LoadPic(IDB_BIT_KQGL,IDB_BIT_KQGL,IDB_BIT_KQGL);
m_Zckh_btn.LoadPic(IDB_BIT_KHGL,IDB_BIT_KHGL,IDB_BIT_KHGL);
m_Yhgl_btn.LoadPic(IDB_BIT_YHGL,IDB_BIT_YHGL,IDB_BIT_YHGL);
m_Ygpx_btn.LoadPic(IDB_BIT_YGPX,IDB_BIT_YGPX,IDB_BIT_YGPX);
m_Ygjc_btn.LoadPic(IDB_BIT_JCGL,IDB_BIT_JCGL,IDB_BIT_JCGL);
m_Xthy_btn.LoadPic(IDB_BIT_XTHY,IDB_BIT_XTHY,IDB_BIT_XTHY);
m_Xtbf_btn.LoadPic(IDB_BIT_XTBF,IDB_BIT_XTBF,IDB_BIT_XTBF);
m_Qxgl_btn.LoadPic(IDB_BIT_QXGL,IDB_BIT_QXGL,IDB_BIT_QXGL);
m_Lzlx_btn.LoadPic(IDB_BIT_LZLX,IDB_BIT_LZLX,IDB_BIT_LZLX);
m_Jqgl_btn.LoadPic(IDB_BIT_JQGL,IDB_BIT_JQGL,IDB_BIT_JQGL);
m_Htgl_btn.LoadPic(IDB_BIT_HTGL,IDB_BIT_HTGL,IDB_BIT_HTGL);
m_Ddgl_btn.LoadPic(IDB_BIT_DDGL,IDB_BIT_DDGL,IDB_BIT_DDGL);
m_Ccgl_btn.LoadPic(IDB_BIT_CCGL,IDB_BIT_CCGL,IDB_BIT_CCGL);
m_Bmgl_btn.LoadPic(IDB_BIT_BMGL,IDB_BIT_BMGL,IDB_BIT_BMGL);
m_Wage_btn.LoadPic(IDB_BIT_GZGL,IDB_BIT_GZGL,IDB_BIT_GZGL);
m_Gzhz_btn.LoadPic(IDB_BIT_GZHZ,IDB_BIT_GZHZ,IDB_BIT_GZHZ);
m_Bmgl_btn.ShowWindow(SW_HIDE);
m_Htgl_btn.ShowWindow(SW_HIDE);
m_Jqgl_btn.ShowWindow(SW_HIDE);
m_Ccgl_btn.ShowWindow(SW_HIDE);
m_Xtbf_btn.ShowWindow(SW_HIDE);
m_Xthy_btn.ShowWindow(SW_HIDE);
m_Yhgl_btn.ShowWindow(SW_HIDE);
m_Qxgl_btn.ShowWindow(SW_HIDE);
m_Wage_btn.ShowWindow(SW_HIDE);
m_Gzhz_btn.ShowWindow(SW_HIDE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDMain::OnCancelMode() //
{
CDialog::OnCancelMode();
// TODO: Add your message handler code here
}
void CDMain::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
::SendMessage(this->GetSafeHwnd(),WM_SYSCOMMAND,SC_MOVE+HTCAPTION,0);
CDialog::OnLButtonDown(nFlags, point);
}
void CDMain::OnRsglBtn() //人事信息管理按钮函数
{
// TODO: Add your control notification handler code here
m_Rsda_btn.ShowWindow(SW_SHOW);
m_Kqgl_btn.ShowWindow(SW_SHOW);
m_Ygpx_btn.ShowWindow(SW_SHOW);
m_Zckh_btn.ShowWindow(SW_SHOW);
m_Ddgl_btn.ShowWindow(SW_SHOW);
m_Ygjc_btn.ShowWindow(SW_SHOW);
m_Lzlx_btn.ShowWindow(SW_SHOW);
m_Bmgl_btn.ShowWindow(SW_HIDE);
m_Htgl_btn.ShowWindow(SW_HIDE);
m_Jqgl_btn.ShowWindow(SW_HIDE);
m_Ccgl_btn.ShowWindow(SW_HIDE);
m_Xtbf_btn.ShowWindow(SW_HIDE);
m_Xthy_btn.ShowWindow(SW_HIDE);
m_Yhgl_btn.ShowWindow(SW_HIDE);
m_Qxgl_btn.ShowWindow(SW_HIDE);
m_Wage_btn.ShowWindow(SW_HIDE);
m_Gzhz_btn.ShowWindow(SW_HIDE);
m_Rsgl_btn.EnableWindow(false);
m_Gzsz_btn.EnableWindow(true);
m_Xtsz_btn.EnableWindow(true);
m_Yhsz_btn.EnableWindow(true);
m_Zhgl_btn.EnableWindow(true);
m_Gzsz_btn.EnableWindow(true);
m_Exit_btn.EnableWindow(true);
}
void CDMain::OnZhglBtn() //综合信息按钮函数
{
// TODO: Add your control notification handler code here
m_Rsda_btn.ShowWindow(SW_HIDE);
m_Kqgl_btn.ShowWindow(SW_HIDE);
m_Ygpx_btn.ShowWindow(SW_HIDE);
m_Zckh_btn.ShowWindow(SW_HIDE);
m_Ddgl_btn.ShowWindow(SW_HIDE);
m_Ygjc_btn.ShowWindow(SW_HIDE);
m_Lzlx_btn.ShowWindow(SW_HIDE);
m_Bmgl_btn.ShowWindow(SW_SHOW);
m_Htgl_btn.ShowWindow(SW_SHOW);
m_Jqgl_btn.ShowWindow(SW_SHOW);
m_Ccgl_btn.ShowWindow(SW_SHOW);
m_Wage_btn.ShowWindow(SW_HIDE);
m_Gzhz_btn.ShowWindow(SW_HIDE);
m_Xtbf_btn.ShowWindow(SW_HIDE);
m_Xthy_btn.ShowWindow(SW_HIDE);
m_Yhgl_btn.ShowWindow(SW_HIDE);
m_Qxgl_btn.ShowWindow(SW_HIDE);
m_Rsgl_btn.EnableWindow(true);
m_Xtsz_btn.EnableWindow(true);
m_Yhsz_btn.EnableWindow(true);
m_Zhgl_btn.EnableWindow(false);
m_Exit_btn.EnableWindow(true);
}
void CDMain::OnXtszBtn() //系统设置按钮函数
{
// TODO: Add your control notification handler code here
m_Rsda_btn.ShowWindow(SW_HIDE);
m_Kqgl_btn.ShowWindow(SW_HIDE);
m_Ygpx_btn.ShowWindow(SW_HIDE);
m_Zckh_btn.ShowWindow(SW_HIDE);
m_Ddgl_btn.ShowWindow(SW_HIDE);
m_Ygjc_btn.ShowWindow(SW_HIDE);
m_Lzlx_btn.ShowWindow(SW_HIDE);
m_Bmgl_btn.ShowWindow(SW_HIDE);
m_Htgl_btn.ShowWindow(SW_HIDE);
m_Jqgl_btn.ShowWindow(SW_HIDE);
m_Ccgl_btn.ShowWindow(SW_HIDE);
m_Wage_btn.ShowWindow(SW_HIDE);
m_Gzhz_btn.ShowWindow(SW_HIDE);
m_Xtbf_btn.ShowWindow(SW_SHOW);
m_Xthy_btn.ShowWindow(SW_SHOW);
m_Yhgl_btn.ShowWindow(SW_HIDE);
m_Qxgl_btn.ShowWindow(SW_HIDE);
m_Rsgl_btn.EnableWindow(true);
m_Xtsz_btn.EnableWindow(false);
m_Yhsz_btn.EnableWindow(true);
m_Gzsz_btn.EnableWindow(true);
m_Zhgl_btn.EnableWindow(true);
m_Exit_btn.EnableWindow(true);
}
void CDMain::OnYhszBtn() //用户设置按钮函数
{
// TODO: Add your control notification handler code here
m_Rsda_btn.ShowWindow(SW_HIDE);
m_Kqgl_btn.ShowWindow(SW_HIDE);
m_Ygpx_btn.ShowWindow(SW_HIDE);
m_Zckh_btn.ShowWindow(SW_HIDE);
m_Ddgl_btn.ShowWindow(SW_HIDE);
m_Ygjc_btn.ShowWindow(SW_HIDE);
m_Lzlx_btn.ShowWindow(SW_HIDE);
m_Bmgl_btn.ShowWindow(SW_HIDE);
m_Htgl_btn.ShowWindow(SW_HIDE);
m_Jqgl_btn.ShowWindow(SW_HIDE);
m_Ccgl_btn.ShowWindow(SW_HIDE);
m_Xtbf_btn.ShowWindow(SW_HIDE);
m_Xthy_btn.ShowWindow(SW_HIDE);
m_Wage_btn.ShowWindow(SW_HIDE);
m_Gzhz_btn.ShowWindow(SW_HIDE);
m_Yhgl_btn.ShowWindow(SW_SHOW);
m_Qxgl_btn.ShowWindow(SW_SHOW);
m_Rsgl_btn.EnableWindow(true);
m_Xtsz_btn.EnableWindow(true);
m_Yhsz_btn.EnableWindow(false);
m_Zhgl_btn.EnableWindow(true);
m_Gzsz_btn.EnableWindow(true);
m_Exit_btn.EnableWindow(true);
}
void CDMain::OnExitBtn() //系统退出
{
// TODO: Add your control notification handler code here
m_Rsgl_btn.EnableWindow(true);
m_Xtsz_btn.EnableWindow(true);
m_Yhsz_btn.EnableWindow(true);
m_Zhgl_btn.EnableWindow(true);
m_Gzsz_btn.EnableWindow(true);
m_Exit_btn.EnableWindow(true);
if(MessageBox("确定要退出系统吗?","系统提示",MB_OKCANCEL|MB_ICONQUESTION)!=1)
return;
this->OnCancel();
try{
theApp.m_pMainWnd->DestroyWindow();
}
catch(...)
{
}
}
void CDMain::OnRsdnBtn() //员工档案信息函数080925XLW
{
// TODO: Add your control notification handler code here
RxRecordset brst;
CString sName,stime;
CTime ttime;
brst.Open("员工信息视图");
sName="员工信息表";
ttime=ttime.GetCurrentTime();
stime=CTimeToCString(ttime);
m_ps.MainCaption=sName;
m_ps.DeckCaptionNumber=2;
ttime=ttime.GetCurrentTime();
stime=CTimeToCString(ttime);
m_ps.DeckCaptionFontSize=180;
m_ps.MainCaptionFontSize=400;
m_ps.DeckCaptions[0]="日期:"+stime;
m_ps.DeckCaptions[1]="操作员:"+OP;
CDBaseQuery dlg;
CStaffInfo nextdlg;
dlg.Show("员工档案信息查询","员工信息视图",&nextdlg,m_ps);
// CStaffInfo dlg;
dlg.DoModal();
}
void CDMain::OnZckhBtn() //员工职称考核评定管理函数080925XLW
{
// TODO: Add your control notification handler code here
RxRecordset brst;
CString sName,stime;
CTime ttime;
brst.Open("员工职称评定考核视图");//打开视图
sName="员工职称评定考核信息表";/////////
ttime=ttime.GetCurrentTime();
stime=CTimeToCString(ttime);
m_ps.MainCaption=sName;///////////////
m_ps.DeckCaptionNumber=2;
ttime=ttime.GetCurrentTime();
stime=CTimeToCString(ttime);
m_ps.DeckCaptionFontSize=180;
m_ps.MainCaptionFontSize=400;
m_ps.DeckCaptions[0]="日期:"+stime;
m_ps.DeckCaptions[1]="操作员:"+OP;
CDBaseQuery dlg;
CCEvaluationInfo nextdlg;
dlg.Show("员工职称评定考核基本信息","员工职称评定考核视图",&nextdlg,m_ps);
dlg.DoModal();
}
void CDMain::OnLzlxBtn() //员工离职退休管理080925XLW
{
// TODO: Add your control notification handler code here
RxRecordset brst;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -