, , , , , . .

 

 

!

 

:

:

 

 

 

?

StudentHelp, , MS Word. , , antiplagiat.ru, etxt.ru advego.ru. StudentHelp , Word .


:


:

: . : 09.07.2012. : 2010. : 46. antiplagiat.ru: < 30%

():








-
-










Ƞ




230201 -




:
3671
:
. ..













. -
2009
:

腅...3
:
CIndex.........4
CKodd5
CKodd.8
CFilesDlg..10
CKoddDobDlg.12
CKoddProsm....15
CKoddPoisk.....19
CKolvoDobDlg...24
CKolvoProsm.26
CKolvoPoisk...30
CVedomDlg...34
..38































: , , , . : , , . , .



, :
1)
. . . .
2)
:
      (, ) , , , , ( );
      - .
: ࠫ - , , , - ; - , -, .
: ࠫ - , , , - , - , .
3) (): IBM PC, Pentium, 32 , Win32.
4) :
      - , ;
      - ( /);
      -; Visual C++ 8;
      Visual C++ Visual Studio .NET 2005.

CIndex

Index.h
#ifndef index_h
#define index_h
#include <string.h>
const int max_mass=1000;
class Cindex//
{
public:
int kol; //
int fact_kol; //
private:
struct tip_index
{
CString kluch;
int nomer;
} index[max_mass];
public:
Cindex();
~Cindex();
int razm_zap;
void init_ind(int,CString);
void init_kol(int);
int dob_ind(CString);
int poisk_ind(CString,int,int&);
void cor_ind(int,CString);
};
#endif

Index.cpp
#include "stdafx.h"
#include "Kurs.h"
#include "Index.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

Cindex::Cindex()
{
}
Cindex::~Cindex()
{
}
void Cindex::init_ind(int i,CString kl)
{
index[i].kluch=kl;
index[i].nomer=i;
return;
}
void Cindex::init_kol(int k)
{
kol=k;
}
int Cindex::dob_ind(CString kl)
{
int nom;
for (int i=0;i<kol;i++)
if (index[i].kluch=="")
{
index[i].kluch=kl;
return(index[i].nomer);
}
index[kol].kluch=kl;
index[kol].nomer=kol;
nom=kol;
kol++;
return(nom);
}
int Cindex::poisk_ind(CString kl,int i,int& nomer)
{
while (i<kol)
{
if (index[i].kluch!="")
{
if (kl==index[i].kluch)
{
nomer=index[i].nomer;
return(i);
}
}
i++;
}
return(-1);
}
void Cindex::cor_ind(int i,CString kl)
{
index[i].kluch=kl;
return;
}

CKodd

Kodd.h
#ifndef Kodd_h
#define Kodd_h
#include "Index.h"
class CKodd : public Cindex
{
public:
CString NumKodd; //10
CString Kod; //10
CString Naim; //10
CString Kolvod; //10
public:
void ZapisZap(int nomer);//
void ChtenieZap(int nomer);//
void Sozdanie();//
void Init(); //
void Udalenie(int nomer);//
void Zamena(int nomer);//
CKodd();
virtual ~CKodd();
};
#endif


Kodd.cpp
#include "stdafx.h"
#include "Kurs.h"
#include "Kodd.h"
extern CString KoddFile; //.
CKodd::CKodd()
{
NumKodd="";
Kod="";
Naim="";
Kolvod="";
fact_kol=0;
}
CKodd::~CKodd()
{
}
void CKodd::Zamena(int nomer)
{
ZapisZap(nomer);
cor_ind(nomer,NumKodd);
}
void CKodd::Udalenie(int nomer)
{
NumKodd="";
ZapisZap(nomer);
cor_ind(nomer,NumKodd);
}
void CKodd::Init() //
{
int pr=0; //
int i=0;//
CFile file(KoddFile, CFile::modeRead|CFile::modeCreate |CFile::
modeNoTruncate);// .,
DWORD nom;//32-
nom=file.GetLength(); //
nom=nom/40; //nom- , 35-
file.Close();
for(i=0;i<int(nom);i++)
{
ChtenieZap(i); //
init_ind(i,NumKodd); //
if (NumKodd!="")
{
fact_kol++;
pr=1;//
}
}
init_kol(nom);
return;
}
void CKodd::Sozdanie()// . -
{
int nom;
nom=dob_ind(NumKodd);// .
ZapisZap(nom); //
return;
}
void CKodd::ChtenieZap(int nomer)//
{//
CFile file(KoddFile, CFile::modeRead | CFile::modeNoTruncate);
char buf[10]; // .,
try//
{
file.Seek(nomer*40,CFile::begin);
file.Read(buf,10);
NumKodd=CString(buf);
file.Read(buf,10);
Kod=CString(buf);
file.Read(buf,10);
Naim=CString(buf);
file.Read(buf,10);
Kolvod=CString(buf);
}
catch (CFileException *e) //
{
char pMsg[255];
if(e->GetErrorMessage(pMsg,255))//
AfxMessageBox(pMsg); //.
}
file.Close();
return;
}
void CKodd::ZapisZap(int nomer) //
{
CFile file(KoddFile, CFile::modeWrite|CFile::modeCreate|
CFile:: modeNoTruncate);
try
{
file.Seek(nomer*40,CFile::begin);
file.Write(LPCTSTR(NumKodd),10);//
file.Write(LPCTSTR(Kod),10);
file.Write(LPCTSTR(Naim),10);
file.Write(LPCTSTR(Kolvod),10);
}
catch (CFileException *e)
{
char pMsg[255];
if(e->GetErrorMessage(pMsg,255))
AfxMessageBox(pMsg);
}
file.Close();
return;
}


