This commit is contained in:
chi
2021-02-18 16:23:34 +09:00
parent f942419d52
commit b61d444bd2
17 changed files with 621 additions and 89 deletions

View File

@@ -167,8 +167,30 @@
<Reference Include="Microsoft.Owin.Hosting, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Hosting.4.1.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
</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="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
@@ -319,6 +341,7 @@
<Compile Include="MessageWindow.cs" />
<Compile Include="MethodExtentions.cs" />
<Compile Include="Program.cs" />
<Compile Include="SqlServerTypes\Loader.cs" />
<Compile Include="UserGroup.cs">
<DependentUpon>AdoNetEFMain.tt</DependentUpon>
</Compile>
@@ -514,6 +537,22 @@
</None>
</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="AdoNetEFMain.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>AdoNetEFMain.edmx</DependentUpon>
@@ -529,6 +568,7 @@
<Content Include="libxl.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SqlServerTypes\readme.htm" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">

View File

@@ -15,8 +15,9 @@ namespace Project
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
// AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
// Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
// AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Run(new fMain());
}

View 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()));
}
}
}
}

View 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>

View File

@@ -11,5 +11,7 @@
<package id="Microsoft.Owin" version="4.1.1" targetFramework="net452" />
<package id="Microsoft.Owin.Host.HttpListener" version="4.1.1" targetFramework="net452" />
<package id="Microsoft.Owin.Hosting" version="4.1.1" targetFramework="net452" />
<package id="Microsoft.ReportViewer" version="11.0.3366.16" targetFramework="net452" />
<package id="Microsoft.SqlServer.Types" version="11.0.1" targetFramework="net452" />
<package id="Owin" version="1.0" targetFramework="net452" />
</packages>

View File

@@ -59,6 +59,7 @@
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ta = new FCM0000.dsMSSQLTableAdapters.CommonTableAdapter();
this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager();
this.title가져오기ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
this.bn.SuspendLayout();
@@ -75,7 +76,7 @@
this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.panel1.Name = "panel1";
this.panel1.Padding = new System.Windows.Forms.Padding(5);
this.panel1.Size = new System.Drawing.Size(685, 48);
this.panel1.Size = new System.Drawing.Size(706, 48);
this.panel1.TabIndex = 0;
//
// cmbList
@@ -87,7 +88,7 @@
this.cmbList.Location = new System.Drawing.Point(5, 5);
this.cmbList.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cmbList.Name = "cmbList";
this.cmbList.Size = new System.Drawing.Size(675, 37);
this.cmbList.Size = new System.Drawing.Size(696, 37);
this.cmbList.TabIndex = 0;
this.cmbList.SelectedIndexChanged += new System.EventHandler(this.cmbList_SelectedIndexChanged);
//
@@ -114,14 +115,14 @@
this.commonBindingNavigatorSaveItem,
this.toolStripSeparator1,
this.toolStripButton1});
this.bn.Location = new System.Drawing.Point(0, 576);
this.bn.Location = new System.Drawing.Point(0, 522);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn.Name = "bn";
this.bn.PositionItem = this.bindingNavigatorPositionItem;
this.bn.Size = new System.Drawing.Size(685, 25);
this.bn.Size = new System.Drawing.Size(706, 25);
this.bn.TabIndex = 1;
this.bn.Text = "bindingNavigator1";
//
@@ -192,6 +193,7 @@
//
this.bindingNavigatorPositionItem.AccessibleName = "위치";
this.bindingNavigatorPositionItem.AutoSize = false;
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
this.bindingNavigatorPositionItem.Text = "0";
@@ -241,7 +243,8 @@
// toolStripButton1
//
this.toolStripButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem});
this.ToolStripMenuItem,
this.title가져오기ToolStripMenuItem});
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
@@ -274,7 +277,7 @@
this.commonDataGridView.Location = new System.Drawing.Point(0, 48);
this.commonDataGridView.Name = "commonDataGridView";
this.commonDataGridView.RowTemplate.Height = 23;
this.commonDataGridView.Size = new System.Drawing.Size(685, 528);
this.commonDataGridView.Size = new System.Drawing.Size(706, 474);
this.commonDataGridView.TabIndex = 3;
//
// dataGridViewTextBoxColumn3
@@ -331,11 +334,18 @@
this.tam.StaffTableAdapter = null;
this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
//
// title가져오기ToolStripMenuItem
//
this.title가져오기ToolStripMenuItem.Name = "title가져오기ToolStripMenuItem";
this.title가져오기ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.title가져오기ToolStripMenuItem.Text = "Title 가져오기";
this.title가져오기ToolStripMenuItem.Click += new System.EventHandler(this.title가져오기ToolStripMenuItem_Click);
//
// fCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(685, 601);
this.ClientSize = new System.Drawing.Size(706, 547);
this.Controls.Add(this.commonDataGridView);
this.Controls.Add(this.bn);
this.Controls.Add(this.panel1);
@@ -390,5 +400,6 @@
private System.Windows.Forms.ToolStripDropDownButton toolStripButton1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripLabel toolStripLabel6;
private System.Windows.Forms.ToolStripMenuItem title가져오기ToolStripMenuItem;
}
}

