- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
Desktop.cs
资源名称:OAJP.rar [点击查看]
上传用户:jdb8708888
上传日期:2013-05-29
资源大小:19971k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
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;
- }
- }
- }
- }