297 lines
11 KiB
C#
297 lines
11 KiB
C#
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 ReadCad : 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 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, x.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);
|
|
return jointArr;
|
|
}
|
|
|
|
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.STE_ID != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_MaterialService.GetSteelBySteID(j.STE_ID) != null ? BLL.HJGL_MaterialService.GetSteelBySteID(j.STE_ID).STE_Name : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
// if (j.JOT_Component1 != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_ComponentsService.GetComponentByComID(j.JOT_Component1) != null ? BLL.HJGL_ComponentsService.GetComponentByComID(j.JOT_Component1).COM_Name : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
// if (j.JOTY_ID != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_WeldService.GetJointTypeByJotID(j.JOTY_ID) != null ? BLL.HJGL_WeldService.GetJointTypeByJotID(j.JOTY_ID).JOTY_Name : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_JointDesc != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_JointDesc + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_Size != 0)
|
|
// {
|
|
// reValue = reValue + Convert.ToString(j.JOT_Size) + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "0" + ",";
|
|
// }
|
|
// if (j.JOT_Dia != 0)
|
|
// {
|
|
// reValue = reValue + Convert.ToString(j.JOT_Dia) + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "0" + ",";
|
|
// }
|
|
|
|
// if (j.JST_ID != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_GrooveService.GetSlopeTypeByJSTID(j.JST_ID) != null ? BLL.HJGL_GrooveService.GetSlopeTypeByJSTID(j.JST_ID).JST_Name : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_Sch != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_Sch + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_LastTemp != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_LastTemp.ToString() + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_CellTemp != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_CellTemp.ToString() + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_PrepareTemp != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_PrepareTemp.ToString() + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_JointAttribute != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_JointAttribute.ToString() + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.WME_ID != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(j.WME_ID) != null ? BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(j.WME_ID).WME_Name : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_WeldSilk != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(j.JOT_WeldSilk) != null ? BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(j.JOT_WeldSilk).WMT_MatName : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_WeldMat != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(j.JOT_WeldMat) != null ? BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(j.JOT_WeldMat).WMT_MatName : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_Electricity != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_Electricity.ToString() + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_Voltage != null)
|
|
// {
|
|
// reValue = reValue + j.JOT_Voltage.ToString() + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.DReportID != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_PW_JointInfoService.GetReportDateByDReportID(j.DReportID).ToShortDateString()) + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.DReportID != null)
|
|
// {
|
|
// reValue = reValue + (BLL.HJGL_WeldReportService.GetWeldReportByDReportID(j.DReportID) != null ? BLL.HJGL_WeldReportService.GetWeldReportByDReportID(j.DReportID).JOT_DailyReportNo : "") + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_FloorWelder != null)
|
|
// {
|
|
// var floorWelder = from x in BLL.Funs.DB.HJGL_BS_Welder where x.WED_ID == j.JOT_FloorWelder select x;
|
|
// reValue = reValue + floorWelder.FirstOrDefault().WED_Name + ",";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + ",";
|
|
// }
|
|
|
|
// if (j.JOT_CellWelder != null)
|
|
// {
|
|
// var cellWelder = from x in BLL.Funs.DB.HJGL_BS_Welder where x.WED_ID == j.JOT_CellWelder select x;
|
|
// reValue = reValue + cellWelder.FirstOrDefault().WED_Name + "|";
|
|
// }
|
|
// else
|
|
// {
|
|
// reValue = reValue + "" + "|";
|
|
// }
|
|
// }
|
|
//}
|
|
//return reValue.Substring(0, reValue.Length - 1);
|
|
return reValue;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
} |