2024-05-08 17:17:11 +08:00
using BLL ;
using System ;
using System.Collections.Generic ;
using System.Data ;
using System.Data.SqlClient ;
using System.Linq ;
using System.Web ;
using System.Web.UI ;
using System.Web.UI.WebControls ;
namespace FineUIPro.Web.YLRQ.TestDataManagement
{
public partial class RTReportEdit : PageBase
{
#region 定 义 项
/// <summary>
/// 主键
/// </summary>
private string TestingReportPrintId
{
get
{
return ( string ) ViewState [ "TestingReportPrintId" ] ;
}
set
{
ViewState [ "TestingReportPrintId" ] = value ;
}
}
/// <summary>
/// 检测报告Id
/// </summary>
private string ReportPrintId
{
get
{
return ( string ) ViewState [ "ReportPrintId" ] ;
}
set
{
ViewState [ "ReportPrintId" ] = value ;
}
}
/// <summary>
/// 规格
/// </summary>
private string Specifications
{
get
{
return ( string ) ViewState [ "Specifications" ] ;
}
set
{
ViewState [ "Specifications" ] = value ;
}
}
/// <summary>
/// 检测类型主键
/// </summary>
private string NDT_ID
{
get
{
return ( string ) ViewState [ "NDT_ID" ] ;
}
set
{
ViewState [ "NDT_ID" ] = value ;
}
}
/// <summary>
/// 委托单
/// </summary>
private string EntrustId
{
get
{
return ( string ) ViewState [ "EntrustId" ] ;
}
set
{
ViewState [ "EntrustId" ] = value ;
}
}
/// <summary>
/// 焊缝主键
/// </summary>
private string WeldingId
{
get
{
return ( string ) ViewState [ "WeldingId" ] ;
}
set
{
ViewState [ "WeldingId" ] = value ;
}
}
#endregion
#region 加 载
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load ( object sender , EventArgs e )
{
if ( ! IsPostBack )
{
#region 加 载 下 拉 列 表
//检测时机
this . drpTestingTime . DataValueField = "ConstValue" ;
this . drpTestingTime . DataTextField = "ConstText" ;
this . drpTestingTime . DataSource = BLL . ConstValue . drpConstItemList ( BLL . ConstValue . Group_TestingTime ) ;
this . drpTestingTime . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpTestingTime ) ;
//热处理状态
this . drpHotProessState . DataValueField = "ConstValue" ;
this . drpHotProessState . DataTextField = "ConstText" ;
this . drpHotProessState . DataSource = BLL . ConstValue . drpConstItemList ( BLL . ConstValue . Group_HotProessState ) ;
this . drpHotProessState . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpHotProessState ) ;
//透照方式
this . drpTransilluminationMode . DataValueField = "ConstValue" ;
this . drpTransilluminationMode . DataTextField = "ConstText" ;
this . drpTransilluminationMode . DataSource = BLL . ConstValue . drpConstItemList ( BLL . ConstValue . Group_TransilluminationMode ) ;
this . drpTransilluminationMode . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpTransilluminationMode ) ;
//设备型号
this . drpEquipmentCode . DataValueField = "EquipmentId" ;
this . drpEquipmentCode . DataTextField = "EquipmentName" ;
this . drpEquipmentCode . DataSource = BLL . HJGL_EquipmentService . GetEquipmentList ( ) ;
this . drpEquipmentCode . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpEquipmentCode ) ;
//γ源种类
this . drpSourceType . DataValueField = "ConstValue" ;
this . drpSourceType . DataTextField = "ConstText" ;
this . drpSourceType . DataSource = BLL . ConstValue . drpConstItemList ( BLL . ConstValue . Group_SourceType ) ;
this . drpSourceType . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpSourceType ) ;
//像质计型号
this . drpImageQualityModel . DataValueField = "ConstValue" ;
this . drpImageQualityModel . DataTextField = "ConstText" ;
this . drpImageQualityModel . DataSource = BLL . ConstValue . drpConstItemList ( BLL . ConstValue . Group_ImageQualityModel ) ;
this . drpImageQualityModel . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpImageQualityModel ) ;
//底片黑度
this . drpFilmDensity . DataValueField = "ConstValue" ;
this . drpFilmDensity . DataTextField = "ConstText" ;
this . drpFilmDensity . DataSource = BLL . ConstValue . drpConstItemList ( BLL . ConstValue . Group_FilmDensity ) ;
this . drpFilmDensity . DataBind ( ) ;
Funs . FineUIPleaseSelect ( this . drpFilmDensity ) ;
#endregion
this . ReportPrintId = HttpUtility . UrlDecode ( Request . Params [ "reportPrintId" ] ) ;
if ( ! string . IsNullOrEmpty ( this . ReportPrintId ) )
{
this . drpFilmDensity . Text = "2.0~ 4.5" ;
this . txtDeveloperTemperature . Text = "18℃~22℃" ;
this . txtDeveloperTime . Text = "4~ 8min" ;
this . drpTubeCurrent . Text = " mA" ;
WeldingId = ReportPrintId . Split ( '|' ) [ 0 ] ;
Specifications = ReportPrintId . Split ( '|' ) [ 1 ] ;
NDT_ID = ReportPrintId . Split ( '|' ) [ 2 ] ;
EntrustId = ReportPrintId . Split ( '|' ) [ 3 ] ;
string WeldingCode = ReportPrintId . Split ( '|' ) [ 4 ] ;
var trust = Funs . DB . PV_EntrustRecord . FirstOrDefault ( p = > p . Id = = EntrustId ) ;
var pro = Funs . DB . Base_Project . FirstOrDefault ( s = > s . ProjectId = = trust . ProjectId ) ;
var weld = Funs . DB . PV_WeldInformation . FirstOrDefault ( p = > p . WeldingId = = WeldingId ) ;
this . txtCH_TrustUnit . Text = "舟山分公司" ;
this . txtContractUnit . Text = "镇海石化建安工程有限公司" ;
if ( weld ! = null )
{
this . txtWeldingCode . Text = weld . WeldingCode ;
var ste = Funs . DB . HJGL_BS_Steel . FirstOrDefault ( s = > s . STE_ID = = weld . TextureMaterial1 ) ;
if ( ste ! = null )
{
this . txtSteelCode . Text = ste . STE_Code ;
}
var ndt = Funs . DB . PV_TestMethod . FirstOrDefault ( p = > p . Ndt_Id = = this . NDT_ID ) ;
if ( ndt ! = null )
{
this . txtNDTR_Name . Text = ndt . Ndt_NdtName ;
this . txtCH_NDTCriteria . Text = ndt . Ndt_TestStandardCode ;
this . txtCH_AcceptGrade . Text = ndt . Ndt_Level ;
}
var wme = Funs . DB . HJGL_BS_WeldMethod . FirstOrDefault ( p = > p . WME_ID = = Request . Params [ "WME_ID" ] ) ;
if ( wme ! = null )
{
this . txtWME_Name . Text = wme . WME_Name ;
}
//this.drpEquipmentCode.Text = eq.EquipmentCode;
//this.drpSourceType.Text = equipment.EquipmentName;
}
this . txtSpecifications . Text = Specifications ;
this . drpHotProessState . Text = "消应力" ; //热处理状态
this . drpTestingTime . Text = "焊后" ;
this . txtTechnicalGrade . Text = "AB" ;
this . txtFilmModel . Text = "AGFA C" ;
this . txtIntensifyingWay . Text = "Pb(0.1/0.1)" ;
this . txtSourceActivity . Text = " Ci" ;
this . drpImageQualityModel . Text = "FE JB" ;
this . txtFocalLength . Text = " mm" ;
this . txtExposureTime . Text = " min" ;
this . txtEffectiveLength . Text = " mm" ;
string jotyName = weld . WeldingCode ;
this . txtIso_No . Text = weld . WeldingCode ;
var rtReport = Funs . DB . PV_CH_TestingReportPrint . FirstOrDefault ( s = > s . Specifications = = Specifications & & s . NdtId = = NDT_ID & & s . EntrustId = = EntrustId & & s . STE_ID = = Request . Params [ "STE_ID" ] & & s . STE_ID2 = = Request . Params [ "STE_ID2" ] & & s . WME_ID = = Request . Params [ "WME_ID" ] ) ;
if ( rtReport ! = null )
{
this . txtContractUnit . Text = rtReport . ContractUnitId ;
this . TestingReportPrintId = rtReport . TestingReportPrintId ;
if ( ! string . IsNullOrEmpty ( rtReport . ReportCode ) & & rtReport . ReportCode . Length > 3 )
{
this . txtRTReportCode . Text = rtReport . ReportCode . Substring ( 3 ) ;
}
else
{
this . txtRTReportCode . Text = rtReport . ReportCode ;
}
this . drpEquipmentCode . Text = rtReport . EquipmentCode ;
this . drpSourceType . Text = rtReport . EquipmentName ;
this . hdReportCode . Text = rtReport . ReportCode ;
this . txtTechnicalGrade . Text = rtReport . RT_TechnicalGrade ;
this . drpTubeCurrent . Text = rtReport . RT_TubeCurrent ;
this . drpSourceType . Text = rtReport . RT_SourceType ;
this . drpFilmDensity . Text = rtReport . RT_FilmDensity ;
this . txtDeveloperTemperature . Text = rtReport . RT_DeveloperTemperature ;
this . txtDeveloperTime . Text = rtReport . RT_DeveloperTime ;
this . txtPrinter . Text = rtReport . Printer ;
this . txtPrintTime . Text = string . Format ( "{0:yyyy-MM-dd}" , rtReport . PrintTime ) ;
this . drpTestingTime . Text = rtReport . TestingTime ;
this . drpTransilluminationMode . Text = rtReport . TransilluminationMode ;
this . txtTubeVoltage . Text = rtReport . TubeVoltage ;
this . txtSourceActivity . Text = rtReport . SourceActivity ;
this . drpImageQualityModel . Text = rtReport . ImageQualityModel ;
this . txtWireDiameterCode . Text = rtReport . WireDiameterCode ;
this . txtFocalLength . Text = rtReport . FocalLength ;
this . txtExposureTime . Text = rtReport . ExposureTime ;
this . txtEffectiveLength . Text = rtReport . EffectiveLength ;
if ( ! string . IsNullOrEmpty ( rtReport . EquipmentCode ) )
{
this . drpEquipmentCode . SelectedValue = rtReport . EquipmentCode ;
var equipment = BLL . HJGL_EquipmentService . GetEquipmentById ( this . drpEquipmentCode . SelectedValue ) ;
if ( equipment ! = null )
{
this . txtFocalSize . Text = equipment . FocalSize ;
this . txtFilmModel . Text = equipment . FilmModel ;
this . txtIntensifyingWay . Text = equipment . IntensifyingWay ;
this . txtLineEnergy . Text = equipment . LineEnergy ;
}
}
if ( ! string . IsNullOrEmpty ( this . txtPrinter . Text . Trim ( ) ) & & ! string . IsNullOrEmpty ( this . txtPrintTime . Text . Trim ( ) ) )
{
this . cbIsPrint . Checked = true ;
}
this . drpHotProessState . Text = rtReport . HotProessState ;
}
else
{
this . hdReportCode . Text = BLL . SQLHelper . RunProcNewIdByProjectId ( "SpGetNewCodeByProjectId3" , "PV_CH_TestingReportPrint" , "ReportCode" , weld . ProjectId , "RT-" + pro . TestEngineeringCode + "-" ) ;
this . txtRTReportCode . Text = this . hdReportCode . Text . Substring ( 3 ) ;
this . txtTubeVoltage . Text = " kv" ;
}
BindGrid ( ) ;
}
}
}
#endregion
#region 提 交
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click ( object sender , EventArgs e )
{
var entrust = Funs . DB . PV_EntrustRecord . FirstOrDefault ( p = > p . Id = = EntrustId ) ;
Model . PV_CH_TestingReportPrint newRTReport = new Model . PV_CH_TestingReportPrint ( ) ;
if ( ! string . IsNullOrEmpty ( this . TestingReportPrintId ) )
{
newRTReport = Funs . DB . PV_CH_TestingReportPrint . FirstOrDefault ( p = > p . TestingReportPrintId = = this . TestingReportPrintId ) ;
}
if ( entrust ! = null )
{
newRTReport . ProjectId = entrust . ProjectId ;
}
newRTReport . WeldingId = this . WeldingId ;
newRTReport . EntrustId = this . EntrustId ;
newRTReport . Specifications = this . Specifications ;
newRTReport . JotyName = this . txtIso_No . Text ;
newRTReport . NdtId = this . NDT_ID ;
newRTReport . ReportCode = this . hdReportCode . Text . Trim ( ) ;
newRTReport . ContractUnitId = this . txtContractUnit . Text . Trim ( ) ;
newRTReport . RT_TechnicalGrade = this . txtTechnicalGrade . Text . Trim ( ) ;
if ( this . drpTubeCurrent . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpTubeCurrent . Text . Trim ( ) ) )
{
newRTReport . RT_TubeCurrent = this . drpTubeCurrent . Text . Trim ( ) ;
}
else
{
newRTReport . RT_TubeCurrent = this . drpTubeCurrent . SelectedValue ;
}
}
if ( this . drpSourceType . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpSourceType . Text . Trim ( ) ) )
{
newRTReport . RT_SourceType = this . drpSourceType . Text . Trim ( ) ;
}
else
{
newRTReport . RT_SourceType = this . drpSourceType . SelectedValue ;
}
}
if ( this . drpFilmDensity . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpFilmDensity . Text ) )
{
newRTReport . RT_FilmDensity = this . drpFilmDensity . Text . Trim ( ) ;
}
else
{
newRTReport . RT_FilmDensity = this . drpFilmDensity . SelectedValue ;
}
}
newRTReport . RT_DeveloperTemperature = this . txtDeveloperTemperature . Text . Trim ( ) ;
newRTReport . RT_DeveloperTime = this . txtDeveloperTime . Text . Trim ( ) ;
newRTReport . Printer = this . txtPrinter . Text . Trim ( ) ;
newRTReport . PrintTime = Funs . GetNewDateTime ( this . txtPrintTime . Text . Trim ( ) ) ;
if ( this . drpTestingTime . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpTestingTime . Text . Trim ( ) ) )
{
newRTReport . TestingTime = this . drpTestingTime . Text . Trim ( ) ;
}
else
{
newRTReport . TestingTime = this . drpTestingTime . SelectedValue ;
}
}
if ( this . drpTransilluminationMode . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpTransilluminationMode . Text . Trim ( ) ) )
{
newRTReport . TransilluminationMode = this . drpTransilluminationMode . Text . Trim ( ) ;
}
else
{
newRTReport . TransilluminationMode = this . drpTransilluminationMode . SelectedValue ;
}
}
newRTReport . TubeVoltage = this . txtTubeVoltage . Text . Trim ( ) ;
newRTReport . SourceActivity = this . txtSourceActivity . Text . Trim ( ) ;
if ( this . drpImageQualityModel . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpImageQualityModel . Text ) )
{
newRTReport . ImageQualityModel = this . drpImageQualityModel . Text . Trim ( ) ;
}
else
{
newRTReport . ImageQualityModel = this . drpImageQualityModel . SelectedValue ;
}
}
newRTReport . WireDiameterCode = this . txtWireDiameterCode . Text . Trim ( ) ;
newRTReport . FocalLength = this . txtFocalLength . Text . Trim ( ) ;
newRTReport . ExposureTime = this . txtExposureTime . Text . Trim ( ) ;
newRTReport . EffectiveLength = this . txtEffectiveLength . Text . Trim ( ) ;
if ( this . drpEquipmentCode . SelectedValue ! = BLL . Const . _Null )
{
newRTReport . EquipmentCode = this . drpEquipmentCode . SelectedValue ;
newRTReport . EquipmentName = this . drpEquipmentCode . SelectedValue ;
var equipment = Funs . DB . HJGL_BS_Equipment . FirstOrDefault ( s = > s . EquipmentId = = this . drpEquipmentCode . SelectedValue ) ;
if ( equipment ! = null )
{
newRTReport . RT_FocalSize = equipment . FocalSize ;
newRTReport . FilmModel = equipment . FilmModel ;
newRTReport . IntensifyingWay = equipment . IntensifyingWay ;
}
}
if ( this . drpHotProessState . SelectedValue ! = BLL . Const . _Null )
{
if ( ! string . IsNullOrEmpty ( this . drpHotProessState . Text . Trim ( ) ) )
{
newRTReport . HotProessState = this . drpHotProessState . Text . Trim ( ) ;
}
else
{
newRTReport . HotProessState = this . drpHotProessState . SelectedValue ;
}
}
newRTReport . STE_ID = Request . Params [ "STE_ID" ] ;
newRTReport . STE_ID2 = Request . Params [ "STE_ID2" ] ;
newRTReport . WME_ID = Request . Params [ "WME_ID" ] ;
if ( string . IsNullOrEmpty ( this . TestingReportPrintId ) )
{
newRTReport . Type = "RT" ;
this . TestingReportPrintId = SQLHelper . GetNewID ( typeof ( Model . PV_CH_TestingReportPrint ) ) ;
newRTReport . TestingReportPrintId = this . TestingReportPrintId ;
Funs . DB . PV_CH_TestingReportPrint . InsertOnSubmit ( newRTReport ) ;
}
Funs . DB . SubmitChanges ( ) ;
ShowNotify ( "提交成功!" , MessageBoxIcon . Success ) ;
PageContext . RegisterStartupScript ( ActiveWindow . GetHideReference ( ) ) ;
}
#endregion
#region 绑 定 数 据
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid ( )
{
string strSql = @"SELECT v.* FROM(
SELECT ROW_NUMBER() OVER(ORDER BY report.WeldingCode,report.FilmNum) AS Number,report.*
FROM
(SELECT v1.* FROM(
SELECT QualityRating.QualityRatingId,
JointInfo.JointDesc,JointInfo.WeldingCode,
QualityRating.FilmNum,
(select a.pkidStr from (SELECT STUFF(( SELECT ',' +convert(VARCHAR, WED_Code) FROM (select Welder.WED_Code from HJGL_BS_Welder as Welder where Welder.WED_ID in (select Id from StrToTable(JointInfo.BackingWelderId)))t FOR XML PATH('')), 1, 1, '') AS pkidStr) a)+','+(select a.pkidStr from (SELECT STUFF(( SELECT ',' +convert(VARCHAR, WED_Code) FROM (select Welder.WED_Code from HJGL_BS_Welder as Welder where Welder.WED_ID in (select Id from StrToTable(JointInfo.CoverWelderId)))t FOR XML PATH('')), 1, 1, '') AS pkidStr) a) as WED_Code,
QualityRating.DefectNature,QualityRating.DefectRation as DefectSize,
QualityRating.DefectResult,QualityRating.Remark
FROM dbo.PV_BO_QualityRating AS QualityRating
LEFT JOIN DBO.PV_ManagementMethod AS TrustItem ON TrustItem.MethodId = QualityRating.MethodId
LEFT JOIN dbo.PV_EntrustRecord trust ON trust.Id = TrustItem.EntrustId
LEFT JOIN DBO.PV_WeldInformation AS JointInfo ON JointInfo.WeldingId=QualityRating.WeldingId
WHERE QualityRating.WeldingId=@WeldingId
AND JointInfo.JointDesc=@JointDesc
AND JointInfo.TextureMaterial1=@STE_ID
AND (JointInfo.TextureMaterial2=@STE_ID2 or @STE_ID2='')
2026-02-10 15:55:39 +08:00
AND (JointInfo.WmeId=@WME_ID OR @WME_ID='')
2024-05-08 17:17:11 +08:00
AND trust.NdtId=@NDT
AND trust.Id=@EntrustId
) v1
UNION all
SELECT v2.* from (
SELECT qualityRatingRepair.QualityRatingId AS QualityRatingId,JointInfo.JointDesc,JointInfo.WeldingCode,(qualityRatingRepair.FilmNum+record.RepairMark) AS FilmNum,
(select a.pkidStr from (SELECT STUFF(( SELECT ',' +convert(VARCHAR, WED_Code) FROM (select Welder.WED_Code from HJGL_BS_Welder as Welder where Welder.WED_ID in (select Id from StrToTable(record.BackingWelderId)))t FOR XML PATH('')), 1, 1, '') AS pkidStr) a)+','+(select a.pkidStr from (SELECT STUFF(( SELECT ',' +convert(VARCHAR, WED_Code) FROM (select Welder.WED_Code from HJGL_BS_Welder as Welder where Welder.WED_ID in (select Id from StrToTable(record.CoverWelderId)))t FOR XML PATH('')), 1, 1, '') AS pkidStr) a) as WED_Code,
qualityRatingRepair.DefectNature,
qualityRatingRepair.DefectRation as DefectSize,qualityRatingRepair.DefectResult,
qualityRatingRepair.Remark
FROM dbo.PV_BO_QualityRating AS qualityRatingRepair
LEFT JOIN dbo.PV_CH_RepairItemRecord record ON record.QualityRatingId = qualityRatingRepair.QualityRatingId
LEFT JOIN DBO.PV_WeldInformation AS JointInfo ON JointInfo.WeldingId=qualityRatingRepair.WeldingId
left join PV_EntrustRecord as trust on trust.Id=record.EntrustId
WHERE qualityRatingRepair.WeldingId=@WeldingId
AND JointInfo.JointDesc=@JointDesc
AND JointInfo.TextureMaterial1=@STE_ID AND (JointInfo.TextureMaterial2=@STE_ID2 or @STE_ID2='')
2026-02-10 15:55:39 +08:00
AND (JointInfo.WmeId=@WME_ID OR @WME_ID='')
2024-05-08 17:17:11 +08:00
AND record.NdtId=@NDT
AND trust.Id=@EntrustId
) v2)
report) v" ;
List < SqlParameter > listStr = new List < SqlParameter > ( ) ;
listStr . Add ( new SqlParameter ( "@WeldingId" , this . WeldingId ) ) ;
listStr . Add ( new SqlParameter ( "@JointDesc" , this . Specifications ) ) ;
listStr . Add ( new SqlParameter ( "@STE_ID" , Request . Params [ "STE_ID" ] ) ) ;
listStr . Add ( new SqlParameter ( "@STE_ID2" , Request . Params [ "STE_ID2" ] ) ) ;
listStr . Add ( new SqlParameter ( "@WME_ID" , Request . Params [ "WME_ID" ] ) ) ;
listStr . Add ( new SqlParameter ( "@NDT" , this . NDT_ID ) ) ;
listStr . Add ( new SqlParameter ( "@EntrustId" , this . EntrustId ) ) ;
SqlParameter [ ] parameter = listStr . ToArray ( ) ;
DataTable tb = SQLHelper . GetDataTableRunText ( strSql , parameter ) ;
// 2.获取当前分页数据
Grid1 . RecordCount = tb . Rows . Count ;
tb = GetFilteredTable ( Grid1 . FilteredData , tb ) ;
var table = this . GetPagedDataTable ( Grid1 , tb ) ;
Grid1 . DataSource = table ;
Grid1 . DataBind ( ) ;
}
#endregion
#region 分 页 排 序
/// <summary>
/// 页索引改变事件
/// </summary>
protected void Grid1_PageIndexChange ( object sender , GridPageEventArgs e )
{
BindGrid ( ) ;
}
/// <summary>
/// 排序
/// </summary>
protected void Grid1_Sort ( object sender , GridSortEventArgs e )
{
BindGrid ( ) ;
}
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
protected void ddlPageSize_SelectedIndexChanged ( object sender , EventArgs e )
{
Grid1 . PageSize = Convert . ToInt32 ( ddlPageSize . SelectedValue ) ;
BindGrid ( ) ;
}
#endregion
#region 是 否 打 印 点 击 事 件
/// <summary>
/// 是否打印点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void cbIsPrint_CheckedChanged ( object sender , CheckedEventArgs e )
{
if ( this . cbIsPrint . Checked = = false )
{
this . txtPrinter . Text = string . Empty ;
this . txtPrintTime . Text = string . Empty ;
}
}
#endregion
#region DropDownList下拉选择事件
/// <summary>
/// 设备型号下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpEquipmentCode_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( this . drpEquipmentCode . SelectedValue ! = BLL . Const . _Null )
{
var equipment = BLL . HJGL_EquipmentService . GetEquipmentById ( this . drpEquipmentCode . SelectedValue ) ;
if ( equipment ! = null )
{
this . txtFocalSize . Text = equipment . FocalSize ;
this . txtFilmModel . Text = equipment . FilmModel ;
this . txtIntensifyingWay . Text = equipment . IntensifyingWay ;
this . txtLineEnergy . Text = equipment . LineEnergy ;
}
else
{
this . txtFocalSize . Text = string . Empty ;
this . txtFilmModel . Text = string . Empty ;
this . txtIntensifyingWay . Text = string . Empty ;
this . txtLineEnergy . Text = string . Empty ;
}
}
else
{
this . txtFocalSize . Text = string . Empty ;
this . txtFilmModel . Text = string . Empty ;
this . txtIntensifyingWay . Text = string . Empty ;
this . txtLineEnergy . Text = string . Empty ;
}
}
#endregion
}
}