Asp.net源码专业站
首页->商务办公->PowerOA办公自动化系统商业源码>>Archives/ArchiveDetail.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:PowerOA办公自动化系统商业源码
当前文件:文件类型 PowerOA/Archives/ArchiveDetail.aspx.cs[11K,2009-6-12 11:52:10]打开代码结构图
普通视图
		            
1/****************************************************************** 2* Source File Name : ArchiveDetail * 3* Project Name: OI.csproj * 4* Engineer: 黎斌 * 5* Date Generated: 2003/12/17 * 6* Last Revision Date : * 7* Brief Description : 存档公文详细信息 * 8******************************************************************/ 9using System; 10using System.Collections; 11using System.ComponentModel; 12using System.Data; 13using System.Data.SqlClient; 14using System.Drawing; 15using System.Web; 16using System.Web.SessionState; 17using System.Web.UI; 18using System.Web.UI.WebControls; 19using System.Web.UI.HtmlControls; 20 21namespace OI.Archives 22{ 23 /// <summary> 24 /// ArchiveDetail 的摘要说明。 25 /// </summary> 26 public class ArchiveDetail : OI.PageBase //OI.PageBase 27 { 28 // 在此处放置用户代码以初始化页面 29 30 31 public string mSubject; 32 public string mStatus; 33 public string mAuthor; 34 public string mFileName; 35 public string mFileDate; 36 public string mHTMLPath; 37 38 public string mDisabled; 39 40 public string mHttpUrl; 41 public string mScriptName; 42 public string mServerName; 43 public string mClientName; 44 public string mServerUrl; 45 public string mClientUrl; 46 47 48 public string mRecordID; 49 public string mTemplate; 50 public string mFileType; 51 public string mEditType; 52 public string mUserName; 53 // 54 public string PTitle; 55 public string PSendDate; 56 public string Psecretgreadname; 57 public string Pdocumenttypename ; 58 public string Pexigencedegreename ; 59 public string PDocumentID; 60 61 public string Lbl_Content; 62 63 public string mWord; 64 public string mExcel; 65 protected System.Web.UI.WebControls.Panel Panel1; 66 67 //****************************************************************** add by 黎斌 68 protected System.Web.UI.WebControls.Label Lbl_DraftDepartment; 69 protected System.Web.UI.WebControls.Label Lbl_DocumentType; 70 protected System.Web.UI.WebControls.Label Lbl_DocumentTypeName; 71 protected System.Web.UI.WebControls.Label Lbl_SecretGreadName; 72 protected System.Web.UI.WebControls.Label Lbl_ExigenceDegreeName; 73 protected System.Web.UI.WebControls.Label Lbl_MainSendComp; 74 protected System.Web.UI.WebControls.Label Lbl_CopySendComp; 75 protected System.Web.UI.WebControls.Label Lbl_StreamName; 76 protected System.Web.UI.WebControls.Label Lbl_Title; 77 78 protected System.Web.UI.WebControls.Label Lbl_Time; 79 80 protected OI.DatabaseOper.DatabaseConnect oConn = new OI.DatabaseOper.DatabaseConnect(); 81 private System.Data.DataSet dsDocument; 82 private OI.cs.readStream oReadStream = new OI.cs.readStream(); 83 private string szSql; 84// private string szNodeName; 85 protected System.Web.UI.WebControls.HyperLink HyperLink1; 86 private int nDoc; 87// private string userid; 88 //***************************************************************** 89 90 public int NDoc 91 { 92 set 93 { 94 nDoc=value; 95 } 96 get 97 { 98 return nDoc; 99 } 100 } 101 102 103 private void Page_Load(object sender, System.EventArgs e) 104 { 105 //****************************************** modified by 黎斌 106 if (Session["userid"]==null) 107 { 108 Response.Write ("<script>alert('超时,请重新登录');top.location.href='../userpass.aspx';</script>"); 109 return ; 110 } 111   112 //**************************************************************** 113 114 //********************************************************************************************* modified by 黎斌 115 //get the document's detail infomation 116 szSql = "select * from VIEWdocument where DocumentID=" + Request.QueryString["DocumentID"].ToString(); 117 dsDocument = oConn.getBinding(szSql,"Temp"); 118 if ( dsDocument.Tables ["Temp"].Rows .Count <=0) 119 { 120 return ; 121 } 122 Lbl_DraftDepartment.Text = dsDocument.Tables["Temp"].Rows[0]["DrawMan"].ToString(); 123 Lbl_DocumentType.Text = dsDocument.Tables["Temp"].Rows[0]["DocumentTypeDescription"].ToString(); 124 Lbl_DocumentTypeName.Text = dsDocument.Tables["Temp"].Rows[0]["DocumentTypeName"].ToString(); 125 Lbl_SecretGreadName.Text = dsDocument.Tables["Temp"].Rows[0]["SecretGreadName"].ToString(); 126 Lbl_ExigenceDegreeName.Text = dsDocument.Tables["Temp"].Rows[0]["ExigenceDegreeName"].ToString(); 127 Lbl_StreamName.Text = dsDocument.Tables["Temp"].Rows[0]["StreamName"].ToString(); 128 Lbl_Title.Text = dsDocument.Tables["Temp"].Rows[0]["Title"].ToString(); 129 Lbl_Time.Text = dsDocument.Tables["Temp"].Rows[0]["FileDate"].ToString(); 130 131 132 nDoc=int.Parse (Request.QueryString["DocumentID"].ToString()); 133 szSql = "select v.stepID,a.userid,a.username, v.idea,v.ManageID ,departmentname from VIEWDocumentTransact v inner join accounts_Users a on v.username=a.username where DocumentID='" +nDoc+"'" ; 134 dsDocument = oConn.getBinding(szSql,"Temp"); 135 136 137 138 OI.cs.readStream oReadStream = new OI.cs.readStream(); 139 oReadStream.doucmentID = nDoc;//appoint stream by the document ID 140 141 string szNodeName=""; 142 foreach (DataRow dr in dsDocument.Tables["Temp"].Rows) 143 { 144 szNodeName = oReadStream.GetNodeTypeByID(dr["StepID"].ToString()); 145 string userid=dr["userid"].ToString(); 146 147 OI.cs.personalSign sign=new OI.cs.personalSign (); 148 sign.UserID =int.Parse (userid); 149 string displaySign=sign.Displayimg(true); 150 string departmentname=dr["departmentname"].ToString (); 151 152 if (true)//dr["Idea"].ToString().Trim() != "" && dr["Idea"] != null) 153 { 154 155 Lbl_Content += "<tr align=left>"; 156 Lbl_Content += "<td width='20%' align=right>工作流节点名称:</td>"; 157 Lbl_Content += "<td width='15%'>&nbsp;" + szNodeName + "</td>"; 158 Lbl_Content += "<td width='15%' align=right >处理人:</td>"; 159 if(szNodeName.Trim ()=="公文起草" ) 160 { 161 Lbl_Content += "<td width='20%'>&nbsp;" + Lbl_DraftDepartment.Text + "</Td><td width=30%>部门:"+departmentname +"</td>"; 162 Lbl_Content += "</tr>"; 163 } 164 else 165 { 166 if ( szNodeName.Trim ()=="公文中转") 167 { 168 169 Lbl_Content += "<td width='20%'>&nbsp;" + dr["username"].ToString () + "</Td><td width=30%>部门:"+departmentname +"</td>"; 170 Lbl_Content += "</tr>"; 171 } 172 else 173 { 174 Lbl_Content += "<td width='20%'>&nbsp;" + displaySign + "</Td><td width=30%>部门:"+departmentname +"</td>"; 175 176 // Lbl_Content += "<td></td>"; 177 Lbl_Content += "</tr>"; 178 179 Lbl_Content += "<tr bgcolor=#fffaf0>"; 180 181 182 Lbl_Content += "<td align=right >处理意见:</td>"; 183 Lbl_Content += "<td >&nbsp;" + dr["Idea"].ToString().Replace("\r\n","<br>")+ "</td>"; 184 185 string doType=""; 186 if(dr["ManageID"].ToString ().Trim ()=="1") 187 doType="同意"; 188 else 189 { 190 if(dr["ManageID"].ToString ().Trim ()=="4") 191 { 192 doType="中转"; 193 } 194 else 195 { 196 doType="退回"; 197 } 198 } 199 Lbl_Content +="<td colspan=2 align=right >处理类型:</td>"; 200 Lbl_Content +="<td >&nbsp;"+doType+"</td>"; 201 202 Lbl_Content += "</tr>"; 203 } 204 } 205 } 206 } 207 //************************************************************************************************************ 208 209 // 在此处放置用户代码以初始化页面 210 211 212 mHTMLPath=""; 213 mDisabled=""; 214 mScriptName="ArchiveDetail.aspx"; 215 mServerName="webdocserver.aspx"; 216 mClientName="../FairyWebOfficeOcx.ocx"; 217 mHttpUrl="http://" + Request.ServerVariables["HTTP_HOST"] + Request.ServerVariables["SCRIPT_NAME"]; 218 mHttpUrl=mHttpUrl.Substring(0,mHttpUrl.Length -mScriptName.Length); 219 if(System.Web.HttpRuntime.AppDomainAppVirtualPath=="") 220 mServerUrl="http://"+Request.ServerVariables["HTTP_HOST"] +"/DocTemplate/" + mServerName; 221 else 222 mServerUrl="http://"+Request.ServerVariables["HTTP_HOST"] +System.Web.HttpRuntime.AppDomainAppVirtualPath+"/DocTemplate/" + mServerName; 223 mClientUrl=mHttpUrl + mClientName; 224 225 226 227 mTemplate=Request.QueryString["Template"]; 228 mFileType=Request.QueryString["FileType"]; 229 mEditType=Request.QueryString["EditType"]; 230 mUserName=Session["UserName"].ToString(); 231 232 //取得编号 233 if ( mRecordID==null) 234 { 235 mRecordID=""; //编号为空 236 } 237 //取得模式 238 if ( mEditType==null) 239 { 240 mEditType="0"; // 0 只读 241 } 242 if((mEditType=="0") || (mEditType=="1")) 243 { 244 Panel1.Visible=false;//在起草和显示时不显示左边的工具栏  245 } 246 //取得类型 247 if ( mFileType==null) 248 { 249 mFileType=".doc"; // 默认为.doc文档 250 } 251 //取得用户名 252 if (mUserName==null) 253 { 254 mUserName="成都派尔科技有限公司"; 255 } 256 257 258 259 //取得模板 260 if ( mTemplate==null) 261 { 262 mTemplate=""; // 默认没有模板 263 } 264 265 //打开数据库 266 string strSelectCmd="Select * From view_document Where documentid="+ nDoc ;//:pf modify here by 2003.12.11 11:05 267 //string strSelectCmd="Select * From Document Where RecordID='"+ mRecordID + "'"; 268 SqlCommand mCommand = new SqlCommand(strSelectCmd,oConn.GetConn());//更改 269 SqlDataReader mReader = mCommand.ExecuteReader(CommandBehavior.CloseConnection); 270 271 if (mReader.Read()) 272 { 273 mRecordID=mReader["RecordID"].ToString(); 274 mTemplate=mReader["Template"].ToString() ; 275 mSubject=mReader["Subject"].ToString(); 276 mAuthor=mReader["drawman"].ToString(); 277 mFileDate=mReader["FileDate"].ToString(); 278 mStatus=mReader["Status"].ToString(); 279 mFileType=mReader["FileType"].ToString(); 280 mHTMLPath=mReader["HTMLPath"].ToString() ; 281 PTitle=mReader["Title"].ToString() ; 282 PSendDate=mReader["SendDate"].ToString() ; 283 Psecretgreadname=mReader["secretgreadname"].ToString() ; 284 Pdocumenttypename=mReader["documenttypename"].ToString() ; 285 Pexigencedegreename=mReader["exigencedegreename"].ToString() ; 286 mReader.Close(); 287 } 288 else 289 { 290 mReader.Close(); 291 292 System.DateTime SystemTime; 293 SystemTime=DateTime.Now; 294 295 mRecordID=SystemTime.ToString("yyyyMMddhhmmss"); 296 mTemplate=mTemplate; 297 mSubject="请输入标题"; 298 mAuthor=mUserName; 299 mFileDate=oConn.GetDateTime(); 300 mStatus="DERF"; 301 mFileType=mFileType; 302 mHTMLPath=""; 303 } 304 305 306 if ( mStatus.CompareTo("EDIT")==0 ) mEditType="0"; // 0 显示 307 if ( mStatus.CompareTo("READ")==0 ) mEditType=mEditType; // 308 if ( mStatus.CompareTo("DERF")==0 ) mEditType="1" ; // 1 起草 309 310 //mEditType = "0";//modified by 黎斌 311 if ( mEditType.CompareTo("0")==0) 312 { 313 mDisabled="disabled"; 314 } 315 else 316 { 317 mDisabled=""; 318 } 319 320 mFileName=mRecordID + mFileType; 321 if (mFileType==".doc") 322 { 323 mWord=""; 324 mExcel="disabled"; 325 } 326 else 327 { 328 mWord="disabled"; 329 mExcel=""; 330 } 331 332 } 333 334 335 Web 窗体设计器生成的代码 355 356// private void LB_Stream_Click(object sender, System.EventArgs e) 357// { 358// Response.Redirect("../desktop/StreamDetail.aspx",true); 359// } 360 } 361} 362
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:PowerOA办公自动化系统商业源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146