169 lines
9.0 KiB
C#
169 lines
9.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace FineUIPro.Web.common.WelderManage
|
|
{
|
|
public partial class WelderPrint : PageBase
|
|
{
|
|
#region 定义集合
|
|
/// <summary>
|
|
/// 焊工资质
|
|
/// </summary>
|
|
private static List<Model.Welder_WelderQualify> werlderQualifys = new List<Model.Welder_WelderQualify>();
|
|
#endregion
|
|
|
|
#region 加载
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
string welderId = Request.Params["WelderId"];
|
|
if (!string.IsNullOrEmpty(welderId))
|
|
{
|
|
Model.Welder_Welder welder = BLL.WelderService.GetWelderById(welderId);
|
|
if (welder != null)
|
|
{
|
|
this.lblWelderName.Text = welder.WelderName;
|
|
this.lblWelderStampNO.Text = welder.WelderCode;
|
|
if (welder.CertificateValidity.HasValue)
|
|
{
|
|
txtLimitDate.Text = welder.CertificateValidity.Value.Year.ToString() + "." + welder.CertificateValidity.Value.Month.ToString() + "." + welder.CertificateValidity.Value.Day.ToString();
|
|
}
|
|
if (!string.IsNullOrEmpty(welder.UnitId))
|
|
{
|
|
this.lblContractor.Text = BLL.Base_UnitService.GetUnitNameByUnitId(welder.UnitId);
|
|
}
|
|
if (!string.IsNullOrEmpty(welder.PhotoUrl))
|
|
{
|
|
this.Image1.ImageUrl = "~/" + welder.PhotoUrl;
|
|
}
|
|
if (!string.IsNullOrEmpty(welder.QRCodeAttachUrl))
|
|
{
|
|
this.imgQRcode.ImageUrl = "~/" + welder.QRCodeAttachUrl;
|
|
}
|
|
}
|
|
|
|
//资质
|
|
werlderQualifys = BLL.WelderQualifyService.GetShowWelderQualifysByWelderId(welderId);
|
|
if (werlderQualifys.Count() > 0)
|
|
{
|
|
for (int i = 0; i < werlderQualifys.Count(); i++)
|
|
{
|
|
if (i == 0)
|
|
{
|
|
if (werlderQualifys[i].CheckDate != null)
|
|
{
|
|
this.lblDate1.Text = werlderQualifys[i].CheckDate.Value.Year + "." + werlderQualifys[i].CheckDate.Value.Month;
|
|
}
|
|
this.lblQualificationItem1.Text = werlderQualifys[i].QualificationItem;
|
|
this.lblProcess1.Text = werlderQualifys[i].WeldingMethod;
|
|
this.lblBaseMaterial1.Text = werlderQualifys[i].MaterialType;
|
|
if (werlderQualifys[i].ThicknessMax.HasValue)
|
|
{
|
|
this.lblThkRange1.Text = "≤" + werlderQualifys[i].ThicknessMax;
|
|
}
|
|
if (werlderQualifys[i].SizesMin.HasValue)
|
|
{
|
|
this.lblDiaRange1.Text = "≥" + werlderQualifys[i].SizesMin;
|
|
}
|
|
this.lblPosition1.Text = werlderQualifys[i].WeldingLocation;
|
|
this.lblRemark1.Text = werlderQualifys[i].Remark;
|
|
}
|
|
|
|
if (i == 1)
|
|
{
|
|
if (werlderQualifys[i].CheckDate != null)
|
|
{
|
|
this.lblDate2.Text = werlderQualifys[i].CheckDate.Value.Year + "." + werlderQualifys[i].CheckDate.Value.Month;
|
|
}
|
|
this.lblQualificationItem2.Text = werlderQualifys[i].QualificationItem;
|
|
this.lblProcess2.Text = werlderQualifys[i].WeldingMethod;
|
|
this.lblBaseMaterial2.Text = werlderQualifys[i].MaterialType;
|
|
if (werlderQualifys[i].ThicknessMax.HasValue)
|
|
{
|
|
this.lblThkRange2.Text = "≤" + werlderQualifys[i].ThicknessMax;
|
|
}
|
|
if (werlderQualifys[i].SizesMin.HasValue)
|
|
{
|
|
this.lblDiaRange2.Text = "≥" + werlderQualifys[i].SizesMin;
|
|
}
|
|
this.lblPosition2.Text = werlderQualifys[i].WeldingLocation;
|
|
this.lblRemark2.Text = werlderQualifys[i].Remark;
|
|
}
|
|
|
|
if (i == 2)
|
|
{
|
|
if (werlderQualifys[i].CheckDate != null)
|
|
{
|
|
this.lblDate3.Text = werlderQualifys[i].CheckDate.Value.Year + "." + werlderQualifys[i].CheckDate.Value.Month;
|
|
}
|
|
this.lblQualificationItem3.Text = werlderQualifys[i].QualificationItem;
|
|
this.lblProcess3.Text = werlderQualifys[i].WeldingMethod;
|
|
this.lblBaseMaterial3.Text = werlderQualifys[i].MaterialType;
|
|
if (werlderQualifys[i].ThicknessMax.HasValue)
|
|
{
|
|
this.lblThkRange3.Text = "≤" + werlderQualifys[i].ThicknessMax;
|
|
}
|
|
if (werlderQualifys[i].SizesMin.HasValue)
|
|
{
|
|
this.lblDiaRange3.Text = "≥" + werlderQualifys[i].SizesMin;
|
|
}
|
|
this.lblPosition3.Text = werlderQualifys[i].WeldingLocation;
|
|
this.lblRemark3.Text = werlderQualifys[i].Remark;
|
|
}
|
|
|
|
if (i == 3)
|
|
{
|
|
if (werlderQualifys[i].CheckDate != null)
|
|
{
|
|
this.lblDate4.Text = werlderQualifys[i].CheckDate.Value.Year + "." + werlderQualifys[i].CheckDate.Value.Month;
|
|
}
|
|
this.lblQualificationItem4.Text = werlderQualifys[i].QualificationItem;
|
|
this.lblProcess4.Text = werlderQualifys[i].WeldingMethod;
|
|
this.lblBaseMaterial4.Text = werlderQualifys[i].MaterialType;
|
|
if (werlderQualifys[i].ThicknessMax.HasValue)
|
|
{
|
|
this.lblThkRange4.Text = "≤" + werlderQualifys[i].ThicknessMax;
|
|
}
|
|
if (werlderQualifys[i].SizesMin.HasValue)
|
|
{
|
|
this.lblDiaRange4.Text = "≥" + werlderQualifys[i].SizesMin;
|
|
}
|
|
this.lblPosition4.Text = werlderQualifys[i].WeldingLocation;
|
|
this.lblRemark4.Text = werlderQualifys[i].Remark;
|
|
}
|
|
|
|
if (i == 4)
|
|
{
|
|
if (werlderQualifys[i].CheckDate != null)
|
|
{
|
|
this.lblDate5.Text = werlderQualifys[i].CheckDate.Value.Year + "." + werlderQualifys[i].CheckDate.Value.Month;
|
|
}
|
|
this.lblQualificationItem5.Text = werlderQualifys[i].QualificationItem;
|
|
this.lblProcess5.Text = werlderQualifys[i].WeldingMethod;
|
|
this.lblBaseMaterial5.Text = werlderQualifys[i].MaterialType;
|
|
if (werlderQualifys[i].ThicknessMax.HasValue)
|
|
{
|
|
this.lblThkRange5.Text = "≤" + werlderQualifys[i].ThicknessMax;
|
|
}
|
|
if (werlderQualifys[i].SizesMin.HasValue)
|
|
{
|
|
this.lblDiaRange5.Text = "≥" + werlderQualifys[i].SizesMin;
|
|
}
|
|
this.lblPosition5.Text = werlderQualifys[i].WeldingLocation;
|
|
this.lblRemark5.Text = werlderQualifys[i].Remark;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |