151 lines
3.7 KiB
C++
151 lines
3.7 KiB
C++
#if !defined(AFX_STAT_H__B3971464_FC37_11D3_964F_00C0F02C4B69__INCLUDED_)
|
|
#define AFX_STAT_H__B3971464_FC37_11D3_964F_00C0F02C4B69__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// STAT.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// STAT form view
|
|
|
|
#ifndef __AFXEXT_H__
|
|
#include <afxext.h>
|
|
#endif
|
|
|
|
|
|
#include "reportctrl.h"
|
|
#include "gzcombo.h"
|
|
#include "gzrset.h"
|
|
#include "label.h"
|
|
#include "GetStringDlg.h"
|
|
#include "DispatchView.h"
|
|
#include "WOHeaderDlg.h"
|
|
#include "SimpleWODlg.h"
|
|
#include "DispatchFieldsDlg.h"
|
|
//Last modified 07/30/2001
|
|
//COLUMNMOD
|
|
#define STATCOLUMNCOUNT 20
|
|
|
|
class STAT : public CFormView
|
|
{
|
|
public:
|
|
STAT(); // protected constructor used by dynamic creation
|
|
DECLARE_DYNCREATE(STAT)
|
|
BOOL bColumnSortAsc[STATCOLUMNCOUNT];
|
|
bool FirstRun;
|
|
CString m_strQuery;
|
|
CString m_strSelectedView;
|
|
void FillViewList();
|
|
void DisplayColumns();
|
|
int m_nFldCount;
|
|
CDispatchView dv;
|
|
|
|
|
|
bool m_bShowDescription;
|
|
void FillView();
|
|
|
|
CSpApp* m_pApp;
|
|
CImageList m_ilReport;
|
|
void OnRvnItemDbClick(NMHDR* pNMHDR, LRESULT* pResult);
|
|
void OnRvnItemClick(NMHDR* pNMHDR, LRESULT* pResult);
|
|
void OnRvnItemDrawPreview(NMHDR* pNMHDR, LRESULT* pResult);
|
|
void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
|
|
//The Extra recordset is for filling combo boxes
|
|
GZRset* rs;
|
|
GZRset* cbrs;
|
|
GZRset* brs;//used for gathering briefs from woprobs
|
|
GZRset* rsPrint;
|
|
CStringList lsNotes;
|
|
// Form Data
|
|
public:
|
|
//{{AFX_DATA(STAT)
|
|
enum { IDD = IDD_STAT_FORM };
|
|
CButton m_btnClientNotes;
|
|
CButton m_btnRefresh;
|
|
CButton m_btnNewSTWO;
|
|
CButton m_btnNewQWO;
|
|
CButton m_btnEditWO;
|
|
CButton m_btnPrint;
|
|
CLabel m_lblContactInfo;
|
|
CEdit m_edWONumber;
|
|
CgzCombo m_cbViews;
|
|
CLabel m_lblChooseDisplayFields;
|
|
CLabel m_lblSaveView;
|
|
CLabel m_lblDeleteView;
|
|
CReportCtrl m_rc;
|
|
//}}AFX_DATA
|
|
protected:
|
|
|
|
// Attributes
|
|
public:
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(STAT)
|
|
public:
|
|
virtual void OnInitialUpdate();
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
public:
|
|
|
|
void DoHelp();
|
|
|
|
void DeActivate();
|
|
void Activate();
|
|
virtual ~STAT();
|
|
#ifdef _DEBUG
|
|
virtual void AssertValid() const;
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
#endif
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(STAT)
|
|
afx_msg void OnBtndone();
|
|
afx_msg void OnLblsaveview();
|
|
afx_msg void OnLbldeleteview();
|
|
afx_msg void OnLblchoosefields();
|
|
afx_msg void OnCloseupCbviews();
|
|
afx_msg void OnBtnnewwo();
|
|
afx_msg void OnBtnnewqwo();
|
|
afx_msg void OnBtnprint();
|
|
afx_msg void OnBtneditwonum();
|
|
afx_msg void OnBtnrefresh();
|
|
afx_msg void OnBtnclientnotes();
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
private:
|
|
|
|
int m_nCX;
|
|
CRect rectStat;
|
|
|
|
void LayoutControls();
|
|
public:
|
|
|
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
|
// Fetches useful stats from database do display at top
|
|
void GetStats(void);
|
|
// true if there are new stats to display else false if none
|
|
bool m_bFreshStatsAwait;
|
|
private:
|
|
// Stats to display at top display area where address normally displays for clicked workorder item
|
|
CString m_strStats;
|
|
public:
|
|
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_STAT_H__B3971464_FC37_11D3_964F_00C0F02C4B69__INCLUDED_)
|