<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="06/22/2013 16:53:48" ReportInfo.Modified="12/30/2016 11:34:21" ReportInfo.CreatorVersion="1.3.63.0">
  <ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
using System.Text.RegularExpressions;

namespace FastReport
{
  public class ReportScript
  {

    private void Text3_AfterData(object sender, EventArgs e)
    { 
      string depcode = (String)Report.GetColumnValue(&quot;设备表.部门编码&quot;);
      string pattern5 = &quot;^02000&quot;; //车间人员
      string pattern2 = &quot;^03&quot;; //工程人员
      string pattern3 = &quot;^10&quot;; //质管人员
      string pattern4 = &quot;^0404&quot;; //仓储人员
      if(Regex.IsMatch(depcode,pattern5))
      {
        Picture1.Image = Image.FromFile(@&quot;template\105.jpg&quot;);
      }
      else if(Regex.IsMatch(depcode,pattern2))
      {
        Picture1.Image = Image.FromFile(@&quot;template\102.jpg&quot;);
      }
      else if(Regex.IsMatch(depcode,pattern3))
      {
        Picture1.Image = Image.FromFile(@&quot;template\103.jpg&quot;);
      }
      else if(Regex.IsMatch(depcode,pattern4))
      {
        Picture1.Image = Image.FromFile(@&quot;template\104.jpg&quot;);
      }
      else
      {
         Picture1.Image = Image.FromFile(@&quot;template\101.jpg&quot;);
      }
      /*int emptype =((Int32)Report.GetColumnValue(&quot;设备表.人员类型编号&quot;));
      switch(emptype)
      {
        case 1: Picture1.Image = Image.FromFile(@&quot;template\1.jpg&quot;);
          break;
        case 2: Picture1.Image = Image.FromFile(@&quot;template\2.jpg&quot;);
          break;
        case 3: Picture1.Image = Image.FromFile(@&quot;template\3.jpg&quot;);
          break;
        case 4: Picture1.Image = Image.FromFile(@&quot;template\4.jpg&quot;);
          break;
        case 5: Picture1.Image = Image.FromFile(@&quot;template\5.jpg&quot;);
          break;
        case 7: Picture1.Image = Image.FromFile(@&quot;template\7.jpg&quot;);
          break;
        default:
          Picture1.Image = Image.FromFile(@&quot;template\1.jpg&quot;);
          break; 
      }
        */
      }
  }
}
</ScriptText>
  <Dictionary>
    <ViewDataSource Name="设备表" ReferenceName="设备表" DataType="System.Int32" Enabled="true">
      <Column Name="姓名" DataType="System.String"/>
      <Column Name="性别" DataType="System.String"/>
      <Column Name="婚姻" DataType="System.String"/>
      <Column Name="入职日期" DataType="System.DateTime"/>
      <Column Name="部门" DataType="System.String"/>
      <Column Name="职务" DataType="System.String"/>
      <Column Name="员工类型" DataType="System.String"/>
      <Column Name="户口所在地" DataType="System.String"/>
      <Column Name="电话" DataType="System.String"/>
      <Column Name="离职日期" DataType="System.DateTime"/>
      <Column Name="离职原因" DataType="System.String"/>
      <Column Name="像片" DataType="System.Byte[]" BindableControl="Picture"/>
      <Column Name="员工编号" DataType="System.String"/>
      <Column Name="出生日期" DataType="System.DateTime"/>
      <Column Name="卡号" DataType="System.String"/>
      <Column Name="通行区域" DataType="System.String"/>
      <Column Name="部门编码" DataType="System.String"/>
    </ViewDataSource>
  </Dictionary>
  <ReportPage Name="Page1" TopMargin="5" BottomMargin="5" FirstPageSource="15" OtherPagesSource="15" Columns.Count="2" Columns.Width="95" Columns.Positions="0,95" Guides="-28.35,359.1,195.35,318.2,4.55,117.95,71.6,147.2,312.75">
    <PageHeaderBand Name="PageHeader1" Width="718.2"/>
    <DataBand Name="Data1" Top="5.41" Width="359.1" Height="209.9" Guides="0,207.9,64.6,92.95,90.59,130.28,130.4,168.2,35.9,177.1,188.44,189,200.34,169.65,199.89" DataSource="设备表">
      <PictureObject Name="Picture1" Left="-28.35" Width="387.45" Height="207.9" Image="[encoded data, 433476 characters]"/>
      <TextObject Name="Text3" Left="195.35" Top="64.6" Width="122.85" Height="28.35" AfterDataEvent="Text3_AfterData" Text="[设备表.姓名]" HorzAlign="Center" VertAlign="Center" Font="黑体, 12pt, style=Bold"/>
      <TextObject Name="Text5" Left="195.35" Top="90.59" Width="122.85" Height="39.69" Text="[设备表.部门]" HorzAlign="Center" VertAlign="Bottom" Font="黑体, 12pt, style=Bold"/>
      <TextObject Name="Text6" Left="195.35" Top="130.4" Width="122.85" Height="37.8" Text="[设备表.职务]" HorzAlign="Center" VertAlign="Bottom" Font="黑体, 12pt, style=Bold"/>
      <PictureObject Name="Picture2" Left="4.55" Top="35.9" Width="113.4" Height="132.3" DataColumn="设备表.像片"/>
      <TextObject Name="Text2" Left="71.6" Top="177.1" Width="75.6" Height="11.34" Text="[设备表.入职日期]" Format="Date" Format.Format="d" VertAlign="Center" Font="Arial, 8pt, style=Bold"/>
      <TextObject Name="Text1" Left="71.6" Top="189" Width="75.6" Height="11.34" Text="[设备表.员工编号]" VertAlign="Center" Font="Arial, 8pt, style=Bold"/>
      <TextObject Name="Text7" Left="190.5" Top="169.65" Width="137.15" Height="30.24" Text="[Replace([设备表.通行区域],&quot;\n&quot;,&quot; &quot;)]" HorzAlign="Center" VertAlign="Bottom" Font="Arial, 8pt, style=Bold"/>
    </DataBand>
    <PageFooterBand Name="PageFooter1" Top="220.71" Width="718.2"/>
  </ReportPage>
</Report>