CKolvo

Kolvo.h
// Kolvo.h
#ifndef Kolvo_h
#define Kolvo_h
#include "Index.h"
class CKolvo : public Cindex
{
public:
CString Kod; //5
CString Kolvo; //10
CString Naim2; //10
public:
void Udalenie(int nomer);
void Zamena(int nomer);
void Init();
void Sozdanie();
void ChtenieZap(int nomer);
void ZapisZap(int nomer);
CKolvo();
virtual ~CKolvo();
};
#endif



Kolvo.cpp
// Kolvo.cpp
#include "stdafx.h"
#include "Kurs.h"
#include "Kolvo.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
extern CString KolvoFile;
CKolvo::CKolvo()
{
Kod="";
Kolvo="";
Naim2="";
fact_kol=0;
}
CKolvo::~CKolvo()
{

}
void CKolvo::ZapisZap(int nomer)
{
CFile file(KolvoFile, CFile::modeWrite|CFile::modeCreate|
CFile::modeNoTruncate);
try
{
file.Seek(nomer*25,CFile::begin);
file.Write(LPCTSTR(Kod),5);
file.Write(LPCTSTR(Kolvo),10);
file.Write(LPCTSTR(Naim2),10);
}
catch (CFileException *e)
{
char pMsg[255];
if(e->GetErrorMessage(pMsg,255))
AfxMessageBox(pMsg);
}
file.Close();
return;
}
void CKolvo::ChtenieZap(int nomer)
{
CFile file(KolvoFile, CFile::modeRead | CFile::modeNoTruncate);
char buf[10];
try
{
file.Seek(nomer*25,CFile::begin);
file.Read(buf,5);
Kod=CString(buf);
file.Read(buf,10);
Kolvo=CString(buf);
file.Read(buf,10);
Naim2=CString(buf);
}
catch (CFileException *e)
{
char pMsg[255];
if(e->GetErrorMessage(pMsg,255))
AfxMessageBox(pMsg);
}
file.Close();
return;
}
void CKolvo::Sozdanie()
{
int nom;
nom=dob_ind(Kod);
ZapisZap(nom);
return;
}
void CKolvo::Init()
{
int pr=0;
int i=0;
CFile file (KolvoFile, CFile::modeRead|CFile::modeCreate|
CFile::modeNoTruncate);
DWORD nom;
nom=file.GetLength();
nom=nom/25;
file.Close();
for(i=0;i<int(nom);i++)
{
ChtenieZap(i);
init_ind(i,Kod);
if (Kod!="")
{
fact_kol++;
pr=1;
}
}
init_kol(nom);
return;
}
void CKolvo::Zamena(int nomer)
{
ZapisZap(nomer);
cor_ind(nomer,Kod);
}
void CKolvo::Udalenie(int nomer)
{
Kod="";
Kolvo="";
Naim2="";
ZapisZap(nomer);
cor_ind(nomer,Kod);
cor_ind(nomer,Kolvo);
cor_ind(nomer,Naim2);
}



CFilesDlg

FilesDlg.h
#if !defined(AFX_FILESDLG_H__D4C2D396_ABD6_4172_B132_3223FC2A6466__INCLUDED_)
#define AFX_FILESDLG_H__D4C2D396_ABD6_4172_B132_3223FC2A6466__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// FilesDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CFilesDlg dialog

