#if !defined(AFX_WOHEADERDLG_H__CA8D53C7_2FB6_11D4_964F_00C0F02C4B69__INCLUDED_) #define AFX_WOHEADERDLG_H__CA8D53C7_2FB6_11D4_964F_00C0F02C4B69__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // WOHeaderDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CWOHeaderDlg dialog #include "gzcombo.h" #include "gzrset.h" #include "label.h" #include "gzlistbox.h" #define LICENSE_REGISTERED 0x0020//100000 class CWOHeaderDlg : public CDialog { // Construction public: //Added 07/26/2001 to support multi tech scheduling COleDateTime m_dtSchedStart1; COleDateTime m_dtSchedStart2; COleDateTime m_dtSchedStart3; COleDateTime m_dtSchedStart4; COleDateTime m_dtSchedStop1; COleDateTime m_dtSchedStop2; COleDateTime m_dtSchedStop3; COleDateTime m_dtSchedStop4; //------------------------------------------------- long m_lSchedTech1; long m_lSchedTech2; long m_lSchedTech3; long m_lSchedTech4; int m_nSelectedTechNumber; void LayoutControls(); CString m_strTechNotes; void ShowGroup(int nGroup); CString m_strSelectedStatus; void DisplayContactInfo(); void UpdateClosedOpen(); void PrintFinalWorkorder(CString strReport); void PrintDispatchWorkorder(); COleDateTime m_oledtPresetStartDate; COleDateTime m_oledtPresetEndDate; void Flush(bool bClose); bool m_bShowEstimates; void FillEstRatesList(); bool bModified; void EnableSched(bool bEnable); void Check4Contract(bool bAlert); CString m_strClientContractID; ~CWOHeaderDlg(); bool m_bIsOpen; void Security(); void FillProblemList(); void FillFields(); void SaveEndDate(); //10/12/2002 modified to fix //problem where when changing only start time //the end date was changing as well void SaveStartDate(bool bResetEndDate=true); CString m_strSelClient; CString m_strSelCategory; CString m_strSelProject; CString m_strSelTech; bool CreateWorkorder(); void FillPickLists(); CString m_strWorkorderID; void SetWorkorderID(CString strWorkorderID); bool m_bAddMode; CWOHeaderDlg(CWnd* pParent = NULL); // standard constructor CSpApp* m_pApp; //The Extra recordset is for filling combo boxes GZRset* rs; GZRset* cbrs; GZRset* rsPrint; GZRset* rsSubPrint; //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(); //------------------------------- // Dialog Data //{{AFX_DATA(CWOHeaderDlg) enum { IDD = IDD_WOHEADER }; CButton m_radTech4; CButton m_radTech3; CButton m_radTech2; CButton m_grpSchedTechGroup; CButton m_radTech1; CStatic m_lblTroulbleReported; CStatic m_lblTroubleFound; CStatic m_lblActionTaken; CEdit m_edTroubleReported; CEdit m_edTroubleFound; CEdit m_edActionTaken; CStatic m_lblProbsList; CLabel m_lblTechNotes; CLabel m_lblHist; CLabel m_lblStatus; CStatic m_lblRefNumber; CStatic m_lblQuickDescription; CStatic m_lblOurRef; CStatic m_lblInvoice; CStatic m_lblContact; CLabel m_lblGroup2; CLabel m_lblGroup1; CEdit m_edOurRefNum; CgzCombo m_cbStatus; CLabel m_lblContactInfo; CEdit m_edClientContact; CEdit m_edClientRefNum; CStatic m_lblEstRate; CStatic m_lblEstHours; CEdit m_edEstHours; CgzCombo m_cbEstRate; CStatic m_lbls6; CStatic m_lbls5; CStatic m_lbls4; CStatic m_lbls3; CStatic m_lbls2; CButton m_ckAnyTime; CLabel m_lblContract; CLabel m_lblTechs; CEdit m_edStartTime; CEdit m_edEndTime; CDateTimeCtrl m_dtEndDate; CgzListBox m_lbProblems; CLabel m_lblProjects; CLabel m_lblFind; CEdit m_edNotes; CEdit m_edInvoice; CDateTimeCtrl m_dtSchedDate; CLabel m_lblClients; CButton m_ckOnsite; CgzCombo m_cbSchedTechList; CgzCombo m_cbProjects; CgzCombo m_cbClients; CgzCombo m_cbCategories; CLabel m_lblCategories; CButton m_btnEditProblem; CButton m_btnDeleteProblem; CButton m_btnAddProblem; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CWOHeaderDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CWOHeaderDlg) virtual BOOL OnInitDialog(); afx_msg void OnLblfind(); afx_msg void OnBtnaddprob(); afx_msg void OnBtndeleteprob(); afx_msg void OnBtneditprobs(); afx_msg void OnCategorylistlabel(); afx_msg void OnCloseupCbcategory(); afx_msg void OnCloseupCbclients(); afx_msg void OnCloseupCbprojects(); afx_msg void OnCloseupCbschedtechlist(); afx_msg void OnCkonsite(); afx_msg void OnClientlistLabel(); afx_msg void OnKillfocusDtscheddate(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnKillfocusEdinvoice(); afx_msg void OnKillfocusEdwonotes(); afx_msg void OnLblprojects(); afx_msg void OnDblclkLbprobs(); afx_msg void OnKillfocusEdschedstarttime(); afx_msg void OnKillfocusEdschedendtime(); afx_msg void OnKillfocusDtschedenddate(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDatetimechangeDtscheddate(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDatetimechangeDtschedenddate(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnLblcontract(); afx_msg void OnCkanytime(); afx_msg void OnKillfocusEdclientcontact(); afx_msg void OnKillfocusEdclientrefnum(); afx_msg void OnStanwoDone(); afx_msg void OnStanwoDelete(); afx_msg void OnStanwoPrintDispatch(); afx_msg void OnStanwoPrintBrief(); afx_msg void OnStanwoPrintDetailed(); afx_msg void OnStanwoCostatus(); afx_msg void OnKillfocusEdesthours(); afx_msg void OnCloseupCbestrate(); afx_msg void OnCloseupCbstatus(); afx_msg void OnKillfocusEdourrefnumber(); afx_msg void OnLblGroup1(); afx_msg void OnLblGroup2(); afx_msg void OnStanwoClientnotes(); afx_msg void OnLblstatus(); afx_msg void OnLblhistory(); afx_msg void OnLbltechnotes(); afx_msg void OnKillfocusEdactiontaken(); afx_msg void OnKillfocusEdtroublefound(); afx_msg void OnKillfocusEdtroublereported(); afx_msg void OnTec1(); afx_msg void OnTec2(); afx_msg void OnTec3(); afx_msg void OnTec4(); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: bool m_bReadOnly; void ShowSchedTech(); afx_msg void OnPrintReport( UINT nID ); public: long m_lClientDefaultRate; void FillReportList(void); CMenu* m_pSubMenu; bool m_bShowQueriesOnPrint; bool m_bAlertPopup; // Convert a float to ascii preserving locale format // Convert a float to ascii preserving locale format CString FtoA(float fData) { _variant_t vItem(fData); _bstr_t bs; VarFormatNumber(&vItem,-1,-2,-2,-2,0,bs.GetAddress()); return CString((BSTR)bs); } // Extra details to show in trial version CLabel m_lblTrialDetails; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_WOHEADERDLG_H__CA8D53C7_2FB6_11D4_964F_00C0F02C4B69__INCLUDED_)