资源简介
公告管理系统
本系统是为办公网站发布公告而设计,各个部门发布自己所在部门的某种类型的公告,给各类不同的用户查看。管理员可以实现对本部门的公告实现增删改等管理.
(里面附带有程序编写文档,一份很好的asp.net学习材料)
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using NewsManage.Model;
using NewsManage.DBUtility;
namespace NewsManage.DAL
{
public class Department
{
private const string SQL_INSERT_DEPARTMENT = “INSERT INTO DEPARTMENT(DEPARTMENTNAMEDEPARTMENTBRIEF) VALUES(@DEPARTMENTNAME@DEPARTMENTBRIEF)“;
private const string SQL_UPDATE_DEPARTMENT = “UPDATE DEPARTMENT SET DEPARTMENTNAME=@DEPARTMENTNAMEDEPARTMENTBRIEF=@DEPARTMENTBRIEF WHERE DEPARTMENTID=@DEPARTMENTID“;
private const string SQL_SELECT_DEPARTMENT_1 = “SELECT * FROM DEPARTMENT WHERE DEPARTMENTID=@DEPARTMENTID“;
private const string SQL_SELECT_DEPARTMENT_2 = “SELECT * FROM DEPARTMENT ORDER BY DEPARTMENTID“;
private const string SQL_DELETE_DEPARTMENT = “DELETE FROM DEPARTMENT WHERE DEPARTMENTID=@DEPARTMENTID“;
private const string PARM_DEPARTMENT_ID = “@DEPARTMENTID“;
private const string PARM_DEPARTMENT_NAME = “@DEPARTMENTNAME“;
private const string PARM_DEPARTMENT_BRIEF = “@DEPARTMENTBRIEF“;
#region IDepartment 成员
public void insert(DepartmentInfo department)
{
StringBuilder strSQL = new StringBuilder();
// Get each commands parameter arrays
SqlParameter[] departmentParms = new SqlParameter[]{
new SqlParameter(PARM_DEPARTMENT_NAME SqlDbType.VarChar 20)
new SqlParameter(PARM_DEPARTMENT_BRIEF SqlDbType.VarChar 20)
};
SqlCommand cmd = new SqlCommand();
cmd.CommandText = SQL_INSERT_DEPARTMENT;
// Set up the parameters
departmentParms[0].Value = department.DepartmentName;
departmentParms[1].Value = department.DepartmentBrief;
foreach (SqlParameter parm in departmentParms)
cmd.Parameters.Add(parm);
// Create the connection to the database
using (SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction))
{
conn.Open();
cmd.Connection = conn;
cmd.ExecuteNonQuery();
}
}
public void delete(int departmentID)
{
StringBuilder strSQL = new StringBuilder();
// Get each commands parameter arrays
SqlParameter[] departmentParms = new SqlParameter[]{
new SqlParameter(PARM_DEPARTMENT_ID SqlDbType.Int)
};
SqlCommand cmd = new SqlCommand();
cmd.CommandText = SQL_DELETE_DEPARTMENT;
// Set up the parameters
departmentParms[0].Value = departmentID;
foreach (SqlParameter parm in departmentParms)
cmd.Parameters.Add(parm);
// Create the connection to the database
using (SqlConnection conn = new SqlConnection(SqlHelper.C
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 32768 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\bin\Debug\NewsManage.DAL.dll
文件 36352 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\bin\Debug\NewsManage.DAL.pdb
文件 20480 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\bin\Debug\NewsManage.DBUtility.dll
文件 26112 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\bin\Debug\NewsManage.DBUtility.pdb
文件 20480 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\bin\Debug\NewsManage.Model.dll
文件 36352 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\bin\Debug\NewsManage.Model.pdb
文件 2477 2008-11-05 20:56 newsManage\newsManage\DAL\DAL\DAL.csproj
文件 6152 2008-11-05 20:35 newsManage\newsManage\DAL\DAL\Department.cs
文件 12053 2008-11-05 20:36 newsManage\newsManage\DAL\DAL\News.cs
文件 3417 2008-11-05 20:35 newsManage\newsManage\DAL\DAL\NewsType.cs
文件 298 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\obj\DAL.csproj.FileList.txt
文件 1009 2008-11-19 20:38 newsManage\newsManage\DAL\DAL\obj\DAL.csproj.FileListAbsolute.txt
文件 32768 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\obj\Debug\NewsManage.DAL.dll
文件 36352 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\obj\Debug\NewsManage.DAL.pdb
文件 20480 2008-11-19 20:17 newsManage\newsManage\DAL\DAL\obj\Debug\Refactor\NewsManage.DAL.dll
文件 14149 2008-12-15 15:33 newsManage\newsManage\DAL\DAL\obj\Debug\ResolveAssemblyReference.cache
文件 1325 2008-11-05 20:21 newsManage\newsManage\DAL\DAL\Properties\AssemblyInfo.cs
文件 3580 2008-11-05 20:35 newsManage\newsManage\DAL\DAL\ViewerType.cs
文件 5336 2008-11-05 20:56 newsManage\newsManage\DAL\DAL.sln
..A..H. 21504 2008-11-05 21:16 newsManage\newsManage\DAL\DAL.suo
文件 718 2005-11-09 00:00 newsManage\newsManage\DBUtility\AssemblyInfo.cs
文件 20480 2008-12-15 15:33 newsManage\newsManage\DBUtility\BIN\Debug\NewsManage.DBUtility.dll
文件 26112 2008-12-15 15:33 newsManage\newsManage\DBUtility\BIN\Debug\NewsManage.DBUtility.pdb
文件 2195 2008-09-14 02:20 newsManage\newsManage\DBUtility\DBUtility.csproj
文件 186 2008-12-15 15:33 newsManage\newsManage\DBUtility\OBJ\DBUtility.csproj.FileList.txt
文件 4702 2008-11-19 20:38 newsManage\newsManage\DBUtility\OBJ\DBUtility.csproj.FileListAbsolute.txt
文件 20480 2008-12-15 15:33 newsManage\newsManage\DBUtility\OBJ\Debug\NewsManage.DBUtility.dll
文件 26112 2008-12-15 15:33 newsManage\newsManage\DBUtility\OBJ\Debug\NewsManage.DBUtility.pdb
文件 16384 2008-10-12 20:55 newsManage\newsManage\DBUtility\OBJ\Debug\Refactor\NewsManage.DBUtility.dll
文件 16384 2008-09-13 22:22 newsManage\newsManage\DBUtility\OBJ\Debug\Refactor\PetShop.DBUtility.dll
............此处省略124个文件信息
- 上一篇:Visual C#数据库项目案例导航
- 下一篇:icon c#精美图标
相关资源
- 餐饮管理系统(C#源代码)(含概要设
- ASP.NET毕业设计_重庆旅游网
- C#进销存管理系统C#进销存管理系统
- C#Winform实现网吧管理系统源代码
- ASP.NET典型系统源码
- 简单的c#停车场管理系统
- C#.net实现的C/S版酒店管理系统
- 学生公寓管理系统(C# 开发的公寓管
- 酒店管理系统C#酒店管理系统C#酒店管
- 济南招聘网asp.net源码
- 数据库课程设计-超市管理系统
- C# SQL图书馆管理系统
- c#winform网络监控系统
- ASP.NET房产管理系统
- 网上飞机订票系统asp.netc#
- 教学设备数据库管理系统SQL+C#课程设
- 操作系统课设理发师问题,时间片轮
- c#银行管理系统 数据库管理
- c# 班级信息管理系统源程序
- Asp.net中型在线系统开发实践 源代码
- bug管理系统源码
- 仓库管理系统 源码程序
- WebGIS 开发 简单(asp.net+arcgis server),
- C#WinForm考试系统及源代码.zip
- Asp.net简单会员管理系统
- 教师评教智能评选系统
- ASP.NET+C#学校网站整站系统源码
- 学生宿舍管理系统+C# 源代码
- 酒店管理系统(数据库+课程设计+C#)
- 足球俱乐部信息管理系统
评论
共有 条评论