class CFilesDlg : public CDialog
{
// Construction
public:
CString m_strFileKolvo;
CString m_strFileKodd;
CFilesDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CFilesDlg)
enum { IDD = IDD_FILESDLG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFilesDlg)
public:
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CFilesDlg)
afx_msg void OnButtonKodd();
afx_msg void OnButtonKolvo();
virtual void OnOK();
virtual void OnCancel();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FILESDLG_H__D4C2D396_ABD6_4172_B132_3223FC2A6466__INCLUDED_)


FilesDlg.cpp
// FilesDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Kurs.h"
#include "FilesDlg.h"
extern CString KoddFile;
extern CString KolvoFile;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFilesDlg dialog


CFilesDlg::CFilesDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFilesDlg::IDD, pParent)
{

//{{AFX_DATA_INIT(CFilesDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void CFilesDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text (pDX, IDC_FILEKodd, m_strFileKodd);
DDX_Text (pDX, IDC_FILEKolvo, m_strFileKolvo);
//{{AFX_DATA_MAP(CFilesDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFilesDlg, CDialog)
//{{AFX_MSG_MAP(CFilesDlg)
ON_BN_CLICKED(IDC_BUTTONKodd, OnButtonKodd)
ON_BN_CLICKED(IDC_BUTTONKolvo, OnButtonKolvo)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFilesDlg message handlers

void CFilesDlg::OnButtonKodd()
{
// TODO: Add your control notification handler code here
CString strKodd;
static char Filter[]="Kodd Files(*.Kodds)|*.Kodds||";// .
CFileDialog dialog(TRUE, "*.Kodds", strKodd, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, Filter);//. .
if (dialog.DoModal()==IDOK)// .
{
strKodd=dialog.GetPathName();//. .
m_strFileKodd=strKodd;
UpdateData(FALSE);// . . .m_str
}

}

void CFilesDlg::OnButtonKolvo()
{
// TODO: Add your control notification handler code here
CString strKolvo;
static char Filter[]="Kolvo Files (*.Kolvos)|*.Kolvos||";
CFileDialog dialog (TRUE,"*.Kolvos",strKolvo,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,Filter);
if (dialog.DoModal()==IDOK)
{
strKolvo=dialog.GetPathName();
m_strFileKolvo=strKolvo;
UpdateData(FALSE);// . m_str
}

}

void CFilesDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);// . . - m_str
KoddFile=m_strFileKodd;//. . m_str
KolvoFile=m_strFileKolvo; // . MainFrm.cpp
EndDialog(1);//. , 1 - DoModal()

CDialog::OnOK();
}

void CFilesDlg::OnCancel()
{
// TODO: Add extra cleanup here
OnOK();//
CDialog::OnCancel();
}


BOOL CFilesDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
m_strFileKodd=KoddFile;//
m_strFileKolvo=KolvoFile;//m_str
UpdateData(FALSE);// . . m_str.

return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}


CKoddDobDlg

KoddDobDlg.h
#if !defined(AFX_KoddDOBDLG_H__F819696A_2BD0_42D4_B619_76B185D53903__INCLUDED_)
#define AFX_KoddDOBDLG_H__F819696A_2BD0_42D4_B619_76B185D53903__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// KoddDobDlg.h : header file
//
#include "Kodd.h"
/////////////////////////////////////////////////////////////////////////////
// CKoddDobDlg dialog

class CKoddDobDlg : public CDialog
{
// Construction
public:
CKoddDobDlg(CWnd* pParent = NULL); // standard constructor
CKodd base;
BOOL CheckInput();//
void ClearForm();//
void Input(CKodd& base);//

// Dialog Data
//{{AFX_DATA(CKoddDobDlg)
enum { IDD = IDD_KoddDOBDLG };
CStringm_strNumKodd;
CStringm_strKod;
CStringm_strNaim;
CStringm_strKolvod;
//}}AFX_DATA


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CKoddDobDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CKoddDobDlg)
afx_msg void OnKodddob();
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_KoddDOBDLG_H__F819696A_2BD0_42D4_B619_76B185D53903__INCLUDED_)


KoddDobDlg.cpp
// KoddDobDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Kurs.h"
#include "KoddDobDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CKoddDobDlg dialog



CKoddDobDlg::CKoddDobDlg(CWnd* pParent /*=NULL*/)
: CDialog(CKoddDobDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CKoddDobDlg)
m_strNumKodd = _T("");
m_strKod = _T("");
m_strNaim = _T("");
m_strKolvod = (_T(""));
{
base.Init();
}
//}}AFX_DATA_INIT
}


void CKoddDobDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CKoddDobDlg)
DDX_Text(pDX, IDC_NOMKodd, m_strNumKodd);
DDX_Text(pDX, IDC_KOD, m_strKod);
DDX_Text(pDX, IDC_Naim, m_strNaim);
DDX_Text(pDX, IDC_Kolvod, m_strKolvod);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CKoddDobDlg, CDialog)
//{{AFX_MSG_MAP(CCehDobDlg)
ON_BN_CLICKED(IDC_KoddDOB, OnKodddob)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CKoddDobDlg message handlers

void CKoddDobDlg::OnKodddob()
{
// TODO: Add your control notification handler code here
if (CheckInput())
{
Input(base);// . .
base.Sozdanie();// . .
ClearForm();//
}

}

void CKoddDobDlg::OnOK()
{
// TODO: Add extra validation here
//OnOk();
CDialog::OnOK();
}

void CKoddDobDlg::ClearForm()//
{
m_strNumKodd="";
m_strKod="";
m_strNaim="";
m_strKolvod="";
UpdateData(FALSE);
}

BOOL CKoddDobDlg::CheckInput()//
{
UpdateData(TRUE);
if(m_strNumKodd=="")
{
MessageBox(" ", " ",
MB_ICONEXCLAMATION);
return FALSE;
}
if (m_strKod=="")
{
MessageBox(" "," ",
MB_ICONEXCLAMATION);
return FALSE;
}
if (m_strNaim=="")
{
MessageBox(" "," ",
MB_ICONEXCLAMATION);
return FALSE;
}
if (m_strKolvod=="")
{
MessageBox(" - "," ",
MB_ICONEXCLAMATION);
return FALSE;
}
return TRUE;
}
void CKoddDobDlg::Input(CKodd &base)//
{
UpdateData(TRUE);// . . .
base.NumKodd=m_strNumKodd;
base.Kod=m_strKod;
base.Naim=m_strNaim;
base.Kolvod=m_strKolvod;
}


CKoddProsm

KoddProsm.h
#if !defined(AFX_KoddPROSM_H__38BA11D1_50D3_46D4_AA02_59FD724F58B2__INCLUDED_)
#define AFX_KoddPROSM_H__38BA11D1_50D3_46D4_AA02_59FD724F58B2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// KoddProsm.h : header file
//
#include "Kodd.h"
/////////////////////////////////////////////////////////////////////////////
// CKoddProsm dialog

class CKoddProsm : public CDialog
{
// Construction
DECLARE_DYNAMIC(CKoddProsm)
public:
CKoddProsm(CWnd* pParent = NULL); // standard constructor
virtual ~CKoddProsm();
int curr_rec_number; //
int fact_number; //
CKodd base; //base- CAkt
void Output(CKodd& base); // .

// Dialog Data
//{{AFX_DATA(CKoddProsm)
enum { IDD = IDD_KoddPROSM };
CStringm_strNumKodd;
CStringm_strKolvod;
CStringm_strKod;
CStringm_strNaim;
CStringm_strNumber;
//}}AFX_DATA


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CKoddProsm)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CKoddProsm)
afx_msg void OnKoddprosmNach();
afx_msg void OnKoddprosmPred();
afx_msg void OnKoddprosmSled();
afx_msg void OnKoddprosmKonec();
virtual void OnOK();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_KoddPROSM_H__38BA11D1_50D3_46D4_AA02_59FD724F58B2__INCLUDED_)


KoddProsm.cpp
// KoddProsm.cpp : implementation file
//

#include "stdafx.h"
#include "Kurs.h"
#include "KoddProsm.h"



/////////////////////////////////////////////////////////////////////////////
// CKoddProsm dialog
IMPLEMENT_DYNAMIC(CKoddProsm, CDialog)

CKoddProsm::CKoddProsm(CWnd* pParent /*=NULL*/)
: CDialog(CKoddProsm::IDD, pParent)
//{{AFX_DATA_INIT(CKoddProsm)
,m_strNumKodd(_T(""))
, m_strKolvod(_T(""))
, m_strKod(_T(""))
, m_strNaim(_T(""))
, m_strNumber(_T(""))
{
base.Init(); // Init CKoddProsm
curr_rec_number=0; //.
fact_number=-1; //. .
}// CAktProsm

//}}AFX_DATA_INIT

CKoddProsm::~CKoddProsm()
{

}

