编号
《.NET架构与程序设计》
班 级 软件工程6班
学生姓名 xxx 学号 36542
指导教师 2222
评阅教师 2222
时 间 2017年1月
一、课程设计概述:
本次数据结构课程设计共完成三个题:1使用三层框架搭建一个CRUD(增删改查)操作的程序、2使用UML分析学生成绩管理系统。
使用语言:C#
编译环境:VS2013
二、课程设计题目
使用三层框架搭建一个CRUD(增删改查)操作的程序
[实验目标]
熟悉三层框架的创建和每层相互的引用关系
熟悉
熟悉练习
序号项目类型项目名称工程引用1模型层PetModel无2数据层PetDALPetModel3业务层PetBLLPetModel、PetDAL4表示层PetWEBPetModel、PetBLL
[运行结果及分析]
程序运行界面
插入页面
编辑状态
编辑成功
Category表
Product表
[三层架构代码]
Model
public class PetProduct
{
private string productId;
private string name;
private string descn;
private string image;
private PetCategory petCategory;
public PetProduct(string productId,string name,string descn,string image,PetCategory petCategory)
{
this.productId = productId;
this.name = name;
this.descn = descn;
this.image = image;
this.petCategory = petCategory;
}
public string ProductId
{
get { return productId; }
set { productId = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public string Descn
{
get { return descn; }
set { descn = value; }
}
public string Image
{
get { return image; }
set { image = value; }
}
public PetCategory PetCategory
{
get { return petCategory; }
set { petCategory = value; }
}
BLL
public class PetProductService
{
public List getData()
{
return new PetCategroyDAO().getData();
}
public static DataTable sele