project1实验报告规范

时间:2025-04-20

重庆大学实验报告

实验题目: 简单商品订购管理软件

学 院:专业班级: 年 级: 姓 名: 学 号: 完成时间:月日

指导教师:

重庆大学教务处制

实验项目指导教师评定成绩表

指导教师评定成绩:

指导教师签名: 年 月 日

重庆大学本科学生实验项目任务书

说明:学院、专业、年级均填全称,如:计算机学院、计算机科学与技术、2011。

实验报告正文

主要内容包括:

1 需求分析

1.1数据需求 :通过与商品库存管理系统用户交谈等方式以及对商品库存管理的分析,可以得到商品库存管理数据库系统的数据需求。管理员可以添加库存商品及查看出库及运送情况信息,可以对库存的商品进行出库和入库的管理, 由此分析可得:商品库存管理系统包括商品信息、商家信息、入库出库信息。商品由商品类别名称标识,入库出库根据商品信息来标识。 1.2功能需求: 管理员通过进入界面登录。 可以对信息进行查询和更新等操作,例如添加、查看等。 2 系统设计(类图、模块图等) 搭建程序框架图,其图如下所示:

3 关键代码描述

/ final_test1Dlg.cpp : implementation file //

#include "stdafx.h" #include "final_test1.h" #include "final_test1Dlg.h" #include "List.h" #include "queue.h"

#ifdef _DEBUG

#define new DEBUG_NEW #undef THIS_FILE

static char THIS_FILE[] = __FILE__; #endif

///////////////////////////////////////////////////////////////////////////// // CFinal_test1Dlg dialog List L1,L2,L3,L4,L5; queue Q1,Q2; int type=-1; int sub_flag=0; CString list;

CFinal_test1Dlg::CFinal_test1Dlg(CWnd* pParent /*=NULL*/) {

//{{AFX_DATA_INIT(CFinal_test1Dlg) m_qin = FALSE; m_guo = FALSE; m_cai = FALSE; m_gan = FALSE; m_shui = FALSE; m_name = _T(""); m_count = 0;

m_deliver_type = _T(""); m_deliver_name = _T(""); m_deliver_count = 0; m_sell_type = _T(""); m_sell_name = _T(""); m_sell_count = 0;

: CDialog(CFinal_test1Dlg::IDD, pParent)

}

// Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);

void CFinal_test1Dlg::DoDataExchange(CDataExchange* pDX) { }

BEGIN_MESSAGE_MAP(CFinal_test1Dlg, CDialog)

//{{AFX_MSG_MAP(CFinal_test1Dlg) ON_WM_PAINT() ON_WM_QUERYDRAGICON()

ON_BN_CLICKED(IDC_BUTTON1, OnButton1) ON_BN_CLICKED(IDC_CHECK1, OnCheck1) ON_BN_CLICKED(IDC_CHECK2, OnCheck2) ON_BN_CLICKED(IDC_CHECK3, OnCheck3) ON_BN_CLICKED(IDC_CHECK4, OnCheck4) ON_BN_CLICKED(IDC_CHECK5, OnCheck5) ON_BN_CLICKED(IDC_BUTTON2, OnButton2) ON_BN_CLICKED(IDC_BUTTON3, OnButton3) ON_BN_CLICKED(IDC_BUTTON4, OnButton4) ON_BN_CLICKED(IDC_BUTTON5, OnButton5) ON_BN_CLICKED(IDC_BUTTON6, OnButton6) ON_BN_CLICKED(IDC_BUTTON7, OnButton7) CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CFinal_test1Dlg)

DDX_Control(pDX, IDC_LIST3, m_sell_list); DDX_Control(pDX, IDC_LIST2, m_deliver_list); DDX_Control(pDX, IDC_LIST1, m_list); DDX_Check(pDX, IDC_CHECK2, m_qin); DDX_Check(pDX, IDC_CHECK4, m_guo); DDX_Check(pDX, IDC_CHECK3, m_cai); DDX_Check(pDX, IDC_CHECK5, m_gan); DDX_Check(pDX, IDC_CHECK1, m_shui); DDX_Text(pDX, IDC_EDIT1, m_name); DDX_Text(pDX, IDC_EDIT2, m_count); DDX_Text(pDX, IDC_EDIT3, m_deliver_type); DDX_Text(pDX, IDC_EDIT4, m_deliver_name); DDX_Text(pDX, IDC_EDIT5, m_deliver_count); DDX_Text(pDX, IDC_EDIT6, m_sell_type); DDX_Text(pDX, IDC_EDIT7, m_sell_name); DDX_Text(pDX, IDC_EDIT8, m_sell_count); //}}AFX_DATA_MAP

ON_BN_CLICKED(IDC_BUTTON9, OnButton9) //}}AFX_MSG_MAP

END_MESSAGE_MAP()

///////////////////////////////////////////////////////////////////////////// // CFinal_test1Dlg message handlers

BOOL CFinal_test1Dlg::OnInitDialog() { }

// If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework.

void CFinal_test1Dlg::OnPaint() {

}

// Draw the icon

dc.DrawIcon(x, y, m_hIcon);

// Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect;

GetClientRect(&rect);

int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2;

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); if (IsIconic()) {

CPaintDC dc(this); // device context for painting

// Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE);

// TODO: Add extra initialization here

return TRUE; // return TRUE unless you set the focus to a control

// Set big icon

SetIcon(m_hIcon, FALSE);

// Set small icon

CDialog::OnInitDialog();

}

{ }

CDialog::OnPaint();

// The system calls this to obtain the cursor to display while the user drags // the minimized window.

HCURSOR CFinal_test1Dlg::OnQueryDragIcon() { }

void CFinal_test1Dlg::OnButton1() { }

void CFinal_test1Dlg::OnCheck1() { }

// TODO: Add your control notification handler code here if(m_shui==FALSE)

m_shui=TRUE; m_shui=FALSE; else

// TODO: Add your control notification handler code here UpdateData(true); char temp[50]; if(m_shui==TRUE) else if(m_qin==TRUE)

L2.Add(temp,m_count); L3.Add(temp,m_count); L4.Add(temp,m_count); L5.Add(temp,m_count);

MessageBox("未′选?择?商Θ 品& …… 此处隐藏:9331字,全部文档内容请下载后查看。喜欢就下载吧 ……

project1实验报告规范.doc 将本文的Word文档下载到电脑

    精彩图片

    热门精选

    大家正在看

    × 游客快捷下载通道(下载后可以自由复制和排版)

    限时特价:7 元/份 原价:20元

    支付方式:

    开通VIP包月会员 特价:29元/月

    注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
    微信:fanwen365 QQ:370150219