void CKoddProsm::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCehProsm)
DDX_Text(pDX, IDC_NUMKodd, m_strNumKodd);
DDX_Text(pDX, IDC_Kolvod, m_strKolvod);
DDX_Text(pDX, IDC_KOD, m_strKod);
DDX_Text(pDX, IDC_Naim, m_strNaim);
DDX_Text(pDX, IDC_STATIC_NUMBER, m_strNumber);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CKoddProsm, CDialog)
//{{AFX_MSG_MAP(CCehProsm)
ON_BN_CLICKED(IDC_KoddPROSM_NACH, OnKoddprosmNach)
ON_BN_CLICKED(IDC_KoddPROSM_PRED, OnKoddprosmPred)
ON_BN_CLICKED(IDC_KoddPROSM_SLED, OnKoddprosmSled)
ON_BN_CLICKED(IDC_KoddPROSM_KONEC, OnKoddprosmKonec)
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, &CKoddProsm::OnBnClickedOk)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CKoddProsm message handlers

void CKoddProsm::OnKoddprosmNach()
{
// TODO: Add your control notification handler code here
int i=0;
fact_number=1; //. .
do //
{
base.ChtenieZap(i);
curr_rec_number=i;
i++;
}
while (base.NumKodd=="");
Output(base); // .
CString rec_number;
rec_number.Format(" 1 %d",base.fact_kol); // .
m_strNumber=rec_number; //fact_kol (d)
UpdateData(FALSE); // m_strNumber - .

}

void CKoddProsm::OnKoddprosmPred()
{
// TODO: Add your control notification handler code here
int prev=curr_rec_number; //
int prev_fact=fact_number; // .
int i=curr_rec_number-1; //i-
do //
{
if (i==-1)
{
curr_rec_number=-1;
break;
}
base.ChtenieZap(i);
if (base.NumKodd!="")
fact_number--;
curr_rec_number=i;
i--;
}
while (base.NumKodd=="");
if ((curr_rec_number==-1) || (fact_number<1))
{
MessageBox(" ", "", // ,
MB_ICONEXCLAMATION); //, .
curr_rec_number=prev; //
fact_number=prev_fact; // .
}
else
{
base.ChtenieZap(curr_rec_number); //
Output(base); // .
CString rec_number;
rec_number.Format(" %d %d", fact_number, //-.
base.fact_kol); //fact_number fact_kol (d)
m_strNumber=rec_number;
UpdateData(FALSE); // m_strNumber - .
}

}

void CKoddProsm::OnKoddprosmSled()
{
// TODO: Add your control notification handler code here
int prev=curr_rec_number; //
int prev_fact=fact_number; // .
int i=curr_rec_number+1; //i -
do //
{
base.ChtenieZap(i);
if (base.NumKodd!="")
fact_number++;
curr_rec_number=i;
i++;
}
while (base.NumKodd=="");
if (curr_rec_number>=base.kol)
{
MessageBox(" ","", // ,
MB_ICONEXCLAMATION); //, .
curr_rec_number=prev; //.
fact_number=prev_fact; // .
}
else
{
base.ChtenieZap(curr_rec_number); //
Output(base); // .
CString rec_number;
rec_number.Format(" %d %d",fact_number, //-.
base.fact_kol); //fact_number fact_kol (d)
m_strNumber=rec_number;
UpdateData(FALSE); // m_strNumber - .
}

}

void CKoddProsm::OnKoddprosmKonec()
{
// TODO: Add your control notification handler code here
int last_rec_number=-1; //
for (int i=0;i<base.kol;i++) //
{//, ..
base.ChtenieZap(i);
if (base.NumKodd!="")
last_rec_number=i;
}
base.ChtenieZap(last_rec_number);
Output(base); // .
CString rec_number;
rec_number.Format(" %d %d", base.fact_kol, //-.
base.fact_kol); //fact_kol fact_kol (d)
m_strNumber=rec_number;
curr_rec_number=base.kol-1;
fact_number=base.fact_kol;
UpdateData(FALSE); // m_strNumber - .

}

void CKoddProsm::OnOK()
{
// TODO: Add extra validation here

CDialog::OnOK();
}

BOOL CKoddProsm::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
if (base.fact_kol==0)
{
MessageBox(" ",
"",MB_ICONEXCLAMATION);
EndDialog(1);
}
else
{
fact_number=1;
int i=0;
do
{
base.ChtenieZap(i);
curr_rec_number=i;
i++;
}
while (base.NumKodd=="");
Output(base);
CString rec_number;
rec_number.Format(" 1 %d",base.fact_kol);
m_strNumber=rec_number;
UpdateData(FALSE);
}

return TRUE; // return TRUE unless you set the focus to a control
}
void CKoddProsm::Output(CKodd& base)// .
{
m_strNumKodd=base.NumKodd; // .
m_strKod=base.Kod;// m_str
m_strNaim=base.Naim;
m_strKolvod=base.Kolvod;
UpdateData(FALSE); //. . m_str - .
}

void
..................



90% antiplagiat.ru, etxt.ru advego.ru




* . , .