Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Desktop.cs
Package: OAJP.rar [view]
Upload User: jdb8708888
Upload Date: 2013-05-29
Package Size: 19971k
Code Size: 3k
Category:
WEB(ASP,PHP,...)
Development Platform:
C#
- using System;
- using System.Collections;
- using System.Data;
- using System.Data.SqlClient;
- namespace UDS.Components
- {
- /// <summary>
- /// Desktop 的摘要说明。
- /// </summary>
- ///
- public class Desktop
- {
- public Desktop()
- {
- //
- // TODO: 在此处添加构造函数逻辑
- //
- }
- /// <summary>
- /// 得到我的最新文档
- /// </summary>
- /// <param name="UserName">用户名</param>
- /// <param name="RightCode">查看文档的权限代号</param>
- /// <returns>返回dataReader</returns>
- public SqlDataReader GetMyDocument(string UserName,int RightCode)
- {
- Database data = new Database();
- SqlDataReader dataReader = null;
- // 执行存储过程,并返回SqlDataReader对象
- SqlParameter[] prams = {
- data.MakeInParam("@UserName" , SqlDbType.VarChar , 300, UserName),
- data.MakeInParam("@RightCode",SqlDbType.Int,4,RightCode)
- };
- try
- {
- data.RunProc("sp_GetMyNewDoc",prams,out dataReader);
- return dataReader;
- }
- catch(Exception ex)
- {
- Error.Log(ex.ToString());
- throw new Exception("读取我的文档出错!",ex);
- }
- finally
- {
- data = null;
- dataReader = null;
- }
- }
- /// <summary>
- /// 得到我的最新收件
- /// </summary>
- /// <param name="UserName">用户名</param>
- /// <param name="MailFolderType">收件夹代号</param>
- /// <returns>返回dataReader</returns>
- public SqlDataReader GetMyMail(string UserName,int MailFolderType)
- {
- Database data = new Database();
- SqlDataReader dataReader = null;
- // 执行存储过程,并返回SqlDataReader对象
- SqlParameter[] prams = {
- data.MakeInParam("@UserName" , SqlDbType.VarChar , 20, UserName),
- data.MakeInParam("@MailFolderType",SqlDbType.Int,4,MailFolderType)
- };
- try
- {
- data.RunProc("SP_MailGetBriefInfo",prams,out dataReader);
- return dataReader;
- }
- catch(Exception ex)
- {
- Error.Log(ex.ToString());
- throw new Exception("读取我的邮件出错!",ex);
- }
- finally
- {
- data = null;
- dataReader = null;
- }
- }
- /// <summary>
- /// 得到我的最新审批
- /// </summary>
- /// <param name="UserName">用户名</param>
- /// <param name="RightCode">审批权限代号</param>
- /// <returns>返回dataReader</returns>
- public SqlDataReader GetMyApprove(string UserName,int RightCode)
- {
- Database data = new Database();
- SqlDataReader dataReader = null;
- // 执行存储过程,并返回SqlDataReader对象
- SqlParameter[] prams = {
- data.MakeInParam("@UserName" , SqlDbType.VarChar , 300, UserName),
- data.MakeInParam("@RightCode",SqlDbType.Int,4,RightCode)
- };
- try
- {
- data.RunProc("sp_GetMyApproved",prams,out dataReader);
- return dataReader;
- }
- catch(Exception ex)
- {
- Error.Log(ex.ToString());
- throw new Exception("读取我的审批出错!",ex);
- }
- finally
- {
- data = null;
- dataReader = null;
- }
- }
- }
- }