}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CVar6View message handlersCVar6View::OnAdd()
{
// TODO: Add your control notification handler code hereDoc* pDoc = GetDocument();(pDoc->GetTitle() == "Products")
{productDlg;.DoModal();((productDlg.m_productname != "") && (productDlg.m_productcena != ""))
{>list.Add("Изделие: " + productDlg.m_productname + ", Цена:" + productDlg.m_productcena);>SetModifiedFlag(TRUE);
}
}(pDoc->GetTitle() == "Clients")
{clientDlg;.DoModal();(clientDlg.m_name != "")
{>list.Add(clientDlg.m_name);>SetModifiedFlag(TRUE);
}
}(pDoc->GetTitle() == "Tickets")
{ticketDlg;.DoModal();
if ((ticketDlg.m_client != "") && (ticketDlg.m_product != ""))
{>list.Add("Клиент: " + ticketDlg.m_client + ", " + ticketDlg.m_product);>SetModifiedFlag(TRUE);
}
}();
}CVar6View::OnDelete()
{
// TODO: Add your control notification handler code hereDoc* pDoc = GetDocument();index = m_l.GetCurSel();(index >= 0)
{>list.RemoveAt(index, 1);>SetModifiedFlag(TRUE);
}();
}
Var6View.h
// var6View.h : interface of the CVar6View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VAR6VIEW_H__E7C3E0C9_B192_410D_A7AC_F227B9013406__INCLUDED_)
#define AFX_VAR6VIEW_H__E7C3E0C9_B192_410D_A7AC_F227B9013406__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000CVar6View : public CFormView
{: // create from serialization onlyView();_DYNCREATE(CVar6View):
//{{AFX_DATA(CVar6View){ IDD = IDD_VAR6_FORM };_l;
//}}AFX_DATA
// Attributes:Doc* GetDocument();list;
// Operations:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CVar6View):BOOL PreCreateWindow(CREATESTRUCT& cs);:void DoDataExchange(CDataExchange* pDX); // DDX/DDV supportvoid OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation:~CVar6View();
#ifdef _DEBUGvoid AssertValid() const;void Dump(CDumpContext& dc) const;
#endif:
// Generated message map functions:
//{{AFX_MSG(CVar6View)_msg void OnAdd();_msg void OnDelete();
//}}AFX_MSG_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in var6View.cpp
inline CVar6Doc* CVar6View::GetDocument()
{ return (CVar6Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VAR6VIEW_H__E7C3E0C9_B192_410D_A7AC_F227B9013406__INCLUDED_)