using System; using System.Collections; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using BLL; namespace FineUIPro.Web.FileManage { public partial class editCAD : PageBase { public string url, newofficetype, strOper; public string txtArea, txtIsoCode, txtIsoId, filename;//定义表单数据 protected void Page_Load(object sender, EventArgs e) { txtIsoId = Request.QueryString["url"]; newofficetype = Request.QueryString["newofficetype"]; //strOper = Request.QueryString["oper"]; url = txtIsoId; if (txtIsoId != null && txtIsoId != "") { SqlDataReader dr = null; string strSql = string.Empty; try { //strSql = "select iso.ISO_IsoNo,iso.FileName,area.WorkAreaCode from dbo.HJGL_PW_IsoInfo iso left join dbo.Project_WorkArea area on area.WorkAreaId=iso.BAW_ID where iso.ISO_ID='" + txtIsoId + "'"; //dr = BLL.SQLHelper.RunSql(strSql); var q = from x in BLL.Funs.DB.HJGL_PW_IsoInfo join y in BLL.Funs.DB.Project_WorkArea on x.BAW_ID equals y.WorkAreaId where x.ISO_ID == txtIsoId select new { x.ISO_IsoNo, FileName="", y.WorkAreaCode }; if (q.Count()>0) { txtIsoCode = q.First().ISO_IsoNo.ToString(); txtArea = q.First().WorkAreaCode.ToString(); if (q.First().FileName != null) { q.First().FileName.ToString(); } else { filename = ""; } } } catch (Exception err) { } } } public string jointList() { var q = from x in BLL.Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == txtIsoId orderby x.JOT_JointNo select x; string jointArr = string.Empty; if (q.Count() > 0) { foreach (var j in q) { if (!string.IsNullOrEmpty(j.DReportID)) { jointArr = jointArr + j.JOT_ID + "," + j.JOT_JointNo + "已焊" + "|"; } else { jointArr = jointArr + j.JOT_ID + "," + j.JOT_JointNo + "未焊" + "|"; } } } return jointArr.Substring(0, jointArr.Length - 1); } public string ReturnValue() { string reValue = string.Empty; var q = from x in BLL.Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == txtIsoId orderby x.JOT_JointNo select x; if (q.Count() > 0) { foreach (var j in q) { if (j.WLO_Code != null) { reValue = reValue + j.JOT_ID + "," + (j.WLO_Code == "F" ? "安装" : "预制") + ","; } else { reValue = reValue + j.JOT_ID + "," + "" + ","; } if (j.JOT_Size != 0) { reValue = reValue + Convert.ToString(j.JOT_Size) + "|"; } else { reValue = reValue + "0" + "|"; } } } return reValue.Substring(0, reValue.Length - 1); } } }