View File

@@ -24,7 +24,7 @@ namespace FCM0000
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
string grp = "99";
if (this.cmbList.SelectedIndex > 0 )
if (this.cmbList.SelectedIndex > 0)
{
var title = cmbList.Text.Split(']');
grp = title[0].Substring(1);
@@ -36,8 +36,10 @@ namespace FCM0000
{
this.Show();
Application.DoEvents();
// this.TopMost=true;
// this.Activate();
toolStripButton1.Visible = FCOMMON.info.Login.no == "dev";
// this.TopMost=true;
// this.Activate();
cmbList_SelectedIndexChanged(null, null);
}
void RefreshCodeList()
@@ -61,7 +63,7 @@ namespace FCM0000
}
try
{
this.ta.Fill(this.dsMSSQL.Common, grp,FCOMMON.info.Login.gcode );
this.ta.Fill(this.dsMSSQL.Common, grp, FCOMMON.info.Login.gcode);
this.dsMSSQL.Common.AcceptChanges();
}
catch (Exception ex)
@@ -85,7 +87,7 @@ namespace FCM0000
private void cmbList_SelectedIndexChanged(object sender, EventArgs e)
{
if(this.dsMSSQL.HasChanges())
if (this.dsMSSQL.HasChanges())
{
var dlg = FCOMMON.Util.MsgQ(
"변경된 자료가 손실됩니다.\n\n" +
@@ -96,18 +98,47 @@ namespace FCM0000
{
RefreshCodeList();
RefreshCodeData();
}
else if(cmbList.SelectedIndex > 0)
}
else if (cmbList.SelectedIndex > 0)
RefreshCodeData();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
var drows = this.dsMSSQL.Common.Select(this.bs.Filter,"memo");
for (int i = 1; i<= drows.Length;i++)
var drows = this.dsMSSQL.Common.Select(this.bs.Filter, "memo");
for (int i = 1; i <= drows.Length; i++)
{
drows[i - 1]["code"] = i.ToString("000");
}
}
private void title가져오기ToolStripMenuItem_Click(object sender, EventArgs e)
{
var f = new FCOMMON.fInputTextBox();
if (f.ShowDialog() == DialogResult.OK)
{
var data = f.textBox1.Text.Trim();
data = data.Replace("\r", "");
var lines = data.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
var dlg = FCOMMON.Util.MsgQ(lines.Count().ToString() + "건의 자료가 있습니다. 입력할까요?");
if (dlg == DialogResult.Yes)
{
foreach (var item in lines)
{
if (item.Trim().Equals("")) continue;
if(this.dsMSSQL.Common.Where(t=>t.memo == item.Trim()).Any()==false)
{
var newdr = this.dsMSSQL.Common.NewCommonRow();
newdr.memo = item;
this.dsMSSQL.Common.AddCommonRow(newdr);
}
}
}
}
}
}
}

View File

@@ -90,6 +90,12 @@
<Compile Include="fFTPExplorer.Designer.cs">
<DependentUpon>fFTPExplorer.cs</DependentUpon>
</Compile>
<Compile Include="fInputTextBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fInputTextBox.Designer.cs">
<DependentUpon>fInputTextBox.cs</DependentUpon>
</Compile>
<Compile Include="fLovDateList.cs">
<SubType>Form</SubType>
</Compile>
@@ -135,6 +141,9 @@
<EmbeddedResource Include="fFTPExplorer.resx">
<DependentUpon>fFTPExplorer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fInputTextBox.resx">
<DependentUpon>fInputTextBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fLovDateList.resx">
<DependentUpon>fLovDateList.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -0,0 +1,75 @@

namespace FCOMMON
{
partial class fInputTextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(0, 0);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(636, 526);
this.textBox1.TabIndex = 0;
//
// button1
//
this.button1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.button1.Location = new System.Drawing.Point(0, 526);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(636, 72);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// fInputTextBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(636, 598);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Name = "fInputTextBox";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "fInputTextBox";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
public System.Windows.Forms.TextBox textBox1;
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FCOMMON
{
public partial class fInputTextBox : Form
{
public fInputTextBox()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -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();
}
}
}

View File

@@ -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.

View File

@@ -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();

View 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()));
}
}
}
}

View 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>

View File

@@ -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>