Files

226 lines
6.5 KiB
C++

#if !defined(AFX_CLIENTSDLG_H__8983F421_114C_11D4_964F_00C0F02C4B69__INCLUDED_)
#define AFX_CLIENTSDLG_H__8983F421_114C_11D4_964F_00C0F02C4B69__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ClientsDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CClientsDlg dialog
#include "gzcombo.h"
#include "gzrset.h"
#include "label.h"
#include "statusdlg.h"
#include "ResizeCtrl.h"
#include "afxwin.h"
#include "defaultsdlg.h"
class CClientsDlg : public CDialog
{
// Construction
public:
CResizeCtrl m_resize;
bool EditPrompt();
bool m_bEditPrompt;
void FillRatesLists();
void Security();
bool m_bReadOnly;
CString m_strForceSelection;
void SetDefaults();
~CClientsDlg();
bool FillHeadOfficeList();
void BlankAllFields(bool bSetDefaults,bool bEnable);
CString m_strSelectedClient;
void SetReturnString(CString *ret);
//Save fields
bool SaveField(CEdit* edControl,CString fldname,bool AllowEmpty);
bool SaveField(CgzCombo* cbControl,CString fldname);
bool SaveField(CButton* ckControl,CString fldname);
bool SaveField(CDateTimeCtrl* dtControl,CString fldname);
bool UpdateModified();
//-------------------------------
bool FillContractList();
bool FillTechList();
bool FillZoneList();
bool FillFields();
bool AddRecord(bool IsHeadOffice);
bool RefreshDisplay(int dMode/*0=standard 1=headoffice 2=add*/);
bool FillClientList();
bool m_bAddMode;
CClientsDlg(CWnd* pParent = NULL); // standard constructor
CSpApp* m_pApp;
GZRset* rs;
GZRset* rs2;
CString * m_pstrReturnValue;
// Dialog Data
//{{AFX_DATA(CClientsDlg)
enum { IDD = IDD_CLIENTS };
CButton m_btnNotes;
CButton m_btnDone;
CEdit m_edAcctNum;
CgzCombo m_cbDefTravelRate;
CgzCombo m_cbRate;
CButton m_btnPM;
CLabel m_lblHist;
CLabel m_lblZone;
CgzCombo m_cbZone;
CButton m_ckBillHead;
CLabel m_lblAlert;
CEdit m_edAlert;
CStatic m_lblTechNotes;
CEdit m_edTechNotes;
CStatic m_lblStreet;
CEdit m_edStreet;
CStatic m_lblStateProv;
CEdit m_edStateProv;
CLabel m_lblPreferTech;
CgzCombo m_cbPreferTech;
CStatic m_lblPostal;
CEdit m_edPostal;
CStatic m_lblPhone;
CEdit m_edPhone;
CStatic m_lblMail;
CEdit m_edMail;
CStatic m_lblLast;
CEdit m_edLast;
CStatic m_lblHeadOffice;
CgzCombo m_cbHeadOffice;
CStatic m_lblGenNotes;
CEdit m_edGenNotes;
CStatic m_lblFirst;
CEdit m_edFirst;
CStatic m_lblFax;
CEdit m_edFax;
CStatic m_lblExtension;
CEdit m_edExtension;
CLabel m_lblEmail;
CEdit m_edEmail;
CButton m_btnDelete;
CStatic m_lblCountry;
CEdit m_edCountry;
CLabel m_lblContract;
CStatic m_lblContractExpiry;
CDateTimeCtrl m_dtContractExpiryDate;
CgzCombo m_cbContract;
CButton m_btnConsolidate;
CStatic m_lblCompany;
CEdit m_edCompany;
CStatic m_lblCity;
CEdit m_edCity;
CButton m_btnAddHead;
CButton m_btnAdd;
CButton m_ckShowHeadOfficeCheck;
CStatic m_lblClientListLabel;
CgzCombo m_cbClientList;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClientsDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CClientsDlg)
virtual BOOL OnInitDialog();
afx_msg void OnCloseupClientlist();
afx_msg void OnHeadoffice();
afx_msg void OnCloseupContract();
afx_msg void OnDelete();
afx_msg void OnAdd();
afx_msg void OnAddhead();
virtual void OnOK();
afx_msg void OnKillfocusFirstname();
afx_msg void OnKillfocusCompany();
afx_msg void OnKillfocusLastname();
afx_msg void OnKillfocusMailaddress();
afx_msg void OnKillfocusStreet();
afx_msg void OnKillfocusCity();
afx_msg void OnKillfocusStateprovince();
afx_msg void OnKillfocusPostal();
afx_msg void OnKillfocusCountry();
afx_msg void OnKillfocusPhone();
afx_msg void OnKillfocusExtension();
afx_msg void OnKillfocusEmail();
afx_msg void OnKillfocusFax();
afx_msg void OnCloseupHeadofficepicker();
afx_msg void OnBillhead();
afx_msg void OnKillfocusTechnotes();
afx_msg void OnKillfocusGeneralnotes();
afx_msg void OnCloseupZone();
afx_msg void OnCloseupPrefertech();
afx_msg void OnDatetimechangeContractexpirydate(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnKillfocusAlert();
afx_msg void OnZonelabel();
afx_msg void OnContractlabel();
afx_msg void OnHistory();
afx_msg void OnBtnpm();
afx_msg void OnCloseupCbdefrate();
afx_msg void OnCloseupCbdeftravel();
afx_msg void OnBtnnotes();
afx_msg void OnConsolidate();
afx_msg void OnBtndone();
afx_msg void OnKillfocusEdacctnum();
afx_msg void OnClientsAras();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnNewClientrecord();
afx_msg void OnUpdateNewClientrecord(CCmdUI *pCmdUI);
afx_msg void OnNewHeadofficerecord();
afx_msg void OnUpdateNewHeadofficerecord(CCmdUI *pCmdUI);
afx_msg void OnEditDeletethisrecord();
afx_msg void OnUpdateEditDeletethisrecord(CCmdUI *pCmdUI);
afx_msg void OnEditConsolidatetwoclientstogether();
afx_msg void OnUpdateEditConsolidatetwoclientstogether(CCmdUI *pCmdUI);
afx_msg void OnUpdateClientsAras(CCmdUI *pCmdUI);
afx_msg void OnToolsOpenclientnotebook();
afx_msg void OnUpdateToolsOpenclientnotebook(CCmdUI *pCmdUI);
afx_msg void OnToolsSchedulepreventivemaintenanceforthisclient();
afx_msg void OnUpdateToolsSchedulepreventivemaintenanceforthisclient(CCmdUI *pCmdUI);
afx_msg void OnToolsDisplayrecordhistory();
afx_msg void OnUpdateToolsDisplayrecordhistory(CCmdUI *pCmdUI);
afx_msg void OnClosethisscreen();
afx_msg void OnUpdateClosethisscreen(CCmdUI *pCmdUI);
afx_msg void OnClientMenuHelp();
void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu);
// User is allowed into PM?
bool m_bPMAllowed;
CEdit m_edPhone2;
CEdit m_edPhone3;
afx_msg void OnEnKillfocusPhone2();
afx_msg void OnEnKillfocusPhone3();
afx_msg void OnEmaillabel();
afx_msg void OnToolsSetaddressdefaults();
CgzCombo m_cbUnits;
CLabel m_lblUnits;
void FillUnitList(void);
afx_msg void OnStnClickedLblUnits();
private:
CString m_strDefaultCity;
CString m_strDefaultStateProv;
CString m_strDefaultPostal;
CString m_strDefaultCountry;
long lPreferredTech;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLIENTSDLG_H__8983F421_114C_11D4_964F_00C0F02C4B69__INCLUDED_)