,,
This commit is contained in:
@@ -1,59 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FEQ0000
|
||||
{
|
||||
public partial class rpt_equipmentB : Form
|
||||
{
|
||||
fEquipment.eTabletype imptype = fEquipment.eTabletype.MOLD;
|
||||
string pdate = string.Empty;
|
||||
public rpt_equipmentB(fEquipment.eTabletype type_, string dateStr)
|
||||
{
|
||||
InitializeComponent();
|
||||
pdate = dateStr;
|
||||
imptype = type_;
|
||||
}
|
||||
|
||||
private void rpt_equipment_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = string.Format("Data Report({0})",this.imptype);
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
|
||||
this.rpv1.PageCountMode = Microsoft.Reporting.WinForms.PageCountMode.Actual;
|
||||
this.rpv1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
|
||||
|
||||
//Set DataSource
|
||||
Microsoft.Reporting.WinForms.ReportDataSource DsEQ = new Microsoft.Reporting.WinForms.ReportDataSource();
|
||||
DsEQ.Name = "DataSet1";
|
||||
|
||||
switch (imptype)
|
||||
{
|
||||
case fEquipment.eTabletype.FOL:
|
||||
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportF.rdlc";
|
||||
taF.Fill(this.dsEQ.vEquStockF, this.pdate);
|
||||
DsEQ.Value = this.dsEQ.vEquStockF;
|
||||
break;
|
||||
case fEquipment.eTabletype.BUMP:
|
||||
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportB.rdlc";
|
||||
taB.Fill(this.dsEQ.vEquStockB, this.pdate);
|
||||
DsEQ.Value = this.dsEQ.vEquStockB;
|
||||
break;
|
||||
case fEquipment.eTabletype.MOLD:
|
||||
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportE.rdlc";
|
||||
taE.Fill(this.dsEQ.vEquStockME, this.pdate);
|
||||
DsEQ.Value = this.dsEQ.vEquStockME;
|
||||
break;
|
||||
}
|
||||
|
||||
this.rpv1.LocalReport.DataSources.Add(DsEQ);
|
||||
this.rpv1.RefreshReport();
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FEQ0000
|
||||
{
|
||||
public partial class rpt_equipmentB : Form
|
||||
{
|
||||
fEquipment.eTabletype imptype = fEquipment.eTabletype.MOLD;
|
||||
string pdate = string.Empty;
|
||||
public rpt_equipmentB(fEquipment.eTabletype type_, string dateStr)
|
||||
{
|
||||
//SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
|
||||
InitializeComponent();
|
||||
pdate = dateStr;
|
||||
imptype = type_;
|
||||
}
|
||||
|
||||
private void rpt_equipment_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = string.Format("Data Report({0})",this.imptype);
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
|
||||
this.rpv1.PageCountMode = Microsoft.Reporting.WinForms.PageCountMode.Actual;
|
||||
this.rpv1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
|
||||
|
||||
//Set DataSource
|
||||
Microsoft.Reporting.WinForms.ReportDataSource DsEQ = new Microsoft.Reporting.WinForms.ReportDataSource();
|
||||
DsEQ.Name = "DataSet1";
|
||||
|
||||
switch (imptype)
|
||||
{
|
||||
case fEquipment.eTabletype.FOL:
|
||||
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportF.rdlc";
|
||||
taF.Fill(this.dsEQ.vEquStockF, this.pdate);
|
||||
DsEQ.Value = this.dsEQ.vEquStockF;
|
||||
break;
|
||||
case fEquipment.eTabletype.BUMP:
|
||||
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportB.rdlc";
|
||||
taB.Fill(this.dsEQ.vEquStockB, this.pdate);
|
||||
DsEQ.Value = this.dsEQ.vEquStockB;
|
||||
break;
|
||||
case fEquipment.eTabletype.MOLD:
|
||||
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportE.rdlc";
|
||||
taE.Fill(this.dsEQ.vEquStockME, this.pdate);
|
||||
DsEQ.Value = this.dsEQ.vEquStockME;
|
||||
break;
|
||||
}
|
||||
|
||||
this.rpv1.LocalReport.DataSources.Add(DsEQ);
|
||||
this.rpv1.RefreshReport();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,30 @@
|
||||
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
|
||||
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
|
||||
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.DataVisualization.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.Design, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.Design.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.ProcessingObjectModel.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.WebDesign, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.WebDesign.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.WebForms.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportViewer.11.0.3366.16\lib\Microsoft.ReportViewer.WinForms.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.SqlServer.Types.11.0.1\lib\net20\Microsoft.SqlServer.Types.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="NetOffice, Version=1.7.4.5, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\NetOfficeFw.Core.1.7.4.5\lib\net40\NetOffice.dll</HintPath>
|
||||
@@ -221,6 +243,7 @@
|
||||
<Compile Include="Purchase\rPurchase.Designer.cs">
|
||||
<DependentUpon>rPurchase.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SqlServerTypes\Loader.cs" />
|
||||
<EmbeddedResource Include="Equipment\EQFilterApply.resx">
|
||||
<DependentUpon>EQFilterApply.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -356,6 +379,25 @@
|
||||
<Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" />
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\packages\Microsoft.SqlServer.Types.11.0.1\nativeBinaries\x64\msvcr100.dll">
|
||||
<Link>SqlServerTypes\x64\msvcr100.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\packages\Microsoft.SqlServer.Types.11.0.1\nativeBinaries\x64\SqlServerSpatial110.dll">
|
||||
<Link>SqlServerTypes\x64\SqlServerSpatial110.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\packages\Microsoft.SqlServer.Types.11.0.1\nativeBinaries\x86\msvcr100.dll">
|
||||
<Link>SqlServerTypes\x86\msvcr100.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\packages\Microsoft.SqlServer.Types.11.0.1\nativeBinaries\x86\SqlServerSpatial110.dll">
|
||||
<Link>SqlServerTypes\x86\SqlServerSpatial110.dll</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SqlServerTypes\readme.htm" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -277,19 +277,24 @@ namespace FEQ0000
|
||||
this.fpSpread1.ActiveSheet.Rows[i].ForeColor = Color.Black;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//프로젝트가 걸린데이터는 글자를 bold체로 변경한다.
|
||||
var pidx = (int)this.fpSpread1.ActiveSheet.GetValue(i, prjindex);
|
||||
if(pidx == -1) //프로젝트가 없다
|
||||
var prjdata = this.fpSpread1.ActiveSheet.GetValue(i, prjindex);
|
||||
if(prjdata != null)
|
||||
{
|
||||
this.fpSpread1.ActiveSheet.Rows[i].Font = fBase;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fpSpread1.ActiveSheet.Rows[i].Font = fBold;
|
||||
var pidx = (int)this.fpSpread1.ActiveSheet.GetValue(i, prjindex);
|
||||
if (pidx == -1) //프로젝트가 없다
|
||||
{
|
||||
this.fpSpread1.ActiveSheet.Rows[i].Font = fBase;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fpSpread1.ActiveSheet.Rows[i].Font = fBold;
|
||||
}
|
||||
}
|
||||
else this.fpSpread1.ActiveSheet.Rows[i].Font = fBold;
|
||||
|
||||
|
||||
}
|
||||
this.fpSpread1.ResumeLayout();
|
||||
|
||||
45
SubProject/FEQ0000/SqlServerTypes/Loader.cs
Normal file
45
SubProject/FEQ0000/SqlServerTypes/Loader.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SqlServerTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility methods related to CLR Types for SQL Server
|
||||
/// </summary>
|
||||
internal class Utilities
|
||||
{
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern IntPtr LoadLibrary(string libname);
|
||||
|
||||
/// <summary>
|
||||
/// Loads the required native assemblies for the current architecture (x86 or x64)
|
||||
/// </summary>
|
||||
/// <param name="rootApplicationPath">
|
||||
/// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications
|
||||
/// and AppDomain.CurrentDomain.BaseDirectory for desktop applications.
|
||||
/// </param>
|
||||
public static void LoadNativeAssemblies(string rootApplicationPath)
|
||||
{
|
||||
var nativeBinaryPath = IntPtr.Size > 4
|
||||
? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\")
|
||||
: Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\");
|
||||
|
||||
LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll");
|
||||
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll");
|
||||
}
|
||||
|
||||
private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
|
||||
{
|
||||
var path = Path.Combine(nativeBinaryPath, assemblyName);
|
||||
var ptr = LoadLibrary(path);
|
||||
if (ptr == IntPtr.Zero)
|
||||
{
|
||||
throw new Exception(string.Format(
|
||||
"Error loading {0} (ErrorCode: {1})",
|
||||
assemblyName,
|
||||
Marshal.GetLastWin32Error()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
39
SubProject/FEQ0000/SqlServerTypes/readme.htm
Normal file
39
SubProject/FEQ0000/SqlServerTypes/readme.htm
Normal file
@@ -0,0 +1,39 @@
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Microsoft.SqlServer.Types</title>
|
||||
<style>
|
||||
body {
|
||||
background: #fff;
|
||||
color: #505050;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
#main {
|
||||
background: #efefef;
|
||||
padding: 5px 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h1>Action required to load native assemblies</h1>
|
||||
<p>
|
||||
To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed.
|
||||
</p>
|
||||
<p>
|
||||
You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture).
|
||||
</p>
|
||||
<h2>ASP.NET applications</h2>
|
||||
<p>
|
||||
For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs:
|
||||
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre>
|
||||
</p>
|
||||
<h2>Desktop applications</h2>
|
||||
<p>
|
||||
For desktop applications, add the following line of code to run before any spatial operations are performed:
|
||||
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.ReportViewer" version="11.0.3366.16" targetFramework="net45" />
|
||||
<package id="Microsoft.SqlServer.Types" version="11.0.1" targetFramework="net45" />
|
||||
<package id="NetOfficeFw.Core" version="1.7.4.5" targetFramework="net45" />
|
||||
<package id="NetOfficeFw.Outlook" version="1.7.4.5" targetFramework="net45" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user