⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 document.cs

📁 很不错的公文流转系统
💻 CS
📖 第 1 页 / 共 3 页
字号:
				{
					return stapleSign;
				}
				set
				{
					stapleSign=value;
				}
			}
			/// <summary>
			/// 属性:删除标识
			/// </summary>
			public bool DeleteSign
			{
				get
				{
					return deleteSign;
				}
				set
				{
					deleteSign=value;
				}
			}
			/// <summary>
			/// 获取数据集
			/// </summary>
			/// <returns>成功或失败</returns>
			private void SetData()
			{
				 this.oobjs.GetData();
			}
			/// <summary>
			/// 根据索引字段查询单一的元素,不能与foreach共同使用
			/// </summary>
			/// <param name="DocumentID">文档ID</param>
			/// <returns>查到/没有查到</returns>
			public bool Search(string DocumentID)
			{
				DocumentID=OI.Modules.String.GenSafeChars(DocumentID);
				string sql="SELECT DocumentID, SecretGreadID, DocumentTypeID, ExigenceDegreeID, "+
					"DocumentHead, DocumentNumber, Title, MainSendComp, CopySendComp, "+
					"DraftDepartment, SendDepartment, TopicWord, Content, Range, CurrentStepID, "+
					"CurrentStepName, CompleteSign, UserID, SendDate, StreamID, StapleSign, "+
					"DeleteSign, ExigenceDegreeName, UserName, DocumentTypeName, "+
					"SecretGreadName, IshaveAccessories"+
					"FROM VIEW_DOCUMENT where "+
					"DocumentID='"+DocumentID+"'";//在此填写你的Sql语句
				System.Data.SqlClient.SqlDataReader oDataReader;
				try
				{
					oDataReader=this.RunCommand(sql);
				}
				catch(System.Data.SqlClient.SqlException e)
				{
					if(this.Connection.State==System.Data.ConnectionState.Open)
						this.Connection.Close();
					throw new AppException("执行下列SQL语句出错:\n\r"+sql,e);
				}
				//设置各属性质
				if(oDataReader.Read())
				{
					//以下代码为类:Document的属性变量
					if (!oDataReader.IsDBNull(0))
					{
						nDocumentID=oDataReader.GetInt32(0);
					}					
					if (!oDataReader.IsDBNull(1))
					{
						nSecretGreadID=oDataReader.GetInt32(1);
					}
					if (!oDataReader.IsDBNull(2))
					{
						nDocumentTypeID=oDataReader.GetInt32(2);
					}
					if (!oDataReader.IsDBNull(3))
					{
						nExigenceDegreeID=oDataReader.GetInt32(3);
					}
					if (!oDataReader.IsDBNull(4))
					{
						cDocumentHead=oDataReader.GetString(4);
					}
					if (!oDataReader.IsDBNull(5))
					{
						cDocumentNumber=oDataReader.GetString(5);
					}
					if (!oDataReader.IsDBNull(6))
					{
						cTitle=oDataReader.GetString(6);
					}
					if (!oDataReader.IsDBNull(7))
					{
						cMainSendComp=oDataReader.GetString(7);
					}
					if (!oDataReader.IsDBNull(8))
					{
						cCopySendComp=oDataReader.GetString(8);
					}
					if (!oDataReader.IsDBNull(9))
					{
						cDraftDepartment=oDataReader.GetString(9);
					}
					if (!oDataReader.IsDBNull(10))
					{
						cSendDepartment=oDataReader.GetString(10);
					}
					if (!oDataReader.IsDBNull(11))
					{
						cTopicWord=oDataReader.GetString(11);
					}
					if (!oDataReader.IsDBNull(12))
					{
						cContent=oDataReader.GetString(12);
					}
					if (!oDataReader.IsDBNull(13))
					{
						range=oDataReader.GetBoolean(13);
					}
					if (!oDataReader.IsDBNull(14))
					{
						nCurrentStepID=oDataReader.GetInt32(14);
					}
					if (!oDataReader.IsDBNull(15))
					{
						cCurrentStepName=oDataReader.GetString(15);
					}
					if (!oDataReader.IsDBNull(16))
					{
						nCompleteSign=oDataReader.GetInt32(16);
					}
					if (!oDataReader.IsDBNull(17))
					{
						nUserID=oDataReader.GetInt32(17);
					}
					if (!oDataReader.IsDBNull(18))
					{
						dSendDate=oDataReader.GetDateTime(18);
					}
					if (!oDataReader.IsDBNull(19))
					{
						nStreamID=oDataReader.GetInt32(19);
					}
					if (!oDataReader.IsDBNull(20))
					{
						stapleSign=oDataReader.GetBoolean(20);
					}
					if (!oDataReader.IsDBNull(21))
					{
						deleteSign=oDataReader.GetBoolean(21);
					}
					if (!oDataReader.IsDBNull(22))
					{
						exigenceDegreeName=oDataReader.GetString(22);
					}
					if (!oDataReader.IsDBNull(23))
					{
						userName=oDataReader.GetString(23);
					}
					if (!oDataReader.IsDBNull(24))
					{
						documentTypeName=oDataReader.GetString(24);
					}
					if (!oDataReader.IsDBNull(25))
					{
						secretGreadName=oDataReader.GetString(25);
					}
					if (!oDataReader.IsDBNull(26))
					{
						ishaveAccessories=oDataReader.GetBoolean(26);
					}
					
					
					oDataReader.Close();
					return true;
				}
				else
				{
					oDataReader.Close();
					return false;
				}
			}
			private Documents oobjs;       //构造函数
			/// <summary>
			/// 从容器类中构造
			/// </summary>
			/// <param name="toobjs"></param>
			public Document(Documents toobjs)
			{
				oobjs=toobjs;
             
			}
			/// <summary>
			/// 单独使用类
			/// </summary>
			public Document():base()
			{				
			}
			/// <summary>
			/// 单独使用类
			/// </summary>
			public Document(string newConnectionString):base(newConnectionString)
			{				
			}
			
			/// <summary>
			/// 获取当前的对象
			/// </summary>
			object IEnumerator.Current
			{
				get
				{
					return this;
				}
			}
			/// <summary>
			/// 下一个对象
			/// </summary>
			/// <returns>有或无</returns>
			public bool MoveNext()
			{
				if(oobjs.oDataSet==null)
				{
					SetData();
					if(oobjs.nCurrentRecordNum<0)
						oobjs.nCurrentRecordNum=0;
				}
				if(oobjs.PageSize>0) 
				{
					if(oobjs.nCurrentRecordNum+(oobjs.PageNum-1)*oobjs.PageSize>=oobjs.RecordCount||oobjs.CurrentRecordNum>oobjs.PageSize-1)
					{
						this.oobjs.CurrentRecordNum=0; 
						return false;
					}
				}
				else
				{
					if(oobjs.nCurrentRecordNum>=oobjs.RecordCount)
					{
						this.oobjs.CurrentRecordNum=0; 
						return false;
					}
				}

				//以下代码为类:Document的属性变量
				try
				{
					nDocumentID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][0]);
				}
				catch(System.Exception ErrorExcept_Property_0)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_0.Message);
					nDocumentID=0;
				}
				try
				{
					nSecretGreadID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][1]);
				}
				catch(System.Exception ErrorExcept_Property_1)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_1.Message);
					nSecretGreadID=0;
				}
				try
				{
					nDocumentTypeID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][2]);
				}
				catch(System.Exception ErrorExcept_Property_2)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_2.Message);
					nDocumentTypeID=0;
				}
				try
				{
					nExigenceDegreeID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][3]);
				}
				catch(System.Exception ErrorExcept_Property_3)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_3.Message);
					nExigenceDegreeID=0;
				}
				try
				{
					cDocumentHead=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][4]);
				}
				catch(System.Exception ErrorExcept_Property_4)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_4.Message);
					cDocumentHead="";
				}
				try
				{
					cDocumentNumber=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][5]);
				}
				catch(System.Exception ErrorExcept_Property_5)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_5.Message);
					cDocumentNumber="";
				}
				try
				{
					cTitle=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][6]);
				}
				catch(System.Exception ErrorExcept_Property_6)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_6.Message);
					cTitle="";
				}
				try
				{
					cMainSendComp=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][7]);
				}
				catch(System.Exception ErrorExcept_Property_7)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_7.Message);
					cMainSendComp="";
				}
				try
				{
					cCopySendComp=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][8]);
				}
				catch(System.Exception ErrorExcept_Property_8)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_8.Message);
					cCopySendComp="";
				}
				try
				{
					cDraftDepartment=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][9]);
				}
				catch(System.Exception ErrorExcept_Property_9)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_9.Message);
					cDraftDepartment="";
				}
				try
				{
					cSendDepartment=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][10]);
				}
				catch(System.Exception ErrorExcept_Property_10)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_10.Message);
					cSendDepartment="";
				}
				try
				{
					cTopicWord=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][11]);
				}
				catch(System.Exception ErrorExcept_Property_11)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_11.Message);
					cTopicWord="";
				}
				try
				{
					cContent=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][12]);
				}
				catch(System.Exception ErrorExcept_Property_12)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_12.Message);
					cContent="";
				}
				try
				{
					range=System.Convert.ToBoolean(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][13]);
				}
				catch(System.Exception ErrorExcept_Property_13)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_13.Message);
					range=false;
				}
				try
				{
					nCurrentStepID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][14]);
				}
				catch(System.Exception ErrorExcept_Property_14)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_14.Message);
					nCurrentStepID=0;
				}
				try
				{
					cCurrentStepName=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][15]);
				}
				catch(System.Exception ErrorExcept_Property_15)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_15.Message);
					cCurrentStepName="";
				}
				try
				{
					nCompleteSign=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][16]);
				}
				catch(System.Exception ErrorExcept_Property_16)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_16.Message);
					nCompleteSign=0;
				}
				try
				{
					nUserID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][17]);
				}
				catch(System.Exception ErrorExcept_Property_17)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_17.Message);
					nUserID=0;
				}
				try
				{
					dSendDate=System.Convert.ToDateTime(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][18]);
				}
				catch(System.Exception ErrorExcept_Property_18)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_18.Message);
					dSendDate=System.DateTime.MinValue;
				}
				try
				{
					nStreamID=System.Convert.ToInt32(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][19]);
				}
				catch(System.Exception ErrorExcept_Property_19)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_19.Message);
					nStreamID=0;
				}
				try
				{
					stapleSign=System.Convert.ToBoolean(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][20]);
				}
				catch(System.Exception ErrorExcept_Property_20)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_20.Message);
					stapleSign=false;
				}
				try
				{
					deleteSign=System.Convert.ToBoolean(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][21]);
				}
				catch(System.Exception ErrorExcept_Property_21)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_21.Message);
					deleteSign=false;
				}
				try
				{
					exigenceDegreeName=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][22]);
				}
				catch(System.Exception ErrorExcept_Property_22)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_22.Message);
					exigenceDegreeName="";
				}
				try
				{
					userName=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][23]);
				}
				catch(System.Exception ErrorExcept_Property_23)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_23.Message);
					userName="";
				}
				try
				{
					documentTypeName=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][24]);
				}
				catch(System.Exception ErrorExcept_Property_24)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_24.Message);
					documentTypeName="";
				}
				try
				{
					secretGreadName=System.Convert.ToString(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][25]);
				}
				catch(System.Exception ErrorExcept_Property_25)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_25.Message);
					secretGreadName="";
				}
				try
				{
					ishaveAccessories=System.Convert.ToBoolean(oobjs.oDataSet.Tables["Document"].Rows[oobjs.nCurrentRecordNum][26]);
				}
				catch(System.Exception ErrorExcept_Property_26)
				{

					ErrorLog.WriteLog(ErrorExcept_Property_26.Message);
					ishaveAccessories=false;
				}
				
				
				
				
				
				oobjs.nCurrentRecordNum++;
				return true;
			}
			/// <summary>
			/// 复位
			/// </summary>
			public  void Reset()
			{
			}
			
		
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -