ZHJA_HJGL/HJGL_ZH/Backup/FileManage/EditOffice.aspx.cs

95 lines
3.6 KiB
C#
Raw Normal View History

2026-02-10 15:55:39 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.FileManage
{
public partial class EditOffice : PageBase
{
public string docId, newofficetype, readURL, strOper, typeFlag;
public string txtFileId, txtFileCode, txtFileName, drpBigType, drpSmallType;//定义表单数据
public string projectName, projectCode, projectCode1, projectCode2, projectCode3,
fileCode, fileCode1, fileCode2, fileCode3, projectName1, projectName2, projectName3,
bzr, shr, spr, fbdate;
protected void Page_Load(object sender, EventArgs e)
{
docId = Request.QueryString["docId"];
newofficetype = Request.QueryString["newofficetype"];
drpBigType = Request.QueryString["drpBigType"];
drpSmallType = Request.QueryString["drpSmallType"];
strOper = Request.QueryString["oper"];
typeFlag = Request.QueryString["typeFlag"];
var p = BLL.Base_ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
if (p != null)
{
projectName = p.ProjectName;
projectName1 = projectName;
projectName2 = projectName;
projectName3 = projectName;
projectCode = p.ProjectCode;
projectCode1 = projectCode;
projectCode2 = projectCode;
projectCode3 = projectCode;
}
if (docId != null && docId != "")
{
txtFileId = docId;
//SqlDataReader dr = null;
string strSql = string.Empty;
readURL = "Read.aspx?typeFlag=" + typeFlag + "&docid=" + docId;
try
{
if (typeFlag == "00")
{
//strSql = "select * from Office_File where FileId=" + docId;
//dr = BLL.SQLHelper.RunSql(strSql);
var q = from x in Funs.DB.Common_FileManage where x.FileId.ToString() == docId select x;
if (q.Count()>0)
{
txtFileCode =q.First().FileCode;
txtFileName = q.First().FileName.ToString();
drpBigType = q.First().BigType.ToString();
drpSmallType = q.First().SmallType.ToString();
}
}
if (typeFlag == "110")
{
//strSql = "select FinalFileCode, FinalFileName from View_FinalFile where FinalFileCode='" + docId + "'";
//dr = BLL.SQLHelper.RunSql(strSql);
//var q = from x in Funs.DB.View_FinalFile where x.AccidentRecordId == docId select x;
//if (q.Count() > 0)
//{
// txtFileCode = dr["FinalFileCode"].ToString();
// if (dr["FinalFileName"] != null)
// {
// txtFileName = dr["FinalFileName"].ToString();
// }
//}
}
fileCode2 = fileCode;
fileCode3 = fileCode;
}
catch (Exception err) { }
}
}
}
}