123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- // SelWaiter2.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ylgl.h"
- #include "SelWaiter2.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // SelWaiter2 dialog
- SelWaiter2::SelWaiter2(CWnd* pParent /*=NULL*/)
- : CDialog(SelWaiter2::IDD, pParent)
- {
- //{{AFX_DATA_INIT(SelWaiter2)
- beginno = 0;
- //}}AFX_DATA_INIT
- }
- void SelWaiter2::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(SelWaiter2)
- DDX_Control(pDX, IDC_COMBOwaiter1, m_combowaiter1);
- DDX_Control(pDX, IDC_COMBOwaiter2, m_combowaiter2);
- DDX_Control(pDX, IDC_COMBOwaiter12, m_combowaiter12);
- DDX_Control(pDX, IDC_COMBOwaiter22, m_combowaiter22);
- DDX_Text(pDX, IDC_EDIT1, beginno);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(SelWaiter2, CDialog)
- //{{AFX_MSG_MAP(SelWaiter2)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // SelWaiter2 message handlers
- BOOL SelWaiter2::OnInitDialog()
- {
- CDialog::OnInitDialog();
- #ifdef CHILD_VERSION
- GetDlgItem(IDC_STATIC1)->SetWindowText("引导师:");
- #endif
- // TODO: Add extra initialization here
- int pos=m_combowaiter1.FindString (0, waiter1);
- if(pos==-1)
- {
- m_combowaiter1.InsertString (0, waiter1);
- m_combowaiter1.SetCurSel (0);
- }
- else
- m_combowaiter1.SetCurSel (pos);
-
- pos=m_combowaiter12.FindString (0, waiter12);
- if(pos==-1)
- {
- m_combowaiter12.InsertString (0, waiter12);
- m_combowaiter12.SetCurSel (0);
- }
- else
- m_combowaiter12.SetCurSel (pos);
- pos=m_combowaiter2.FindString (0, waiter2);
- if(pos==-1)
- {
- m_combowaiter2.InsertString (0, waiter2);
- m_combowaiter2.SetCurSel (0);
- }
- else
- m_combowaiter2.SetCurSel (pos);
- pos=m_combowaiter22.FindString (0, waiter22);
- if(pos==-1)
- {
- m_combowaiter22.InsertString (0, waiter22);
- m_combowaiter22.SetCurSel (0);
- }
- else
- m_combowaiter22.SetCurSel (pos);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void SelWaiter2::OnOK()
- {
- // TODO: Add extra validation here
- int pos=m_combowaiter1.GetCurSel ();
- if(pos!=-1)
- {
- m_combowaiter1.GetLBText (pos, waiter1);
- if ( waiter1 == "" )
- {
- AfxMessageBox("摄影师为必选项!");
- return;
- }
- }
- pos=m_combowaiter12.GetCurSel ();
- if(pos!=-1)
- {
- m_combowaiter12.GetLBText (pos, waiter12);
- }
- pos=m_combowaiter2.GetCurSel ();
- if(pos!=-1)
- {
- m_combowaiter2.GetLBText (pos, waiter2);
- if ( waiter2 == "" )
- {
-
- #ifdef CHILD_VERSION
- AfxMessageBox("引导师为必选项!");
- #else
- AfxMessageBox("化妆师为必选项!");
- #endif
- return;
- }
- }
- pos=m_combowaiter22.GetCurSel ();
- if(pos!=-1)
- {
- m_combowaiter22.GetLBText (pos, waiter22);
- }
- CDialog::OnOK();
- }
|