파일정리
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ChatServer.Properties {
|
||||
namespace NoticeServer.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
<Reference Include="arCommUtil">
|
||||
<HintPath>..\..\DLL\arCommUtil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -318,10 +322,6 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\FCM0000\FCM0000.csproj">
|
||||
<Project>{26982882-c1ff-45f8-861c-d67558725ff1}</Project>
|
||||
<Name>FCM0000</Name>
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -544,10 +548,6 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Sub\YARTE\YARTE.csproj">
|
||||
<Project>{db5ee9c8-eacf-4231-877e-b9dfd7a714de}</Project>
|
||||
<Name>YARTE</Name>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArLog.Net4">
|
||||
<HintPath>..\..\DLL\ArLog.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -110,12 +114,6 @@
|
||||
<Compile Include="fFileExplorer.Designer.cs">
|
||||
<DependentUpon>fFileExplorer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="fFTPExplorer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="fFTPExplorer.Designer.cs">
|
||||
<DependentUpon>fFTPExplorer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="fInputTextBox.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -198,9 +196,6 @@
|
||||
<EmbeddedResource Include="fFileExplorer.resx">
|
||||
<DependentUpon>fFileExplorer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="fFTPExplorer.resx">
|
||||
<DependentUpon>fFTPExplorer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="fInputTextBox.resx">
|
||||
<DependentUpon>fInputTextBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -252,16 +247,6 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Sub\arftp\FTPClass.csproj">
|
||||
<Project>{150859d3-1c5d-4e20-b324-f9ebe188d893}</Project>
|
||||
<Name>FTPClass</Name>
|
||||
</ProjectReference>
|
||||
</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.
|
||||
|
||||
222
SubProject/FCOMMON/fFTPExplorer.Designer.cs
generated
222
SubProject/FCOMMON/fFTPExplorer.Designer.cs
generated
@@ -1,222 +0,0 @@
|
||||
namespace FCOMMON
|
||||
{
|
||||
partial class fFTPExplorer
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
this.tbpath = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.btQuery = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.cm = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.uploadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.downLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.lbPath = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.panel1.SuspendLayout();
|
||||
this.cm.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tbpath
|
||||
//
|
||||
this.tbpath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tbpath.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.tbpath.Location = new System.Drawing.Point(49, 11);
|
||||
this.tbpath.Name = "tbpath";
|
||||
this.tbpath.Size = new System.Drawing.Size(429, 22);
|
||||
this.tbpath.TabIndex = 0;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.btQuery);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Controls.Add(this.tbpath);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(550, 42);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// btQuery
|
||||
//
|
||||
this.btQuery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btQuery.Location = new System.Drawing.Point(483, 11);
|
||||
this.btQuery.Name = "btQuery";
|
||||
this.btQuery.Size = new System.Drawing.Size(55, 22);
|
||||
this.btQuery.TabIndex = 2;
|
||||
this.btQuery.Text = "query";
|
||||
this.btQuery.UseVisualStyleBackColor = true;
|
||||
this.btQuery.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(11, 16);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(29, 12);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "path";
|
||||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.AllowDrop = true;
|
||||
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2,
|
||||
this.columnHeader3,
|
||||
this.columnHeader4});
|
||||
this.listView1.ContextMenuStrip = this.cm;
|
||||
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listView1.FullRowSelect = true;
|
||||
this.listView1.Location = new System.Drawing.Point(0, 42);
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.Size = new System.Drawing.Size(550, 308);
|
||||
this.listView1.TabIndex = 2;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "Name";
|
||||
this.columnHeader1.Width = 202;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Type";
|
||||
this.columnHeader2.Width = 108;
|
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
this.columnHeader3.Text = "Size";
|
||||
this.columnHeader3.Width = 91;
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
this.columnHeader4.Text = "Time";
|
||||
this.columnHeader4.Width = 143;
|
||||
//
|
||||
// cm
|
||||
//
|
||||
this.cm.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.uploadToolStripMenuItem,
|
||||
this.downLoadToolStripMenuItem});
|
||||
this.cm.Name = "contextMenuStrip1";
|
||||
this.cm.Size = new System.Drawing.Size(133, 48);
|
||||
//
|
||||
// uploadToolStripMenuItem
|
||||
//
|
||||
this.uploadToolStripMenuItem.Name = "uploadToolStripMenuItem";
|
||||
this.uploadToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||
this.uploadToolStripMenuItem.Text = "Upload";
|
||||
this.uploadToolStripMenuItem.Click += new System.EventHandler(this.uploadToolStripMenuItem_Click);
|
||||
//
|
||||
// downLoadToolStripMenuItem
|
||||
//
|
||||
this.downLoadToolStripMenuItem.Name = "downLoadToolStripMenuItem";
|
||||
this.downLoadToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||
this.downLoadToolStripMenuItem.Text = "DownLoad";
|
||||
this.downLoadToolStripMenuItem.Click += new System.EventHandler(this.downLoadToolStripMenuItem_Click);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 500;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.progressBar1,
|
||||
this.lbPath});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 350);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(550, 22);
|
||||
this.statusStrip1.TabIndex = 5;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(200, 16);
|
||||
//
|
||||
// lbPath
|
||||
//
|
||||
this.lbPath.Name = "lbPath";
|
||||
this.lbPath.Size = new System.Drawing.Size(13, 17);
|
||||
this.lbPath.Text = "..";
|
||||
//
|
||||
// fFTPExplorer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(550, 372);
|
||||
this.Controls.Add(this.listView1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "fFTPExplorer";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "fFTPExplorer";
|
||||
this.Load += new System.EventHandler(this.@__Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.cm.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox tbpath;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btQuery;
|
||||
private System.Windows.Forms.ListView listView1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripProgressBar progressBar1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel lbPath;
|
||||
private System.Windows.Forms.ContextMenuStrip cm;
|
||||
private System.Windows.Forms.ToolStripMenuItem uploadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem downLoadToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -1,228 +0,0 @@
|
||||
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 FCOMMON
|
||||
{
|
||||
public partial class fFTPExplorer : fBase
|
||||
{
|
||||
string homePath = string.Empty;
|
||||
string curPath = string.Empty;
|
||||
arUtil.FTPClient.FTPClient ftp;
|
||||
string fn = "ftpExplorer.ini";
|
||||
public fFTPExplorer(string title,string path,string ip,string id,string pw,int port=21,Boolean passvie=true)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Text = string.Format("[FTP] {0}",title);
|
||||
this.KeyPreview = true;
|
||||
this.KeyDown += (s1, e1) => {
|
||||
if (e1.KeyCode == Keys.Escape) this.Close();
|
||||
};
|
||||
this.listView1.DoubleClick += listView1_DoubleClick;
|
||||
this.tbpath.KeyDown += (s1, e1) => {
|
||||
if (e1.KeyCode == Keys.Enter)
|
||||
btQuery.PerformClick();
|
||||
};
|
||||
this.FormClosed += __Closed;
|
||||
ftp = new arUtil.FTPClient.FTPClient(ip, id, pw, port, passvie);
|
||||
curPath = path;
|
||||
homePath = path;
|
||||
|
||||
//홈폴더가 없으면 생성을 한다.
|
||||
var list = ftp.directoryListSimple(homePath);
|
||||
if(list.Length == 1)
|
||||
{
|
||||
//폴더를 생성해준다.
|
||||
ftp.createDirectory(homePath);
|
||||
|
||||
//하위폴더
|
||||
string[] subdir = new string[] { "Source","Document","Draw"};
|
||||
foreach (var dir in subdir)
|
||||
ftp.createDirectory(ftp.PathCombine(homePath, dir));
|
||||
}
|
||||
|
||||
this.listView1.DragDrop += listView1_DragDrop;
|
||||
this.listView1.DragEnter += listView1_DragEnter;
|
||||
this.listView1.DragOver += listView1_DragOver;
|
||||
}
|
||||
|
||||
void __Closed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
//listview column width
|
||||
|
||||
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
|
||||
for (int i = 0; i < this.listView1.Columns.Count; i++)
|
||||
{
|
||||
var curwidth = this.listView1.Columns[i].Width;
|
||||
ini.set_Data("colsize", "index_" + i.ToString(), curwidth.ToString());
|
||||
}
|
||||
ini.Flush();
|
||||
|
||||
//string item = "ftp_lv_col_";
|
||||
//for (int i = 0; i < this.listView1.Columns.Count; i++)
|
||||
//{
|
||||
// var curwidth = this.listView1.Columns[i].Width;
|
||||
// Pub.setting.Xml.set_Data(item + i.ToString(),curwidth.ToString());
|
||||
//}
|
||||
//Pub.setting.Save();
|
||||
}
|
||||
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
EnsureVisibleAndUsableSize();
|
||||
this.tbpath.Text = this.curPath;// Pub.setting.ftp_path;
|
||||
if (this.tbpath.Text == "") tbpath.Text = "/";
|
||||
timer1.Start();
|
||||
|
||||
//listview column width
|
||||
//string item = "ftp_lv_col_";
|
||||
|
||||
if (System.IO.File.Exists(fn) == false) return;
|
||||
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
|
||||
for (int i = 0; i < this.listView1.Columns.Count; i++)
|
||||
{
|
||||
var cwid = ini.get_Data("colsize", "index_" + i.ToString(), "0");
|
||||
this.listView1.Columns[i].Width = int.Parse(cwid);
|
||||
}
|
||||
btQuery.PerformClick();
|
||||
}
|
||||
|
||||
void listView1_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
this.Cursor = Cursors.Hand;
|
||||
}
|
||||
|
||||
void listView1_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
e.Effect = DragDropEffects.All;
|
||||
}
|
||||
|
||||
void listView1_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false);
|
||||
if (files.Length < 1) return;
|
||||
string msg = string.Format("{0}건의 파일을 업로드 하시겠습니까?",files.Length);
|
||||
if (FCOMMON.Util.MsgQ(msg) != System.Windows.Forms.DialogResult.Yes) return;
|
||||
foreach(var fileName in files)
|
||||
{
|
||||
System.IO.FileInfo fi = new System.IO.FileInfo(fileName);
|
||||
string remote = tbpath.Text + "/" + fi.Name;
|
||||
ftp.Upload(remote, fi.FullName);
|
||||
}
|
||||
btQuery.PerformClick();
|
||||
}
|
||||
|
||||
|
||||
void listView1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
var path = listView1.SelectedItems[0].Text;
|
||||
var newpath = string.Empty;
|
||||
if (path == "..")
|
||||
{
|
||||
if( this.homePath.Replace("/","") == curPath.Replace("/",""))
|
||||
{
|
||||
FCOMMON.Util.MsgE("홈 디렉토리 입니다.");
|
||||
return;
|
||||
} else newpath = ftp.getParent(curPath);
|
||||
}
|
||||
else
|
||||
newpath = ftp.PathCombine(curPath, path);
|
||||
|
||||
search(newpath);
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tbpath.Text == "/") this.tbpath.Text = homePath;
|
||||
search(this.tbpath.Text);
|
||||
tbpath.Focus();
|
||||
tbpath.SelectAll();
|
||||
}
|
||||
|
||||
void search(string path)
|
||||
{
|
||||
if (path == "") path = "/";
|
||||
curPath = path;
|
||||
tbpath.Text = curPath;
|
||||
|
||||
this.listView1.Items.Clear();
|
||||
this.progressBar1.Value = 0;
|
||||
|
||||
|
||||
// var list = ftp.directoryListSimple("/201");
|
||||
|
||||
var lvup = listView1.Items.Add("..");
|
||||
lvup.SubItems.Add("");
|
||||
lvup.SubItems.Add("");
|
||||
lvup.SubItems.Add("");
|
||||
|
||||
|
||||
var ftpdir = ftp.ListDirectoryDetail(path);
|
||||
if(ftpdir == null)
|
||||
{
|
||||
//Util.MsgE(ftp.errorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
this.progressBar1.Maximum = ftpdir.Count;
|
||||
var OrderData = ftpdir.OrderBy(t => t.FileType).OrderBy(t=>t.Filename);
|
||||
|
||||
foreach (var item in OrderData)
|
||||
{
|
||||
this.progressBar1.Value += 1;
|
||||
if (item.Filename == ".") continue;
|
||||
var lv = listView1.Items.Add(item.Filename);
|
||||
lv.SubItems.Add(item.FileType.ToString());
|
||||
lv.SubItems.Add(item.Size.ToString());
|
||||
lv.SubItems.Add(item.FileDateTime.ToString());
|
||||
if (item.FileType == arUtil.FTPClient.FTPfileInfo.DirectoryEntryTypes.Directory) lv.ForeColor = Color.Blue;
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.lbPath.Text = curPath;
|
||||
}
|
||||
|
||||
private void uploadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog od = new OpenFileDialog();
|
||||
if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
//이파일을 현재 위치에 업로드 한다.
|
||||
System.IO.FileInfo fi = new System.IO.FileInfo(od.FileName);
|
||||
string newfile = ftp.PathFileCombine(curPath, fi.Name);
|
||||
if (!ftp.Upload(newfile, od.FileName))
|
||||
Util.MsgE("upload error");
|
||||
search(curPath);
|
||||
}
|
||||
|
||||
private void downLoadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.listView1.SelectedItems.Count < 1) return;
|
||||
|
||||
//이파일을 현재 위치에 업로드 한다.
|
||||
var selfile = this.listView1.SelectedItems[0];
|
||||
var remotefile = ftp.PathFileCombine(curPath, selfile.Text);
|
||||
var onlyfilename = remotefile.Substring(remotefile.LastIndexOf("/")+1);
|
||||
|
||||
SaveFileDialog od = new SaveFileDialog();
|
||||
od.Filter = "All files|*.*";
|
||||
od.FilterIndex = 1;
|
||||
od.FileName = onlyfilename;
|
||||
|
||||
if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
|
||||
System.IO.FileInfo fi = new System.IO.FileInfo(od.FileName);
|
||||
string newfile = ftp.PathFileCombine(curPath, fi.Name);
|
||||
if (!ftp.Download(remotefile,od.FileName))
|
||||
Util.MsgE("Download error");
|
||||
search(curPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
<?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>
|
||||
<metadata name="cm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>221, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>104, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -35,6 +35,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -140,10 +144,6 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Sub\YARTE\YARTE.csproj">
|
||||
<Project>{db5ee9c8-eacf-4231-877e-b9dfd7a714de}</Project>
|
||||
<Name>YARTE</Name>
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -555,10 +559,6 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Sub\YARTE\YARTE.csproj">
|
||||
<Project>{db5ee9c8-eacf-4231-877e-b9dfd7a714de}</Project>
|
||||
<Name>YARTE</Name>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -1,168 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props" Condition="Exists('..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props" Condition="Exists('..\..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props" Condition="Exists('..\..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8D593B42-1EAE-4D5A-A2C1-0361E2C43A80}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>FOW0000</RootNamespace>
|
||||
<AssemblyName>FOW0000</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CefSharp, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.Core, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.WinForms, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\CefSharp.WinForms.87.1.132\lib\net452\CefSharp.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\HtmlAgilityPack.CssSelectors.1.0.2\lib\net45\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack.CssSelectors, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\HtmlAgilityPack.CssSelectors.1.0.2\lib\net45\HtmlAgilityPack.CssSelectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.4.1.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.1.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
</Reference>
|
||||
<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=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1449.0\lib\net40\Microsoft.ReportViewer.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.DataVisualization, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1449.0\lib\net40\Microsoft.ReportViewer.DataVisualization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.Design, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1449.0\lib\net40\Microsoft.ReportViewer.Design.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1449.0\lib\net40\Microsoft.ReportViewer.ProcessingObjectModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ReportViewer.WinForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1449.0\lib\net40\Microsoft.ReportViewer.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.SqlServer.Types, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.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>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.SelfHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.SelfHost.5.2.7\lib\net45\System.Web.Http.SelfHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SqlServerTypes\Loader.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SqlServerTypes\readme.htm" />
|
||||
<Content Include="SqlServerTypes\x64\msvcr120.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SqlServerTypes\x64\SqlServerSpatial140.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SqlServerTypes\x86\msvcr120.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SqlServerTypes\x86\SqlServerSpatial140.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets" Condition="Exists('..\..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets')" />
|
||||
</Project>
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FOW0000
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 해당 애플리케이션의 주 진입점입니다.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new fHappyNarae());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이러한 특성 값을 변경하세요.
|
||||
[assembly: AssemblyTitle("FOW0000")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FOW0000")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("8d593b42-1eae-4d5a-a2c1-0361e2c43a80")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
SubProject/FOW0000/Properties/Resources.Designer.cs
generated
63
SubProject/FOW0000/Properties/Resources.Designer.cs
generated
@@ -1,63 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
// 런타임 버전:4.0.30319.42000
|
||||
//
|
||||
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
// 이러한 변경 내용이 손실됩니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FOW0000.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
|
||||
/// </summary>
|
||||
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
|
||||
// 클래스에서 자동으로 생성되었습니다.
|
||||
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
|
||||
// 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FOW0000.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
|
||||
/// 재정의합니다.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
SubProject/FOW0000/Properties/Settings.Designer.cs
generated
26
SubProject/FOW0000/Properties/Settings.Designer.cs
generated
@@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
// 런타임 버전:4.0.30319.42000
|
||||
//
|
||||
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
// 이러한 변경 내용이 손실됩니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FOW0000.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SqlServerTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility methods related to CLR Types for SQL Server
|
||||
/// </summary>
|
||||
public 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, "msvcr120.dll");
|
||||
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<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 SqlServerSpatial140.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 msvcr120.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 Web Sites</h2>
|
||||
<p>
|
||||
For ASP.NET Web Sites, add the following block of code to the code behind file of the Web Form where you have added Report Viewer Control:
|
||||
<pre>
|
||||
Default.aspx.cs:
|
||||
|
||||
public partial class _Default : System.Web.UI.Page
|
||||
{
|
||||
static bool _isSqlTypesLoaded = false;
|
||||
|
||||
public _Default()
|
||||
{
|
||||
if (!_isSqlTypesLoaded)
|
||||
{
|
||||
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~"));
|
||||
_isSqlTypesLoaded = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</p>
|
||||
<h2>ASP.NET Web Applications</h2>
|
||||
<p>
|
||||
For ASP.NET Web 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>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="cef.redist.x64" version="87.1.13" targetFramework="net452" />
|
||||
<package id="cef.redist.x86" version="87.1.13" targetFramework="net452" />
|
||||
<package id="CefSharp.Common" version="87.1.132" targetFramework="net452" />
|
||||
<package id="CefSharp.WinForms" version="87.1.132" targetFramework="net452" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
|
||||
<package id="HtmlAgilityPack.CssSelectors" version="1.0.2" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.7" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.SelfHost" version="5.2.7" targetFramework="net452" />
|
||||
<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.ReportingServices.ReportViewerControl.Winforms" version="150.1449.0" targetFramework="net46" />
|
||||
<package id="Microsoft.SqlServer.Types" version="14.0.314.76" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net452" />
|
||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -42,6 +42,10 @@
|
||||
<Reference Include="arCommUtil">
|
||||
<HintPath>..\..\DLL\arCommUtil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -811,10 +815,6 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Sub\YARTE\YARTE.csproj">
|
||||
<Project>{db5ee9c8-eacf-4231-877e-b9dfd7a714de}</Project>
|
||||
<Name>YARTE</Name>
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="arControl.Net4, Version=23.9.11.1030, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\arControl.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -127,10 +131,6 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Sub\arCtl\arControl.csproj">
|
||||
<Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project>
|
||||
<Name>arControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\FCM0000\FCM0000.csproj">
|
||||
<Project>{26982882-c1ff-45f8-861c-d67558725ff1}</Project>
|
||||
<Name>FCM0000</Name>
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="WebServer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.2" newVersion="5.0.0.2"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<connectionStrings>
|
||||
<add name="EEEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=10.131.15.18;initial catalog=EE;user id=eeuser;password=Amkor123!;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="mssqllocaldb"/>
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<userSettings>
|
||||
<WebServer.Properties.Settings>
|
||||
<setting name="json" serializeAs="String">
|
||||
<value>{
|
||||
"basicGoods": [
|
||||
{
|
||||
"id": "1234561",
|
||||
"name": "Mineral Water 550ml",
|
||||
"barcode": "12421432143214321",
|
||||
"price": "2.00",
|
||||
"num": "1",
|
||||
"amount": "2.00"
|
||||
},
|
||||
{
|
||||
"id": "1234562",
|
||||
"name": "Herbal tea 300ml",
|
||||
"barcode": "12421432143214322",
|
||||
"price": "3.00",
|
||||
"num": "2",
|
||||
"amount": "6.00"
|
||||
},
|
||||
{
|
||||
"id": "1234563",
|
||||
"name": "Delicious potato chips",
|
||||
"barcode": "12421432143214323",
|
||||
"price": "7.00",
|
||||
"num": "4",
|
||||
"amount": "28.00"
|
||||
},
|
||||
{
|
||||
"id": "1234564",
|
||||
"name": "Specially delicious egg rolls",
|
||||
"barcode": "12421432143214324",
|
||||
"price": "8.50",
|
||||
"num": "3",
|
||||
"amount": "25.50"
|
||||
}
|
||||
],
|
||||
"basicProgress": [
|
||||
{
|
||||
"key": "1",
|
||||
"time": "2017-10-01 14:10",
|
||||
"rate": "Contact Clients",
|
||||
"status": "Processing",
|
||||
"operator": "Pickup Assistant ID1234",
|
||||
"cost": "5mins"
|
||||
},
|
||||
{
|
||||
"key": "2",
|
||||
"time": "2017-10-01 14:05",
|
||||
"rate": "Pickup Guy Departs",
|
||||
"status": "Success",
|
||||
"operator": "Pickup Assistant ID1234",
|
||||
"cost": "1h"
|
||||
},
|
||||
{
|
||||
"key": "3",
|
||||
"time": "2017-10-01 13:05",
|
||||
"rate": "Pick-up person takes orders",
|
||||
"status": "Success",
|
||||
"operator": "Pickup Assistant ID1234",
|
||||
"cost": "5mins"
|
||||
},
|
||||
{
|
||||
"key": "4",
|
||||
"time": "2017-10-01 13:00",
|
||||
"rate": "Apply For Approval",
|
||||
"status": "Success",
|
||||
"operator": "system",
|
||||
"cost": "1h"
|
||||
},
|
||||
{
|
||||
"key": "5",
|
||||
"time": "2017-10-01 12:00",
|
||||
"rate": "Initiated a Return Request",
|
||||
"status": "Success",
|
||||
"operator": "user",
|
||||
"cost": "5mins"
|
||||
}
|
||||
]
|
||||
}</value>
|
||||
</setting>
|
||||
</WebServer.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@@ -1,27 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Auth
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string user { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public Nullable<int> purchase { get; set; }
|
||||
public Nullable<int> holyday { get; set; }
|
||||
public Nullable<int> project { get; set; }
|
||||
public Nullable<int> jobreport { get; set; }
|
||||
public Nullable<int> savecost { get; set; }
|
||||
public Nullable<int> scheapp { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,315 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using agi = HtmlAgilityPack;
|
||||
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public struct MethodResult : IEquatable<MethodResult>
|
||||
{
|
||||
public string Content;
|
||||
public byte[] Contentb;
|
||||
public string Redirecturl;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is MethodResult))
|
||||
return false;
|
||||
|
||||
return Equals((MethodResult)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
if (Contentb == null)
|
||||
return Content.GetHashCode() ^ Redirecturl.GetHashCode();
|
||||
else
|
||||
return Content.GetHashCode() ^ Redirecturl.GetHashCode() ^ Contentb.GetHexString().GetHashCode();
|
||||
|
||||
}
|
||||
|
||||
public bool Equals(MethodResult other)
|
||||
{
|
||||
if (Content != other.Content)
|
||||
return false;
|
||||
|
||||
if (Redirecturl != other.Redirecturl)
|
||||
return false;
|
||||
|
||||
return Contentb == other.Contentb;
|
||||
}
|
||||
|
||||
|
||||
public static bool operator ==(MethodResult point1, MethodResult point2)
|
||||
{
|
||||
return point1.Equals(point2);
|
||||
}
|
||||
|
||||
public static bool operator !=(MethodResult point1, MethodResult point2)
|
||||
{
|
||||
return !point1.Equals(point2);
|
||||
}
|
||||
}
|
||||
|
||||
sealed class PostRequest : Attribute
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class BaseController : ApiController
|
||||
{
|
||||
public string QueryString { get; set; }
|
||||
public string PostData { get; set; }
|
||||
public string ParamData { get; set; }
|
||||
|
||||
protected string Trig_Ctrl { get; set; }
|
||||
protected string Trig_func { get; set; }
|
||||
|
||||
public PageModel GetGlobalModel()
|
||||
{
|
||||
var config = RequestContext.Configuration;
|
||||
var routeData = config.Routes.GetRouteData(Request).Values.ToList();
|
||||
var name_ctrl = routeData[0].Value.ToString();
|
||||
var name_action = routeData[1].Value.ToString();
|
||||
|
||||
|
||||
return new PageModel
|
||||
{
|
||||
RouteData = routeData,
|
||||
urlcontrol = name_ctrl,
|
||||
urlaction = name_action
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public MethodResult View()
|
||||
{
|
||||
var config = RequestContext.Configuration;
|
||||
if (config != null)
|
||||
{
|
||||
var routeData = config.Routes.GetRouteData(Request).Values.ToList();
|
||||
var name_ctrl = routeData[0].Value.ToString();
|
||||
var name_action = routeData[1].Value.ToString();
|
||||
return View(name_ctrl, name_action);
|
||||
}
|
||||
else
|
||||
{
|
||||
return View(Trig_Ctrl + "/" + Trig_func);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void ApplyCommonValue(ref string contents)
|
||||
{
|
||||
//메뉴 푸터 - 개발자 정보
|
||||
|
||||
}
|
||||
|
||||
public MethodResult View(string Controller, string Action, Boolean applydefaultview = true)
|
||||
{
|
||||
var retval = new MethodResult();
|
||||
|
||||
if (Action.IndexOf(".") == -1)
|
||||
Action += ".html"; //기본값 html 을 넣는다
|
||||
|
||||
var file = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", Controller, Action);
|
||||
|
||||
var contents = string.Empty;
|
||||
|
||||
if (System.IO.File.Exists(file) == false)
|
||||
{
|
||||
//error 폴더의 404.html 파일을 찾는다.
|
||||
var file404 = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", "Error", "404.html");
|
||||
if (System.IO.File.Exists(file404))
|
||||
{
|
||||
contents = System.IO.File.ReadAllText(file404, System.Text.Encoding.UTF8);
|
||||
contents = contents.Replace("{errorfilename}", file);
|
||||
}
|
||||
|
||||
else
|
||||
contents = "ERROR CODE - 404 (NOT FOUND) <br />" + file;
|
||||
|
||||
Console.WriteLine("view File not found : " + file);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"View filename :{file}");
|
||||
//디폴트뷰의 내용을 가져온다 (있다면 적용한다)
|
||||
if (applydefaultview)
|
||||
{
|
||||
//뷰파일이 있다면 그것을 적용한다
|
||||
var laytoutfile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", "Layout", "default.html");
|
||||
if (System.IO.File.Exists(laytoutfile))
|
||||
contents = System.IO.File.ReadAllText(laytoutfile, System.Text.Encoding.UTF8);
|
||||
|
||||
var fileContents = System.IO.File.ReadAllText(file, System.Text.Encoding.UTF8);
|
||||
if (String.IsNullOrEmpty(contents)) contents = fileContents;
|
||||
else contents = contents.Replace("{contents}", fileContents);
|
||||
}
|
||||
else
|
||||
{
|
||||
//해당 뷰를 가져와서 반환한다
|
||||
contents = System.IO.File.ReadAllText(file, System.Text.Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
|
||||
agi.HtmlDocument doc = new agi.HtmlDocument();
|
||||
doc.LoadHtml(contents);
|
||||
|
||||
//파일참조 태그를 모두 가져옴
|
||||
var tags_include = doc.QuerySelectorAll("include");
|
||||
foreach (var item in tags_include)
|
||||
{
|
||||
var filename = item.InnerText;
|
||||
|
||||
var load_file = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "View", filename.Replace("/", "\\"));
|
||||
load_file = load_file.Replace("\\\\", "\\");
|
||||
String fileContents;// = String.Empty;
|
||||
|
||||
Console.WriteLine("## " + item.OuterHtml);
|
||||
if (System.IO.File.Exists(load_file))
|
||||
{
|
||||
fileContents = System.IO.File.ReadAllText(load_file, System.Text.Encoding.UTF8);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileContents = string.Format("<div class=\"fg-red\">#include Error:nofile:{0}</div>",
|
||||
filename); //파일이없다면 해당 부분은 오류 처리한다.
|
||||
}
|
||||
contents = contents.Replace(item.OuterHtml, fileContents);
|
||||
}
|
||||
|
||||
//콘텐츠내의 file 을 찾아서 처리한다. ; 정규식의 처리속도가 느릴듯하여, 그냥 처리해본다
|
||||
|
||||
|
||||
//시스템변수 replace
|
||||
contents = contents.Replace("{param_control}", Trig_Ctrl);
|
||||
contents = contents.Replace("{param_function}", Trig_func);
|
||||
|
||||
retval.Content = contents;
|
||||
return retval;
|
||||
}
|
||||
public MethodResult View(string viewfilename, Boolean applydefaultview = true)
|
||||
{
|
||||
var retval = new MethodResult();
|
||||
|
||||
if (viewfilename.IndexOf(".") == -1)
|
||||
viewfilename += ".html"; //기본값 html 을 넣는다
|
||||
|
||||
var file = AppDomain.CurrentDomain.BaseDirectory + "View" + viewfilename.Replace("/", "\\");
|
||||
|
||||
var contents = string.Empty;
|
||||
|
||||
if (System.IO.File.Exists(file) == false)
|
||||
{
|
||||
//error 폴더의 404.html 파일을 찾는다.
|
||||
var file404 = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", "Error", "404.html");
|
||||
if (System.IO.File.Exists(file404))
|
||||
{
|
||||
contents = System.IO.File.ReadAllText(file404, System.Text.Encoding.UTF8);
|
||||
contents = contents.Replace("{errorfilename}", file);
|
||||
}
|
||||
|
||||
else
|
||||
contents = "ERROR CODE - 404 (NOT FOUND) <br />" + file;
|
||||
|
||||
Console.WriteLine("view File not found : " + file);
|
||||
}
|
||||
else
|
||||
{
|
||||
//디폴트뷰의 내용을 가져온다 (있다면 적용한다)
|
||||
if (applydefaultview)
|
||||
{
|
||||
//뷰파일이 있다면 그것을 적용한다
|
||||
var laytoutfile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", "Layout", "default.html");
|
||||
if (System.IO.File.Exists(laytoutfile))
|
||||
contents = System.IO.File.ReadAllText(laytoutfile, System.Text.Encoding.UTF8);
|
||||
|
||||
var fileContents = System.IO.File.ReadAllText(file, System.Text.Encoding.UTF8);
|
||||
if (String.IsNullOrEmpty(contents)) contents = fileContents;
|
||||
else contents = contents.Replace("{contents}", fileContents);
|
||||
}
|
||||
else
|
||||
{
|
||||
//해당 뷰를 가져와서 반환한다
|
||||
contents = System.IO.File.ReadAllText(file, System.Text.Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
|
||||
agi.HtmlDocument doc = new agi.HtmlDocument();
|
||||
doc.LoadHtml(contents);
|
||||
|
||||
//파일참조 태그를 모두 가져옴
|
||||
var tags_include = doc.QuerySelectorAll("include");
|
||||
foreach (var item in tags_include)
|
||||
{
|
||||
var filename = item.InnerText;
|
||||
|
||||
var load_file = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "View", filename.Replace("/", "\\"));
|
||||
load_file = load_file.Replace("\\\\", "\\");
|
||||
String fileContents;// = String.Empty;
|
||||
|
||||
Console.WriteLine("## " + item.OuterHtml);
|
||||
if (System.IO.File.Exists(load_file))
|
||||
{
|
||||
fileContents = System.IO.File.ReadAllText(load_file, System.Text.Encoding.UTF8);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileContents = string.Format("<div class=\"fg-red\">#include Error:nofile:{0}</div>",
|
||||
filename); //파일이없다면 해당 부분은 오류 처리한다.
|
||||
}
|
||||
contents = contents.Replace(item.OuterHtml, fileContents);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//콘텐츠내의 file 을 찾아서 처리한다. ; 정규식의 처리속도가 느릴듯하여, 그냥 처리해본다
|
||||
while (true)
|
||||
{
|
||||
var fileindexS = contents.IndexOf("{file:");
|
||||
if (fileindexS == -1) break;
|
||||
var fileindexE = contents.IndexOf("}", fileindexS);
|
||||
if (fileindexE == -1) break;
|
||||
if (fileindexE <= fileindexS + 5) break;
|
||||
var inlinestr = contents.Substring(fileindexS, fileindexE - fileindexS + 1);
|
||||
var filename = contents.Substring(fileindexS + 7, fileindexE - fileindexS - 8);
|
||||
var load_file = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "View", "\\", filename.Replace("/", "\\"));
|
||||
load_file = load_file.Replace("\\\\", "\\");
|
||||
String fileContents;// = String.Empty;
|
||||
|
||||
Console.WriteLine("file impot : " + load_file);
|
||||
if (System.IO.File.Exists(load_file))
|
||||
{
|
||||
fileContents = System.IO.File.ReadAllText(load_file, System.Text.Encoding.UTF8);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileContents = "{FileNotFound:" + filename + "}"; //파일이없다면 해당 부분은 오류 처리한다.
|
||||
}
|
||||
contents = contents.Replace(inlinestr, fileContents);
|
||||
}
|
||||
|
||||
//시스템변수 replace
|
||||
contents = contents.Replace("{param_control}", Trig_Ctrl);
|
||||
contents = contents.Replace("{param_function}", Trig_func);
|
||||
|
||||
retval.Content = contents;
|
||||
return retval;
|
||||
}
|
||||
protected class Parameter
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
public Parameter(string key_, string value_)
|
||||
{
|
||||
Key = key_;
|
||||
Value = value_;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Common
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string grp { get; set; }
|
||||
public string code { get; set; }
|
||||
public string svalue { get; set; }
|
||||
public Nullable<int> ivalue { get; set; }
|
||||
public Nullable<double> fvalue { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class APIController : BaseController
|
||||
{
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Getdata()
|
||||
{
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
var sql = string.Empty;
|
||||
var p_sql = getParams.Where(t => t.Key == "sql").FirstOrDefault();
|
||||
if (p_sql.Key.isEmpty() == false) sql = p_sql.Value;
|
||||
else
|
||||
{
|
||||
var p_table = getParams.Where(t => t.Key == "table").FirstOrDefault();
|
||||
var p_gcode = getParams.Where(t => t.Key == "gcode").FirstOrDefault();
|
||||
var p_where = getParams.Where(t => t.Key == "w").FirstOrDefault();
|
||||
var p_order = getParams.Where(t => t.Key == "o").FirstOrDefault();
|
||||
sql = "select * from {0} where gcode = '{gcode}'";
|
||||
sql = string.Format(sql, p_table.Value, p_gcode.Value);
|
||||
if (p_where.Key != null) sql += " and " + p_where.Value;
|
||||
if (p_order.Key != null) sql += " order by " + p_order.Value;
|
||||
}
|
||||
|
||||
|
||||
if (FCOMMON.info.Login.gcode == null)
|
||||
FCOMMON.info.Login.gcode = "EET1P";
|
||||
sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode);
|
||||
Console.WriteLine($"Getdata sql={sql}");
|
||||
var cs = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
|
||||
var cn = new System.Data.SqlClient.SqlConnection(cs);
|
||||
var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
|
||||
var da = new System.Data.SqlClient.SqlDataAdapter(cmd);
|
||||
var dt = new System.Data.DataTable();
|
||||
da.Fill(dt);
|
||||
da.Dispose();
|
||||
cmd.Dispose();
|
||||
cn.Dispose();
|
||||
|
||||
var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
});
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
txtjson,
|
||||
System.Text.Encoding.UTF8,
|
||||
"application/json")
|
||||
};
|
||||
|
||||
return resp;
|
||||
|
||||
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Gettable()
|
||||
{
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
var sql = string.Empty;
|
||||
var p_sql = getParams.Where(t => t.Key == "sql").FirstOrDefault();
|
||||
if (p_sql.Key.isEmpty() == false) sql = p_sql.Value;
|
||||
else
|
||||
{
|
||||
var p_table = getParams.Where(t => t.Key == "table").FirstOrDefault();
|
||||
var p_gcode = getParams.Where(t => t.Key == "gcode").FirstOrDefault();
|
||||
var p_where = getParams.Where(t => t.Key == "w").FirstOrDefault();
|
||||
var p_order = getParams.Where(t => t.Key == "o").FirstOrDefault();
|
||||
sql = "select * from {0} where gcode = '{gcode}'";
|
||||
sql = string.Format(sql, p_table.Value, p_gcode.Value);
|
||||
if (p_where.Key != null) sql += " and " + p_where.Value;
|
||||
if (p_order.Key != null) sql += " order by " + p_order.Value;
|
||||
}
|
||||
|
||||
|
||||
if (FCOMMON.info.Login.gcode == null)
|
||||
FCOMMON.info.Login.gcode = "EET1P";
|
||||
sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode);
|
||||
|
||||
Console.WriteLine($"gettable sql={sql}");
|
||||
var cs = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
|
||||
var cn = new System.Data.SqlClient.SqlConnection(cs);
|
||||
var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
|
||||
var da = new System.Data.SqlClient.SqlDataAdapter(cmd);
|
||||
var dt = new System.Data.DataTable();
|
||||
da.Fill(dt);
|
||||
da.Dispose();
|
||||
cmd.Dispose();
|
||||
cn.Dispose();
|
||||
|
||||
var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
});
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
txtjson,
|
||||
System.Text.Encoding.UTF8,
|
||||
"application/json")
|
||||
};
|
||||
|
||||
return resp;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var contents = result.Content;
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class CommonController : BaseController
|
||||
{
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
var db = new EEEntities();
|
||||
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.AppendLine("List");
|
||||
sb.AppendLine("Paramter Gcode");
|
||||
sb.AppendLine("Paramter Grp");
|
||||
|
||||
//System.Web.Http.Results.JsonResult<string>
|
||||
//var json = JsonConvert.SerializeObject(liast);
|
||||
return new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
sb.ToString(),
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage List()
|
||||
{
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
var db = new EEEntities();
|
||||
|
||||
var vGcode = "EET1P";
|
||||
var vGrp = "99";
|
||||
var liast = db.Common.Where(t => t.gcode == vGcode && t.grp == vGrp).OrderBy(t => t.code).ToArray();
|
||||
|
||||
//System.Web.Http.Results.JsonResult<string>
|
||||
var json = JsonConvert.SerializeObject(liast);
|
||||
return new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
json.ToString(),
|
||||
System.Text.Encoding.UTF8,
|
||||
"application/json")
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,199 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer.OWIN
|
||||
|
||||
{
|
||||
public class CustomerController : BaseController
|
||||
{
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Find()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var rows = db.Customs.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.name}</th>");
|
||||
tbody.AppendLine($"<td>{item.name2}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
//tbody.AppendLine($"<td>{item.model}</td>");
|
||||
|
||||
//if (item.price == null)
|
||||
// tbody.AppendLine($"<td>--</td>");
|
||||
//else
|
||||
//{
|
||||
// var price = (double)item.price / 1000.0;
|
||||
|
||||
// tbody.AppendLine($"<td>{price.ToString("N0")}</td>");
|
||||
//}
|
||||
|
||||
|
||||
//tbody.AppendLine($"<td>{item.manu}</td>");
|
||||
//tbody.AppendLine($"<td>{item.supply}</td>");
|
||||
|
||||
//if (item.remark.Length > 10)
|
||||
// tbody.AppendLine($"<td>{item.remark.Substring(0, 10)}...</td>");
|
||||
//else
|
||||
// tbody.AppendLine($"<td>{item.remark}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var sd = DateTime.Now.ToString("yyyy-MM-01");
|
||||
var rows = db.Customs.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t=>t.name);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.grp}</th>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.name2}</td>");
|
||||
tbody.AppendLine($"<td>{item.tel}</td>");
|
||||
tbody.AppendLine($"<td>{item.fax}</td>");
|
||||
tbody.AppendLine($"<td>{item.email}</td>");
|
||||
tbody.AppendLine($"<td>{item.address}</td>");
|
||||
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty( item.memo)==false && item.memo.Length > 10) tbody.AppendLine($"<td>{item.memo.Substring(0, 10)}...</td>");
|
||||
else tbody.AppendLine($"<td>{item.memo}</td>");
|
||||
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class HomeController : BaseController
|
||||
{
|
||||
[HttpPost]
|
||||
public void Index([FromBody] string value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return Properties.Settings.Default.json;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Login()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var contents = result.Content;
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
var contents = string.Empty;
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
Dictionary<string, string> list = new Dictionary<string, string>();
|
||||
list.Add("공용코드 목록", "/Common/List/?Gcode=EET1P&Grp=99");
|
||||
list.Add("사용자 목록", "/User/List/?Gcode=EET1P");
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
contents += $"<a target='_blank' href='{item.Value}'>{item.Key}</a>";
|
||||
}
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class ItemController : BaseController
|
||||
{
|
||||
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Find()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var rows = db.vFindSID.Where(t => t.sid.Contains(searchkey) || t.name.Contains(searchkey) || t.manu.Contains(searchkey) || t.model.Contains(searchkey));
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.Location}</th>");
|
||||
tbody.AppendLine($"<td>{item.sid}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.model}</td>");
|
||||
|
||||
if (item.price == null)
|
||||
tbody.AppendLine($"<td>--</td>");
|
||||
else
|
||||
{
|
||||
var price = (double)item.price / 1000.0;
|
||||
|
||||
tbody.AppendLine($"<td>{price.ToString("N0")}</td>");
|
||||
}
|
||||
|
||||
|
||||
tbody.AppendLine($"<td>{item.manu}</td>");
|
||||
tbody.AppendLine($"<td>{item.supply}</td>");
|
||||
|
||||
if (item.remark.Length > 10)
|
||||
tbody.AppendLine($"<td>{item.remark.Substring(0, 10)}...</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td>{item.remark}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var contents = result.Content;
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,290 +0,0 @@
|
||||
using Microsoft.Owin;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class JobreportController : BaseController
|
||||
{
|
||||
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string Add(FormCollection tbpdate)
|
||||
{
|
||||
var vals = Request.GetQueryNameValuePairs();
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Add()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View("/jobreport/add");
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var sd = DateTime.Now.ToString("yyyy-MM-01");
|
||||
var ed = DateTime.Now.ToShortDateString();
|
||||
var rows = db.vJobReportForUser.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == FCOMMON.info.Login.no && t.pdate.CompareTo(sd) >= 0 && t.pdate.CompareTo(ed) <= 1).OrderByDescending(t => t.pdate);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
|
||||
tbody.AppendLine($"<th scope='row'>{item.pdate.Substring(5)}</th>");
|
||||
tbody.AppendLine($"<td>{item.ww}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
|
||||
if (item.status == "진행 중" || item.status.EndsWith("%"))
|
||||
tbody.AppendLine($"<td class='table-info text-center'>{item.status}</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td class='text-center'>{item.status}</td>");
|
||||
|
||||
tbody.AppendLine($"<td>{item.type}</td>");
|
||||
tbody.AppendLine($"<td>{item.projectName}</td>");
|
||||
tbody.AppendLine($"<td>{item.hrs}</td>");
|
||||
tbody.AppendLine($"<td>{item.ot}</td>");
|
||||
|
||||
tbody.AppendLine("<td><span class='d-inline-block text-truncate' style='max-width: 150px;'>");
|
||||
tbody.AppendLine(item.description);
|
||||
tbody.AppendLine("</span></td>");
|
||||
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Find()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var sd = DateTime.Now.ToShortDateString();
|
||||
var rows = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(sd) == 0).OrderBy(t => t.name);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.pdate}</th>");
|
||||
tbody.AppendLine($"<td>{item.status}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.projectName}</td>");
|
||||
tbody.AppendLine($"<td>{item.hrs}</td>");
|
||||
tbody.AppendLine($"<td>{item.ot}</td>");
|
||||
tbody.AppendLine($"<td>{item.description}</td>");
|
||||
|
||||
|
||||
if (item.description.Length > 10)
|
||||
tbody.AppendLine($"<td>{item.description.Substring(0, 10)}...</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td>{item.description}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var sd = DateTime.Now.ToString("yyyy-MM-01");
|
||||
var ed = DateTime.Now.ToShortDateString();
|
||||
var rows = db.vJobReportForUser.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == FCOMMON.info.Login.no && t.pdate.CompareTo(sd) >= 0 && t.pdate.CompareTo(ed) <= 1).OrderByDescending(t => t.pdate);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
|
||||
tbody.AppendLine($"<th scope='row'>{item.pdate.Substring(5)}</th>");
|
||||
tbody.AppendLine($"<td>{item.ww}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
|
||||
if (item.status == "진행 중" || item.status.EndsWith("%"))
|
||||
tbody.AppendLine($"<td class='table-info text-center'>{item.status}</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td class='text-center'>{item.status}</td>");
|
||||
|
||||
tbody.AppendLine($"<td>{item.type}</td>");
|
||||
tbody.AppendLine($"<td>{item.projectName}</td>");
|
||||
tbody.AppendLine($"<td>{item.hrs}</td>");
|
||||
tbody.AppendLine($"<td>{item.ot}</td>");
|
||||
|
||||
tbody.AppendLine("<td><span class='d-inline-block text-truncate' style='max-width: 150px;'>");
|
||||
tbody.AppendLine(item.description);
|
||||
tbody.AppendLine("</span></td>");
|
||||
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,467 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class ProjectController : BaseController
|
||||
{
|
||||
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Find()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var rows = db.Projects.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.status.Contains("완료") == false).OrderByDescending(t => t.pdate).Take(50);
|
||||
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.pdate}</th>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
|
||||
|
||||
//if (item.description.Length > 10)
|
||||
// tbody.AppendLine($"<td>{item.description.Substring(0, 10)}...</td>");
|
||||
//else
|
||||
// tbody.AppendLine($"<td>{item.description}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage ScheduleConfirm(int? id)
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
var project = (int)id;
|
||||
|
||||
//데이터를 조회해서 표시를 해준다.
|
||||
var db = new EEEntities();
|
||||
var prjinfo = db.Projects.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.idx == project).FirstOrDefault();
|
||||
var schrows = db.EETGW_ProjectsSchedule.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == project).OrderByDescending(t => t.project).OrderByDescending(t => t.no).OrderBy(t => t.seq);
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
System.Text.StringBuilder tinfo = new System.Text.StringBuilder();
|
||||
//프로젝트정보를 표시합니다.
|
||||
tinfo.AppendLine("<tr>");
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.idx));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.status));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.progress));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.name));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.reqstaff));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.userManager));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.orderno));
|
||||
tinfo.AppendLine("</tr>");
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", "");
|
||||
contents = contents.Replace("{tableinfo}", tinfo.ToString());
|
||||
|
||||
tinfo.Clear();
|
||||
foreach (var item in schrows)
|
||||
{
|
||||
tinfo.AppendLine("<tr>");
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.no));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.seq));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.title));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.sw));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.ew));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.swa));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.ewa));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.progress));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.uid));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", item.memo));
|
||||
tinfo.AppendLine("</tr>");
|
||||
}
|
||||
contents = contents.Replace("{scheinfo}", tinfo.ToString());
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
|
||||
var db = new EEEntities();
|
||||
|
||||
|
||||
var rows = db.Projects.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.status.Contains("완료") == false).OrderByDescending(t => t.pdate).Take(50);
|
||||
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.idx}</th>");
|
||||
tbody.AppendLine($"<td>{item.status}</td>");
|
||||
tbody.AppendLine($"<td>{item.progress}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.reqstaff}</td>");
|
||||
tbody.AppendLine($"<td>{item.userManager}</td>");
|
||||
tbody.AppendLine($"<td>{item.cnt}</td>");
|
||||
tbody.AppendLine($"<td>{item.costo}</td>");
|
||||
tbody.AppendLine($"<td>{item.costn}</td>");
|
||||
tbody.AppendLine($"<td>{item.costo - item.costn}</td>");
|
||||
tbody.AppendLine($"<td>{item.orderno}</td>");
|
||||
if (item.memo != null)
|
||||
tbody.AppendLine($"<td>{item.memo}</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td> </td>");
|
||||
|
||||
|
||||
|
||||
//if (item.description.Length > 10)
|
||||
// tbody.AppendLine($"<td>{item.description.Substring(0, 10)}...</td>");
|
||||
//else
|
||||
// tbody.AppendLine($"<td>{item.description}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage detail(int id)
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
|
||||
var db = new EEEntities();
|
||||
|
||||
|
||||
var rows = db.Projects.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.status.Contains("완료") == false).OrderByDescending(t => t.pdate).Take(50);
|
||||
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.idx}</th>");
|
||||
tbody.AppendLine($"<td>{item.status}</td>");
|
||||
tbody.AppendLine($"<td>{item.progress}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.reqstaff}</td>");
|
||||
tbody.AppendLine($"<td>{item.userManager}</td>");
|
||||
tbody.AppendLine($"<td>{item.cnt}</td>");
|
||||
tbody.AppendLine($"<td>{item.costo}</td>");
|
||||
tbody.AppendLine($"<td>{item.costn}</td>");
|
||||
tbody.AppendLine($"<td>{item.costo - item.costn}</td>");
|
||||
tbody.AppendLine($"<td>{item.orderno}</td>");
|
||||
if (item.memo != null)
|
||||
tbody.AppendLine($"<td>{item.memo}</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td> </td>");
|
||||
|
||||
|
||||
|
||||
//if (item.description.Length > 10)
|
||||
// tbody.AppendLine($"<td>{item.description.Substring(0, 10)}...</td>");
|
||||
//else
|
||||
// tbody.AppendLine($"<td>{item.description}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
contents = contents.Replace("{pidx}", id.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage partlist(int id)
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
|
||||
var db = new EEEntities();
|
||||
|
||||
var prjinfo = db.Projects.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.idx == id).FirstOrDefault();
|
||||
System.Text.StringBuilder tinfo = new System.Text.StringBuilder();
|
||||
//프로젝트정보를 표시합니다.
|
||||
tinfo.AppendLine("<tr>");
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.idx));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.status));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.progress));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.name));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.reqstaff));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.userManager));
|
||||
tinfo.AppendLine(string.Format("<td>{0}</td>", prjinfo.orderno));
|
||||
tinfo.AppendLine("</tr>");
|
||||
|
||||
contents = contents.Replace("{tableinfo}", tinfo.ToString());
|
||||
|
||||
|
||||
var rows = db.ProjectsPart.Where(t => t.Project == id).OrderBy(t=>t.no);
|
||||
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.no}</th>");
|
||||
tbody.AppendLine($"<td>{item.ItemGroup}</td>");
|
||||
tbody.AppendLine($"<td>{item.ItemModel}</td>");
|
||||
tbody.AppendLine($"<td>{item.ItemUnit}</td>");
|
||||
tbody.AppendLine($"<td>{item.ItemName}</td>");
|
||||
tbody.AppendLine($"<td>{item.ItemSid}</td>");
|
||||
tbody.AppendLine($"<td>{item.ItemManu}</td>");
|
||||
tbody.AppendLine($"<td>{item.qty}</td>");
|
||||
tbody.AppendLine($"<td>{item.qtyn}</td>");
|
||||
tbody.AppendLine($"<td>{item.price}</td>");
|
||||
tbody.AppendLine($"<td>{item.amt}</td>");
|
||||
tbody.AppendLine($"<td>{item.amtn}</td>");
|
||||
tbody.AppendLine($"<td>{item.remark}</td>");
|
||||
tbody.AppendLine($"<td>{item.qtybuy}</td>");
|
||||
tbody.AppendLine($"<td>{item.qtyin}</td>");
|
||||
tbody.AppendLine($"<td>{item.bbuy}</td>");
|
||||
tbody.AppendLine($"<td>{item.bconfirm}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
contents = contents.Replace("{pidx}", id.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class PurchaseController : BaseController
|
||||
{
|
||||
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Find()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var rows = db.vFindSID.Where(t => t.sid.Contains(searchkey) || t.name.Contains(searchkey) || t.manu.Contains(searchkey) || t.model.Contains(searchkey));
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.Location}</th>");
|
||||
tbody.AppendLine($"<td>{item.sid}</td>");
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.model}</td>");
|
||||
|
||||
if (item.price == null)
|
||||
tbody.AppendLine($"<td>--</td>");
|
||||
else
|
||||
{
|
||||
var price = (double)item.price / 1000.0;
|
||||
|
||||
tbody.AppendLine($"<td>{price.ToString("N0")}</td>");
|
||||
}
|
||||
|
||||
|
||||
tbody.AppendLine($"<td>{item.manu}</td>");
|
||||
tbody.AppendLine($"<td>{item.supply}</td>");
|
||||
|
||||
if (item.remark.Length > 10)
|
||||
tbody.AppendLine($"<td>{item.remark.Substring(0, 10)}...</td>");
|
||||
else
|
||||
tbody.AppendLine($"<td>{item.remark}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
|
||||
var gets = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
var key_search = gets.Where(t => t.Key == "search").FirstOrDefault();
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var searchkey = string.Empty;
|
||||
if (key_search.Key != null && key_search.Value.isEmpty() == false) searchkey = key_search.Value.Trim();
|
||||
|
||||
var tbody = new System.Text.StringBuilder();
|
||||
|
||||
//테이블데이터생성
|
||||
var itemcnt = 0;
|
||||
//if (searchkey.isEmpty() == false)
|
||||
{
|
||||
var db = new EEEntities();
|
||||
var sd = DateTime.Now.ToString("yyyy-MM-01");
|
||||
var rows = db.vPurchase.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(sd) >= 0).OrderByDescending(t => t.pdate);
|
||||
itemcnt = rows.Count();
|
||||
foreach (var item in rows)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine($"<th scope='row'>{item.pdate.Substring(5)}</th>");
|
||||
|
||||
if (item.state == "---") tbody.AppendLine($"<td class='table-info'>{item.state}</td>");
|
||||
else if (item.state == "Received") tbody.AppendLine($"<td class='table-success'>{item.state}</td>");
|
||||
else tbody.AppendLine($"<td>{item.state}</td>");
|
||||
|
||||
tbody.AppendLine($"<td>{item.name}</td>");
|
||||
tbody.AppendLine($"<td>{item.sid}</td>");
|
||||
tbody.AppendLine($"<td>{item.pumname}</td>");
|
||||
|
||||
if (item.pumscale.Length > 10) tbody.AppendLine($"<td>{item.pumscale.Substring(0, 10)}...</td>");
|
||||
else tbody.AppendLine($"<td>{item.pumscale}</td>");
|
||||
|
||||
tbody.AppendLine($"<td>{item.pumqty}</td>");
|
||||
tbody.AppendLine($"<td>{item.pumprice}</td>");
|
||||
tbody.AppendLine($"<td>{item.pumamt}</td>");
|
||||
tbody.AppendLine($"<td>{item.supply}</td>");
|
||||
if (item.project.Length > 10) tbody.AppendLine($"<td>{item.project.Substring(0, 10)}...</td>");
|
||||
else tbody.AppendLine($"<td>{item.project}</td>");
|
||||
|
||||
if (item.bigo.Length > 10) tbody.AppendLine($"<td>{item.bigo.Substring(0, 10)}...</td>");
|
||||
else tbody.AppendLine($"<td>{item.bigo}</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//아잍쳄이 없는경우
|
||||
if (itemcnt == 0)
|
||||
{
|
||||
tbody.AppendLine("<tr>");
|
||||
tbody.AppendLine("<th scope='row'>1</th>");
|
||||
tbody.AppendLine("<td colspan='6'>자료가 없습니다</td>");
|
||||
tbody.AppendLine("</tr>");
|
||||
}
|
||||
|
||||
|
||||
var contents = result.Content.Replace("{search}", searchkey);
|
||||
contents = contents.Replace("{tabledata}", tbody.ToString());
|
||||
contents = contents.Replace("{cnt}", itemcnt.ToString());
|
||||
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
namespace WebServer
|
||||
{
|
||||
public class ResourceController : BaseController
|
||||
{
|
||||
[HttpGet]
|
||||
public HttpResponseMessage file()
|
||||
{
|
||||
var config = RequestContext.Configuration;
|
||||
var routeData = config.Routes.GetRouteData(Request).Values.ToList();
|
||||
|
||||
var p_resource = routeData.Where(t => t.Key == "resource").FirstOrDefault();
|
||||
var p_path = routeData.Where(t => t.Key == "path").FirstOrDefault();
|
||||
var p_ext = routeData.Where(t => t.Key == "ext").FirstOrDefault();
|
||||
var p_subdir = routeData.Where(t => t.Key == "subdir").FirstOrDefault();
|
||||
|
||||
var v_resource = string.Empty;
|
||||
var v_path = string.Empty;
|
||||
var v_ext = string.Empty;
|
||||
var v_subdir = string.Empty;
|
||||
|
||||
if (p_resource.Key == "resource") v_resource = p_resource.Value.ToString();
|
||||
if (p_path.Key == "path") v_path = p_path.Value.ToString();
|
||||
if (p_ext.Key == "ext") v_ext = p_ext.Value.ToString();
|
||||
if (p_subdir.Key == "subdir") v_subdir = p_subdir.Value.ToString();
|
||||
|
||||
//var file_ext = routeData[0].Value.ToString();
|
||||
//var name_resource = routeData[1].Value.ToString() + "." + file_ext;
|
||||
//var name_action = routeData[3].Value.ToString();
|
||||
|
||||
Boolean isBinary = true;
|
||||
|
||||
|
||||
string content_type = "text/plain";
|
||||
|
||||
if (v_ext == "json")
|
||||
{
|
||||
isBinary = false;
|
||||
content_type = "application/json";
|
||||
}
|
||||
else if(v_ext == "vue")
|
||||
{
|
||||
isBinary = false;
|
||||
content_type = "application/js";
|
||||
}
|
||||
else if (v_ext == "js")
|
||||
{
|
||||
isBinary = false;
|
||||
content_type = "application/js";
|
||||
}
|
||||
else if (v_ext == "css")
|
||||
{
|
||||
isBinary = false;
|
||||
content_type = "text/css";
|
||||
}
|
||||
else if (v_ext == "csv")
|
||||
{
|
||||
isBinary = false;
|
||||
content_type = "text/csv";
|
||||
}
|
||||
else if (v_ext == "ico")
|
||||
{
|
||||
isBinary = true;
|
||||
content_type = "image/x-icon";
|
||||
}
|
||||
else if(v_ext == "ttf" || v_ext == "otf")
|
||||
{
|
||||
isBinary = true;
|
||||
content_type = "application/octet-stream";
|
||||
}
|
||||
|
||||
HttpContent resultContent = null;
|
||||
var file = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", v_path, v_subdir, v_resource + "." + v_ext);
|
||||
|
||||
if (isBinary)
|
||||
{
|
||||
|
||||
if (System.IO.File.Exists(file))
|
||||
{
|
||||
var buffer = System.IO.File.ReadAllBytes(file);
|
||||
resultContent = new ByteArrayContent(buffer);
|
||||
Console.WriteLine(">>File(B) : " + file);
|
||||
}
|
||||
else Console.WriteLine("no resouoir file " + file);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (System.IO.File.Exists(file))
|
||||
{
|
||||
|
||||
var buffer = System.IO.File.ReadAllText(file, System.Text.Encoding.UTF8);
|
||||
resultContent = new StringContent(buffer, System.Text.Encoding.UTF8, content_type);
|
||||
Console.WriteLine(">>File(S) : " + file);
|
||||
}
|
||||
else Console.WriteLine("no resouoir file " + file);
|
||||
}
|
||||
|
||||
|
||||
return new HttpResponseMessage()
|
||||
{
|
||||
Content = resultContent
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class ResultController : BaseController
|
||||
{
|
||||
[HttpPost]
|
||||
public void Index([FromBody]string value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody]string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var contents = result.Content;
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class SettingController : BaseController
|
||||
{
|
||||
[HttpPost]
|
||||
public void Index([FromBody]string value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody]string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var contents = result.Content;
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class UserController : BaseController
|
||||
{
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
var db = new EEEntities();
|
||||
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.AppendLine("List");
|
||||
sb.AppendLine("Gcode");
|
||||
|
||||
//System.Web.Http.Results.JsonResult<string>
|
||||
//var json = JsonConvert.SerializeObject(liast);
|
||||
return new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
sb.ToString(),
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage List()
|
||||
{
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
using (var db = new EEEntities())
|
||||
{
|
||||
var vGcode = "EET1P";
|
||||
var liast = db.vGroupUser.AsNoTracking().Where(t => t.gcode == vGcode).OrderBy(t => t.id).ToArray();
|
||||
|
||||
//System.Web.Http.Results.JsonResult<string>
|
||||
var json = JsonConvert.SerializeObject(liast);
|
||||
return new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
json.ToString(),
|
||||
System.Text.Encoding.UTF8,
|
||||
"application/json")
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Customs
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string grp { get; set; }
|
||||
public string uptae { get; set; }
|
||||
public string name { get; set; }
|
||||
public string name2 { get; set; }
|
||||
public string owner { get; set; }
|
||||
public string ownertel { get; set; }
|
||||
public string address { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string fax { get; set; }
|
||||
public string email { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string staff { get; set; }
|
||||
public string stafftel { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class EETGW_GroupUser
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string uid { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string Process { get; set; }
|
||||
public string state { get; set; }
|
||||
public Nullable<bool> useJobReport { get; set; }
|
||||
public Nullable<bool> useUserState { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class EETGW_Project_Layout
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public int no { get; set; }
|
||||
public int row { get; set; }
|
||||
public int col { get; set; }
|
||||
public int rowspan { get; set; }
|
||||
public int colspan { get; set; }
|
||||
public Nullable<int> project { get; set; }
|
||||
public string reserve { get; set; }
|
||||
public string remark { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class EETGW_ProjectsSchedule
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public Nullable<int> project { get; set; }
|
||||
public Nullable<int> no { get; set; }
|
||||
public Nullable<int> seq { get; set; }
|
||||
public string title { get; set; }
|
||||
public Nullable<int> sw { get; set; }
|
||||
public Nullable<int> ew { get; set; }
|
||||
public Nullable<int> swa { get; set; }
|
||||
public Nullable<int> ewa { get; set; }
|
||||
public string uid { get; set; }
|
||||
public string memo { get; set; }
|
||||
public Nullable<int> appoval { get; set; }
|
||||
public Nullable<int> progress { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class HolidayLIst
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public Nullable<bool> free { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Holyday
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string cate { get; set; }
|
||||
public string result { get; set; }
|
||||
public Nullable<System.DateTime> sdate { get; set; }
|
||||
public Nullable<System.DateTime> edate { get; set; }
|
||||
public Nullable<double> term { get; set; }
|
||||
public Nullable<double> termDr { get; set; }
|
||||
public Nullable<double> DrTime { get; set; }
|
||||
public Nullable<double> CrTime { get; set; }
|
||||
public string title { get; set; }
|
||||
public string contents { get; set; }
|
||||
public string uid { get; set; }
|
||||
public string tolist { get; set; }
|
||||
public Nullable<bool> mail { get; set; }
|
||||
public Nullable<bool> mailsend { get; set; }
|
||||
public string tag { get; set; }
|
||||
public string reason { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Items
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public Nullable<bool> disable { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string cate { get; set; }
|
||||
public string name { get; set; }
|
||||
public string sid { get; set; }
|
||||
public string model { get; set; }
|
||||
public string manu { get; set; }
|
||||
public Nullable<double> scale { get; set; }
|
||||
public string unit { get; set; }
|
||||
public string supply { get; set; }
|
||||
public Nullable<int> supplyidx { get; set; }
|
||||
public Nullable<decimal> price { get; set; }
|
||||
public string memo { get; set; }
|
||||
public byte[] image { get; set; }
|
||||
public Nullable<bool> bparam1 { get; set; }
|
||||
public Nullable<int> iparam1 { get; set; }
|
||||
public string import { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public Nullable<bool> bEstimate { get; set; }
|
||||
public Nullable<bool> bSAP { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class JobReport
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public Nullable<int> pidx { get; set; }
|
||||
public string projectName { get; set; }
|
||||
public string uid { get; set; }
|
||||
public string requestpart { get; set; }
|
||||
public string package { get; set; }
|
||||
public string status { get; set; }
|
||||
public string type { get; set; }
|
||||
public string process { get; set; }
|
||||
public string description { get; set; }
|
||||
public string remark { get; set; }
|
||||
public Nullable<double> hrs { get; set; }
|
||||
public Nullable<double> ot { get; set; }
|
||||
public Nullable<bool> import { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public string description2 { get; set; }
|
||||
public string tag { get; set; }
|
||||
public Nullable<bool> autoinput { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class LineCode
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string code { get; set; }
|
||||
public string team { get; set; }
|
||||
public string part { get; set; }
|
||||
public string plant { get; set; }
|
||||
public string grp2 { get; set; }
|
||||
public Nullable<bool> except { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class MailData
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public Nullable<int> project { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string cate { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public string subject { get; set; }
|
||||
public string fromlist { get; set; }
|
||||
public string tolist { get; set; }
|
||||
public string bcc { get; set; }
|
||||
public string cc { get; set; }
|
||||
public string body { get; set; }
|
||||
public Nullable<bool> SendOK { get; set; }
|
||||
public string SendMsg { get; set; }
|
||||
public Nullable<int> aidx { get; set; }
|
||||
public string atime { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class MailForm
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string cate { get; set; }
|
||||
public string title { get; set; }
|
||||
public string tolist { get; set; }
|
||||
public string bcc { get; set; }
|
||||
public string cc { get; set; }
|
||||
public string subject { get; set; }
|
||||
public string tail { get; set; }
|
||||
public string body { get; set; }
|
||||
public Nullable<bool> selfTo { get; set; }
|
||||
public Nullable<bool> selfCC { get; set; }
|
||||
public Nullable<bool> selfBCC { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public string exceptmail { get; set; }
|
||||
public string exceptmailcc { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
//180917 chi makefilepath,MakeFTPPath 입력
|
||||
//180705 chi GetHexStringNoSpace 다시 추가 ,UrlPathEncode 추가
|
||||
// getDateValue 추가
|
||||
//180625 chi GetHexStringNoSpace 삭제(이것은 util.cs로 이동)
|
||||
//180614 chi Map 명령추가
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
/// <summary>
|
||||
/// generic method Extension
|
||||
/// </summary>
|
||||
public static class MethodExtensions
|
||||
{
|
||||
public static string MakeFilePath(this string value,params string[] param)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
sb.Append(value.Replace("/", "\\"));
|
||||
foreach (var item in param)
|
||||
{
|
||||
if (sb.Length > 0 && sb.ToString().EndsWith("\\") == false) sb.Append("\\");
|
||||
sb.Append(item.Replace("/", "\\"));
|
||||
}
|
||||
var retval = sb.ToString().Replace("/", "\\").Replace("\\\\", "\\");
|
||||
return retval.ToString();
|
||||
}
|
||||
|
||||
|
||||
public static string MakeFTPPath(this string value, params string[] param)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
sb.Append(value.Replace("\\", "/"));
|
||||
foreach (var item in param)
|
||||
{
|
||||
if (sb.Length > 0 && sb.ToString().EndsWith("/") == false) sb.Append("/");
|
||||
sb.Append(item.Replace("\\", "/"));
|
||||
}
|
||||
var retval = sb.ToString().Replace("//", "/");
|
||||
return retval.ToString();
|
||||
}
|
||||
|
||||
|
||||
public static double map(this double x, int in_min, int in_max, int out_min, int out_max)
|
||||
{
|
||||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
||||
}
|
||||
|
||||
public static string Base64Encode(this string src)
|
||||
{
|
||||
string base64enc = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(src));
|
||||
return base64enc;
|
||||
}
|
||||
public static string Base64Decode(this string src)
|
||||
{
|
||||
var base64dec = Convert.FromBase64String(src);
|
||||
return System.Text.Encoding.UTF8.GetString(base64dec);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 0101이 반복되는 문자열 형태로 전환합니다.
|
||||
/// </summary>
|
||||
/// <param name="arr"></param>
|
||||
/// <returns></returns>
|
||||
public static string BitString(this System.Collections.BitArray arr)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
for (int i = arr.Length; i > 0; i--)
|
||||
sb.Append(arr[i - 1] ? "1" : "0");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// int 값으로 변환합니다.
|
||||
/// </summary>
|
||||
/// <param name="arr"></param>
|
||||
/// <returns></returns>
|
||||
public static int ValueI(this System.Collections.BitArray arr)
|
||||
{
|
||||
byte[] buf = new byte[4];
|
||||
arr.CopyTo(buf, 0);
|
||||
return BitConverter.ToInt32(buf, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 숫자인지 검사합니다.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsNumeric(this string input)
|
||||
{
|
||||
double data;
|
||||
return double.TryParse(input, out data);
|
||||
//return Regex.IsMatch(input, @"^\d+$");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// isnullorempty 를 수행합니다.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static Boolean isEmpty(this string input)
|
||||
{
|
||||
return string.IsNullOrEmpty(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// default 인코딩을 사용하여 문자열로 반환합니다.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetString(this Byte[] input)
|
||||
{
|
||||
return System.Text.Encoding.Default.GetString(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 16진수 문자열 형태로 반환합니다.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetHexString(this Byte[] input)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
foreach (byte b in input)
|
||||
sb.Append(" " + b.ToString("X2"));
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
public class PageModel
|
||||
{
|
||||
public List<KeyValuePair<string, object>> RouteData { get; set; }
|
||||
|
||||
|
||||
public string urlcontrol { get; set; }
|
||||
public string urlaction { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
|
||||
public partial class EEEntities : DbContext
|
||||
{
|
||||
public EEEntities()
|
||||
: base("name=EEEntities")
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
public virtual DbSet<EETGW_GroupUser> EETGW_GroupUser { get; set; }
|
||||
public virtual DbSet<Items> Items { get; set; }
|
||||
public virtual DbSet<JobReport> JobReport { get; set; }
|
||||
public virtual DbSet<MailData> MailData { get; set; }
|
||||
public virtual DbSet<MailForm> MailForm { get; set; }
|
||||
public virtual DbSet<Projects> Projects { get; set; }
|
||||
public virtual DbSet<ProjectsPart> ProjectsPart { get; set; }
|
||||
public virtual DbSet<Purchase> Purchase { get; set; }
|
||||
public virtual DbSet<UserGroup> UserGroup { get; set; }
|
||||
public virtual DbSet<Users> Users { get; set; }
|
||||
public virtual DbSet<vGroupUser> vGroupUser { get; set; }
|
||||
public virtual DbSet<vJobReportForUser> vJobReportForUser { get; set; }
|
||||
public virtual DbSet<vPurchase> vPurchase { get; set; }
|
||||
public virtual DbSet<Auth> Auth { get; set; }
|
||||
public virtual DbSet<Common> Common { get; set; }
|
||||
public virtual DbSet<Customs> Customs { get; set; }
|
||||
public virtual DbSet<EETGW_Project_Layout> EETGW_Project_Layout { get; set; }
|
||||
public virtual DbSet<HolidayLIst> HolidayLIst { get; set; }
|
||||
public virtual DbSet<Holyday> Holyday { get; set; }
|
||||
public virtual DbSet<LineCode> LineCode { get; set; }
|
||||
public virtual DbSet<EETGW_ProjectsSchedule> EETGW_ProjectsSchedule { get; set; }
|
||||
public virtual DbSet<vFindSID> vFindSID { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,636 +0,0 @@
|
||||
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||
output extension=".cs"#><#
|
||||
|
||||
const string inputFile = @"Model1.edmx";
|
||||
var textTransform = DynamicTextTransformation.Create(this);
|
||||
var code = new CodeGenerationTools(this);
|
||||
var ef = new MetadataTools(this);
|
||||
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
|
||||
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
|
||||
var itemCollection = loader.CreateEdmItemCollection(inputFile);
|
||||
var modelNamespace = loader.GetModelNamespace(inputFile);
|
||||
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
|
||||
|
||||
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
|
||||
if (container == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
#>
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
|
||||
//
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
<#
|
||||
|
||||
var codeNamespace = code.VsNamespaceSuggestion();
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
#>
|
||||
namespace <#=code.EscapeNamespace(codeNamespace)#>
|
||||
{
|
||||
<#
|
||||
PushIndent(" ");
|
||||
}
|
||||
|
||||
#>
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
<#
|
||||
if (container.FunctionImports.Any())
|
||||
{
|
||||
#>
|
||||
using System.Data.Entity.Core.Objects;
|
||||
using System.Linq;
|
||||
<#
|
||||
}
|
||||
#>
|
||||
|
||||
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
|
||||
{
|
||||
public <#=code.Escape(container)#>()
|
||||
: base("name=<#=container.Name#>")
|
||||
{
|
||||
<#
|
||||
if (!loader.IsLazyLoadingEnabled(container))
|
||||
{
|
||||
#>
|
||||
this.Configuration.LazyLoadingEnabled = false;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
|
||||
{
|
||||
// Note: the DbSet members are defined below such that the getter and
|
||||
// setter always have the same accessibility as the DbSet definition
|
||||
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
<#
|
||||
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.DbSet(entitySet)#>
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var edmFunction in container.FunctionImports)
|
||||
{
|
||||
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
PopIndent();
|
||||
#>
|
||||
}
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#+
|
||||
|
||||
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
if (typeMapper.IsComposable(edmFunction))
|
||||
{
|
||||
#>
|
||||
|
||||
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
|
||||
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
|
||||
{
|
||||
<#+
|
||||
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
|
||||
#>
|
||||
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
|
||||
}
|
||||
<#+
|
||||
}
|
||||
else
|
||||
{
|
||||
#>
|
||||
|
||||
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
|
||||
{
|
||||
<#+
|
||||
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
|
||||
#>
|
||||
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
|
||||
}
|
||||
<#+
|
||||
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
|
||||
{
|
||||
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
|
||||
{
|
||||
#>
|
||||
var <#=name#> = <#=isNotNull#> ?
|
||||
<#=notNullInit#> :
|
||||
<#=nullInit#>;
|
||||
|
||||
<#+
|
||||
}
|
||||
|
||||
public const string TemplateId = "CSharp_DbContext_Context_EF6";
|
||||
|
||||
public class CodeStringGenerator
|
||||
{
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly TypeMapper _typeMapper;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(typeMapper, "typeMapper");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
|
||||
_code = code;
|
||||
_typeMapper = typeMapper;
|
||||
_ef = ef;
|
||||
}
|
||||
|
||||
public string Property(EdmProperty edmProperty)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
Accessibility.ForProperty(edmProperty),
|
||||
_typeMapper.GetTypeName(edmProperty.TypeUsage),
|
||||
_code.Escape(edmProperty),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
|
||||
}
|
||||
|
||||
public string NavigationProperty(NavigationProperty navProp)
|
||||
{
|
||||
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
|
||||
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
|
||||
_code.Escape(navProp),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
|
||||
}
|
||||
|
||||
public string AccessibilityAndVirtual(string accessibility)
|
||||
{
|
||||
return accessibility + (accessibility != "private" ? " virtual" : "");
|
||||
}
|
||||
|
||||
public string EntityClassOpening(EntityType entity)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1}partial class {2}{3}",
|
||||
Accessibility.ForType(entity),
|
||||
_code.SpaceAfter(_code.AbstractOption(entity)),
|
||||
_code.Escape(entity),
|
||||
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
|
||||
}
|
||||
|
||||
public string EnumOpening(SimpleType enumType)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} enum {1} : {2}",
|
||||
Accessibility.ForType(enumType),
|
||||
_code.Escape(enumType),
|
||||
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
|
||||
}
|
||||
|
||||
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
|
||||
{
|
||||
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
|
||||
{
|
||||
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
|
||||
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
|
||||
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
|
||||
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
|
||||
}
|
||||
}
|
||||
|
||||
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} IQueryable<{1}> {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
_code.Escape(edmFunction),
|
||||
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
|
||||
}
|
||||
|
||||
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
edmFunction.NamespaceName,
|
||||
edmFunction.Name,
|
||||
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
|
||||
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
|
||||
}
|
||||
|
||||
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
|
||||
if (includeMergeOption)
|
||||
{
|
||||
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
_code.Escape(edmFunction),
|
||||
paramList);
|
||||
}
|
||||
|
||||
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
|
||||
if (includeMergeOption)
|
||||
{
|
||||
callParams = ", mergeOption" + callParams;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
|
||||
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
edmFunction.Name,
|
||||
callParams);
|
||||
}
|
||||
|
||||
public string DbSet(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
|
||||
Accessibility.ForReadOnlyProperty(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType),
|
||||
_code.Escape(entitySet));
|
||||
}
|
||||
|
||||
public string DbSetInitializer(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} = Set<{1}>();",
|
||||
_code.Escape(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType));
|
||||
}
|
||||
|
||||
public string UsingDirectives(bool inHeader, bool includeCollections = true)
|
||||
{
|
||||
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
|
||||
? string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0}using System;{1}" +
|
||||
"{2}",
|
||||
inHeader ? Environment.NewLine : "",
|
||||
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
|
||||
inHeader ? "" : Environment.NewLine)
|
||||
: "";
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeMapper
|
||||
{
|
||||
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
|
||||
|
||||
private readonly System.Collections.IList _errors;
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public static string FixNamespaces(string typeName)
|
||||
{
|
||||
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
|
||||
}
|
||||
|
||||
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
ArgumentNotNull(errors, "errors");
|
||||
|
||||
_code = code;
|
||||
_ef = ef;
|
||||
_errors = errors;
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, string modelNamespace)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var collectionType = edmType as CollectionType;
|
||||
if (collectionType != null)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
|
||||
}
|
||||
|
||||
var typeName = _code.Escape(edmType.MetadataProperties
|
||||
.Where(p => p.Name == ExternalTypeNameAttributeName)
|
||||
.Select(p => (string)p.Value)
|
||||
.FirstOrDefault())
|
||||
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
|
||||
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
|
||||
_code.Escape(edmType));
|
||||
|
||||
if (edmType is StructuralType)
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
if (edmType is SimpleType)
|
||||
{
|
||||
var clrType = UnderlyingClrType(edmType);
|
||||
if (!IsEnumType(edmType))
|
||||
{
|
||||
typeName = _code.Escape(clrType);
|
||||
}
|
||||
|
||||
typeName = FixNamespaces(typeName);
|
||||
|
||||
return clrType.IsValueType && isNullable == true ?
|
||||
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
|
||||
typeName;
|
||||
}
|
||||
|
||||
throw new ArgumentException("edmType");
|
||||
}
|
||||
|
||||
public Type UnderlyingClrType(EdmType edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
var primitiveType = edmType as PrimitiveType;
|
||||
if (primitiveType != null)
|
||||
{
|
||||
return primitiveType.ClrEquivalentType;
|
||||
}
|
||||
|
||||
if (IsEnumType(edmType))
|
||||
{
|
||||
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
|
||||
}
|
||||
|
||||
return typeof(object);
|
||||
}
|
||||
|
||||
public object GetEnumMemberValue(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var valueProperty = enumMember.GetType().GetProperty("Value");
|
||||
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public string GetEnumMemberName(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var nameProperty = enumMember.GetType().GetProperty("Name");
|
||||
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var membersProperty = enumType.GetType().GetProperty("Members");
|
||||
return membersProperty != null
|
||||
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
|
||||
: Enumerable.Empty<MetadataItem>();
|
||||
}
|
||||
|
||||
public bool EnumIsFlags(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
|
||||
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public bool IsEnumType(GlobalItem edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
return edmType.GetType().Name == "EnumType";
|
||||
}
|
||||
|
||||
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public string CreateLiteral(object value)
|
||||
{
|
||||
if (value == null || value.GetType() != typeof(TimeSpan))
|
||||
{
|
||||
return _code.CreateLiteral(value);
|
||||
}
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
|
||||
}
|
||||
|
||||
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
|
||||
{
|
||||
ArgumentNotNull(types, "types");
|
||||
ArgumentNotNull(sourceFile, "sourceFile");
|
||||
|
||||
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
||||
if (types.Any(item => !hash.Add(item)))
|
||||
{
|
||||
_errors.Add(
|
||||
new CompilerError(sourceFile, -1, -1, "6023",
|
||||
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return GetItemsToGenerate<SimpleType>(itemCollection)
|
||||
.Where(e => IsEnumType(e));
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
|
||||
{
|
||||
return itemCollection
|
||||
.OfType<T>()
|
||||
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
|
||||
.OrderBy(i => i.Name);
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return itemCollection
|
||||
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
|
||||
.Select(g => GetGlobalItemName(g));
|
||||
}
|
||||
|
||||
public string GetGlobalItemName(GlobalItem item)
|
||||
{
|
||||
if (item is EdmType)
|
||||
{
|
||||
return ((EdmType)item).Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((EntityContainer)item).Name;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
}
|
||||
|
||||
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
|
||||
return returnParamsProperty == null
|
||||
? edmFunction.ReturnParameter
|
||||
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool IsComposable(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
|
||||
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
|
||||
}
|
||||
|
||||
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
|
||||
{
|
||||
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
}
|
||||
|
||||
public TypeUsage GetReturnType(EdmFunction edmFunction)
|
||||
{
|
||||
var returnParam = GetReturnParameter(edmFunction);
|
||||
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
|
||||
}
|
||||
|
||||
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
|
||||
{
|
||||
var returnType = GetReturnType(edmFunction);
|
||||
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ArgumentNotNull<T>(T arg, string name) where T : class
|
||||
{
|
||||
if (arg == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
#>
|
||||
10
SubProject/WebServer/Model1.Designer.cs
generated
10
SubProject/WebServer/Model1.Designer.cs
generated
@@ -1,10 +0,0 @@
|
||||
// 모델 'D:\Source\##### 완료아이템\(014) GroupWare\Source\SubProject\WebServer\Model1.edmx'에 대해 T4 코드 생성이 사용됩니다.
|
||||
// 레거시 코드 생성을 사용하려면 '코드 생성 전략' 디자이너 속성의 값을
|
||||
// 'Legacy ObjectContext'로 변경하십시오. 이 속성은 모델이 디자이너에서 열릴 때
|
||||
// 속성 창에서 사용할 수 있습니다.
|
||||
|
||||
// 컨텍스트 및 엔터티 클래스가 생성되지 않은 경우 빈 모델을 만들었기 때문일 수도 있지만
|
||||
// 사용할 Entity Framework 버전을 선택하지 않았기 때문일 수도 있습니다. 모델에 맞는 컨텍스트 클래스 및
|
||||
// 엔터티 클래스를 생성하려면 디자이너에서 모델을 열고 디자이너 화면에서 마우스 오른쪽 단추를 클릭한
|
||||
// 다음 '데이터베이스에서 모델 업데이트...', '모델에서 데이터베이스 생성...' 또는 '코드 생성 항목 추가...'를
|
||||
// 선택하십시오.
|
||||
@@ -1,9 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
||||
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<edmx:Diagrams>
|
||||
<Diagram DiagramId="95ad1f3feb7e487d80dea2be441eb26b" Name="Diagram1">
|
||||
<EntityTypeShape EntityType="EEModel.EETGW_GroupUser" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.Items" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.JobReport" Width="1.5" PointX="4.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.MailData" Width="1.5" PointX="6.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.MailForm" Width="1.5" PointX="0.75" PointY="6.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.Projects" Width="1.5" PointX="2.75" PointY="6.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.ProjectsPart" Width="1.5" PointX="4.75" PointY="6.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.Purchase" Width="1.5" PointX="6.75" PointY="6.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.UserGroup" Width="1.5" PointX="8.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.Users" Width="1.5" PointX="8.75" PointY="3.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.vGroupUser" Width="1.5" PointX="8.75" PointY="9.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.vJobReportForUser" Width="1.5" PointX="10.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.vPurchase" Width="1.5" PointX="10.75" PointY="6.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.Auth" Width="1.5" PointX="13.375" PointY="0.75" />
|
||||
<EntityTypeShape EntityType="EEModel.Common" Width="1.5" PointX="13.375" PointY="4.75" />
|
||||
<EntityTypeShape EntityType="EEModel.Customs" Width="1.5" PointX="13.375" PointY="8.75" />
|
||||
<EntityTypeShape EntityType="EEModel.EETGW_Project_Layout" Width="1.5" PointX="13.375" PointY="14.75" />
|
||||
<EntityTypeShape EntityType="EEModel.HolidayLIst" Width="1.5" PointX="15.375" PointY="0.75" />
|
||||
<EntityTypeShape EntityType="EEModel.Holyday" Width="1.5" PointX="15.375" PointY="3.75" />
|
||||
<EntityTypeShape EntityType="EEModel.LineCode" Width="1.5" PointX="5.375" PointY="15.75" />
|
||||
<EntityTypeShape EntityType="EEModel.EETGW_ProjectsSchedule" Width="1.5" PointX="7.375" PointY="15.75" />
|
||||
<EntityTypeShape EntityType="EEModel.vFindSID" Width="1.5" PointX="15.375" PointY="9.75" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
</edmx:Edmx>
|
||||
@@ -1,733 +0,0 @@
|
||||
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||
output extension=".cs"#><#
|
||||
|
||||
const string inputFile = @"Model1.edmx";
|
||||
var textTransform = DynamicTextTransformation.Create(this);
|
||||
var code = new CodeGenerationTools(this);
|
||||
var ef = new MetadataTools(this);
|
||||
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
|
||||
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
|
||||
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
|
||||
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
|
||||
|
||||
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
WriteHeader(codeStringGenerator, fileManager);
|
||||
|
||||
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(entity.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
|
||||
<#=codeStringGenerator.EntityClassOpening(entity)#>
|
||||
{
|
||||
<#
|
||||
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
|
||||
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
|
||||
var complexProperties = typeMapper.GetComplexProperties(entity);
|
||||
|
||||
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public <#=code.Escape(entity)#>()
|
||||
{
|
||||
<#
|
||||
foreach (var edmProperty in propertiesWithDefaultValues)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var navigationProperty in collectionNavigationProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
var simpleProperties = typeMapper.GetSimpleProperties(entity);
|
||||
if (simpleProperties.Any())
|
||||
{
|
||||
foreach (var edmProperty in simpleProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
if (complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(complexProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
var navigationProperties = typeMapper.GetNavigationProperties(entity);
|
||||
if (navigationProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach (var navigationProperty in navigationProperties)
|
||||
{
|
||||
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
|
||||
{
|
||||
#>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(complex.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
|
||||
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
|
||||
{
|
||||
<#
|
||||
var complexProperties = typeMapper.GetComplexProperties(complex);
|
||||
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
|
||||
|
||||
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
public <#=code.Escape(complex)#>()
|
||||
{
|
||||
<#
|
||||
foreach (var edmProperty in propertiesWithDefaultValues)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
var simpleProperties = typeMapper.GetSimpleProperties(complex);
|
||||
if (simpleProperties.Any())
|
||||
{
|
||||
foreach(var edmProperty in simpleProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
if (complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(var edmProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(enumType.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
|
||||
<#
|
||||
if (typeMapper.EnumIsFlags(enumType))
|
||||
{
|
||||
#>
|
||||
[Flags]
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#=codeStringGenerator.EnumOpening(enumType)#>
|
||||
{
|
||||
<#
|
||||
var foundOne = false;
|
||||
|
||||
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
|
||||
{
|
||||
foundOne = true;
|
||||
#>
|
||||
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
|
||||
<#
|
||||
}
|
||||
|
||||
if (foundOne)
|
||||
{
|
||||
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
fileManager.Process();
|
||||
|
||||
#>
|
||||
<#+
|
||||
|
||||
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
|
||||
{
|
||||
fileManager.StartHeader();
|
||||
#>
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
|
||||
//
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
|
||||
<#+
|
||||
fileManager.EndBlock();
|
||||
}
|
||||
|
||||
public void BeginNamespace(CodeGenerationTools code)
|
||||
{
|
||||
var codeNamespace = code.VsNamespaceSuggestion();
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
#>
|
||||
namespace <#=code.EscapeNamespace(codeNamespace)#>
|
||||
{
|
||||
<#+
|
||||
PushIndent(" ");
|
||||
}
|
||||
}
|
||||
|
||||
public void EndNamespace(CodeGenerationTools code)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
|
||||
{
|
||||
PopIndent();
|
||||
#>
|
||||
}
|
||||
<#+
|
||||
}
|
||||
}
|
||||
|
||||
public const string TemplateId = "CSharp_DbContext_Types_EF6";
|
||||
|
||||
public class CodeStringGenerator
|
||||
{
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly TypeMapper _typeMapper;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(typeMapper, "typeMapper");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
|
||||
_code = code;
|
||||
_typeMapper = typeMapper;
|
||||
_ef = ef;
|
||||
}
|
||||
|
||||
public string Property(EdmProperty edmProperty)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
Accessibility.ForProperty(edmProperty),
|
||||
_typeMapper.GetTypeName(edmProperty.TypeUsage),
|
||||
_code.Escape(edmProperty),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
|
||||
}
|
||||
|
||||
public string NavigationProperty(NavigationProperty navProp)
|
||||
{
|
||||
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
|
||||
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
|
||||
_code.Escape(navProp),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
|
||||
}
|
||||
|
||||
public string AccessibilityAndVirtual(string accessibility)
|
||||
{
|
||||
return accessibility + (accessibility != "private" ? " virtual" : "");
|
||||
}
|
||||
|
||||
public string EntityClassOpening(EntityType entity)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1}partial class {2}{3}",
|
||||
Accessibility.ForType(entity),
|
||||
_code.SpaceAfter(_code.AbstractOption(entity)),
|
||||
_code.Escape(entity),
|
||||
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
|
||||
}
|
||||
|
||||
public string EnumOpening(SimpleType enumType)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} enum {1} : {2}",
|
||||
Accessibility.ForType(enumType),
|
||||
_code.Escape(enumType),
|
||||
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
|
||||
}
|
||||
|
||||
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
|
||||
{
|
||||
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
|
||||
{
|
||||
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
|
||||
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
|
||||
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
|
||||
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
|
||||
}
|
||||
}
|
||||
|
||||
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} IQueryable<{1}> {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
_code.Escape(edmFunction),
|
||||
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
|
||||
}
|
||||
|
||||
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
edmFunction.NamespaceName,
|
||||
edmFunction.Name,
|
||||
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
|
||||
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
|
||||
}
|
||||
|
||||
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
|
||||
if (includeMergeOption)
|
||||
{
|
||||
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
_code.Escape(edmFunction),
|
||||
paramList);
|
||||
}
|
||||
|
||||
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
|
||||
if (includeMergeOption)
|
||||
{
|
||||
callParams = ", mergeOption" + callParams;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
|
||||
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
edmFunction.Name,
|
||||
callParams);
|
||||
}
|
||||
|
||||
public string DbSet(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
|
||||
Accessibility.ForReadOnlyProperty(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType),
|
||||
_code.Escape(entitySet));
|
||||
}
|
||||
|
||||
public string UsingDirectives(bool inHeader, bool includeCollections = true)
|
||||
{
|
||||
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
|
||||
? string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0}using System;{1}" +
|
||||
"{2}",
|
||||
inHeader ? Environment.NewLine : "",
|
||||
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
|
||||
inHeader ? "" : Environment.NewLine)
|
||||
: "";
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeMapper
|
||||
{
|
||||
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
|
||||
|
||||
private readonly System.Collections.IList _errors;
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
ArgumentNotNull(errors, "errors");
|
||||
|
||||
_code = code;
|
||||
_ef = ef;
|
||||
_errors = errors;
|
||||
}
|
||||
|
||||
public static string FixNamespaces(string typeName)
|
||||
{
|
||||
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, string modelNamespace)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var collectionType = edmType as CollectionType;
|
||||
if (collectionType != null)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
|
||||
}
|
||||
|
||||
var typeName = _code.Escape(edmType.MetadataProperties
|
||||
.Where(p => p.Name == ExternalTypeNameAttributeName)
|
||||
.Select(p => (string)p.Value)
|
||||
.FirstOrDefault())
|
||||
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
|
||||
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
|
||||
_code.Escape(edmType));
|
||||
|
||||
if (edmType is StructuralType)
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
if (edmType is SimpleType)
|
||||
{
|
||||
var clrType = UnderlyingClrType(edmType);
|
||||
if (!IsEnumType(edmType))
|
||||
{
|
||||
typeName = _code.Escape(clrType);
|
||||
}
|
||||
|
||||
typeName = FixNamespaces(typeName);
|
||||
|
||||
return clrType.IsValueType && isNullable == true ?
|
||||
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
|
||||
typeName;
|
||||
}
|
||||
|
||||
throw new ArgumentException("edmType");
|
||||
}
|
||||
|
||||
public Type UnderlyingClrType(EdmType edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
var primitiveType = edmType as PrimitiveType;
|
||||
if (primitiveType != null)
|
||||
{
|
||||
return primitiveType.ClrEquivalentType;
|
||||
}
|
||||
|
||||
if (IsEnumType(edmType))
|
||||
{
|
||||
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
|
||||
}
|
||||
|
||||
return typeof(object);
|
||||
}
|
||||
|
||||
public object GetEnumMemberValue(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var valueProperty = enumMember.GetType().GetProperty("Value");
|
||||
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public string GetEnumMemberName(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var nameProperty = enumMember.GetType().GetProperty("Name");
|
||||
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var membersProperty = enumType.GetType().GetProperty("Members");
|
||||
return membersProperty != null
|
||||
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
|
||||
: Enumerable.Empty<MetadataItem>();
|
||||
}
|
||||
|
||||
public bool EnumIsFlags(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
|
||||
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public bool IsEnumType(GlobalItem edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
return edmType.GetType().Name == "EnumType";
|
||||
}
|
||||
|
||||
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public string CreateLiteral(object value)
|
||||
{
|
||||
if (value == null || value.GetType() != typeof(TimeSpan))
|
||||
{
|
||||
return _code.CreateLiteral(value);
|
||||
}
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
|
||||
}
|
||||
|
||||
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
|
||||
{
|
||||
ArgumentNotNull(types, "types");
|
||||
ArgumentNotNull(sourceFile, "sourceFile");
|
||||
|
||||
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
||||
if (types.Any(item => !hash.Add(item)))
|
||||
{
|
||||
_errors.Add(
|
||||
new CompilerError(sourceFile, -1, -1, "6023",
|
||||
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return GetItemsToGenerate<SimpleType>(itemCollection)
|
||||
.Where(e => IsEnumType(e));
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
|
||||
{
|
||||
return itemCollection
|
||||
.OfType<T>()
|
||||
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
|
||||
.OrderBy(i => i.Name);
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return itemCollection
|
||||
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
|
||||
.Select(g => GetGlobalItemName(g));
|
||||
}
|
||||
|
||||
public string GetGlobalItemName(GlobalItem item)
|
||||
{
|
||||
if (item is EdmType)
|
||||
{
|
||||
return ((EdmType)item).Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((EntityContainer)item).Name;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
}
|
||||
|
||||
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
|
||||
return returnParamsProperty == null
|
||||
? edmFunction.ReturnParameter
|
||||
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool IsComposable(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
|
||||
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
|
||||
}
|
||||
|
||||
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
|
||||
{
|
||||
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
}
|
||||
|
||||
public TypeUsage GetReturnType(EdmFunction edmFunction)
|
||||
{
|
||||
var returnParam = GetReturnParameter(edmFunction);
|
||||
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
|
||||
}
|
||||
|
||||
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
|
||||
{
|
||||
var returnType = GetReturnType(edmFunction);
|
||||
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ArgumentNotNull<T>(T arg, string name) where T : class
|
||||
{
|
||||
if (arg == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
#>
|
||||
@@ -1,79 +0,0 @@
|
||||
using Microsoft.Owin;
|
||||
using Owin;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Routing;
|
||||
|
||||
namespace WebServer.OWIN
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configuration(IAppBuilder appBuilder)
|
||||
{
|
||||
// Configure Web API for Self-Host
|
||||
HttpConfiguration config = new HttpConfiguration();
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
//메인파일 처리 방법
|
||||
IHttpRoute defaultRoute =
|
||||
config.Routes.CreateRoute("{controller}/{action}/{id}",
|
||||
new { controller = "home", action = "index", id = RouteParameter.Optional },
|
||||
null);
|
||||
|
||||
//기타파일들 처리 방법
|
||||
IHttpRoute cssRoute =
|
||||
config.Routes.CreateRoute("{path}/{subdir}/{resource}.{ext}",
|
||||
new { controller = "resource", action = "file", id = RouteParameter.Optional },
|
||||
null);
|
||||
|
||||
IHttpRoute mifRoute =
|
||||
config.Routes.CreateRoute("{path}/{resource}.{ext}",
|
||||
new { controller = "resource", action = "file", id = RouteParameter.Optional },
|
||||
null);
|
||||
|
||||
IHttpRoute icoRoute =
|
||||
config.Routes.CreateRoute("{resource}.{ext}",
|
||||
new { controller = "resource", action = "file", id = RouteParameter.Optional },
|
||||
null);
|
||||
|
||||
config.Routes.Add("mifRoute", mifRoute);
|
||||
config.Routes.Add("icoRoute", icoRoute);
|
||||
config.Routes.Add("cssRoute", cssRoute);
|
||||
config.Routes.Add("defaultRoute", defaultRoute);
|
||||
|
||||
appBuilder.UseStaticFiles();
|
||||
appBuilder.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
|
||||
appBuilder.UseWebApi(config);
|
||||
|
||||
|
||||
//appBuilder.UseFileServer(new FileServerOptions
|
||||
//{
|
||||
// RequestPath = new PathString(string.Empty),
|
||||
// FileSystem = new PhysicalFileSystem("./MySubFolder"),
|
||||
// EnableDirectoryBrowsing = true,
|
||||
//});
|
||||
|
||||
//appBuilder.UseStageMarker(PipelineStage.MapHandler);
|
||||
|
||||
|
||||
//config.Routes.MapHttpRoute(
|
||||
// name: "ignore",
|
||||
// routeTemplate: @".*\.(css|js|gif|jpg)(/.*)?",
|
||||
// defaults: new
|
||||
// {
|
||||
// controller = "file",
|
||||
// action = "readtext",
|
||||
// id = RouteParameter.Optional
|
||||
// }
|
||||
// );
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
using Microsoft.Owin;
|
||||
using Owin;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebServer.OWIN
|
||||
{
|
||||
public class StartupSSE
|
||||
{
|
||||
|
||||
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
var api = new Api();
|
||||
app.Run(context => api.Invoke(context));
|
||||
}
|
||||
|
||||
public class Subscriber
|
||||
{
|
||||
private StreamWriter _writer;
|
||||
private TaskCompletionSource<bool> _tcs;
|
||||
public Subscriber(Stream body, TaskCompletionSource<bool> tcs)
|
||||
{
|
||||
this._writer = new StreamWriter(body);
|
||||
this._tcs = tcs;
|
||||
}
|
||||
|
||||
public async void WriteAsync(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
_writer.Write(message);
|
||||
_writer.Flush();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (e.HResult == -2146232800) // non-existent connection
|
||||
_tcs.SetResult(true);
|
||||
else
|
||||
_tcs.SetException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Api
|
||||
{
|
||||
System.Timers.Timer _timer = new System.Timers.Timer(500);
|
||||
List<Subscriber> _subscribers = new List<Subscriber>();
|
||||
public Api()
|
||||
{
|
||||
_timer.Elapsed += _timer_Elapsed;
|
||||
}
|
||||
|
||||
void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
UpdateSubscribers();
|
||||
}
|
||||
|
||||
public void UpdateSubscribers()
|
||||
{
|
||||
Console.WriteLine("updating {0} subscribers", _subscribers.Count);
|
||||
var subscribersCopy = _subscribers.ToList<Subscriber>();
|
||||
var msg = String.Format("Hello async at {0}\n", DateTime.Now);
|
||||
subscribersCopy.ForEach(w => w.WriteAsync(msg));
|
||||
_timer.Start();
|
||||
}
|
||||
|
||||
|
||||
public Task Invoke(IOwinContext context)
|
||||
{
|
||||
SetEventHeaders(context);
|
||||
System.IO.Stream responseStream = context.Environment["owin.ResponseBody"] as Stream;
|
||||
var tcs = new TaskCompletionSource<bool>();
|
||||
var s = CreateSubscriber(responseStream, tcs);
|
||||
tcs.Task.ContinueWith(_ => _subscribers.Remove(s));
|
||||
Console.WriteLine("Add subscriber. Now have {0}", _subscribers.Count);
|
||||
s.WriteAsync("Registered\n");
|
||||
_timer.Start();
|
||||
return tcs.Task;
|
||||
}
|
||||
|
||||
private Subscriber CreateSubscriber(System.IO.Stream responseStream, TaskCompletionSource<bool> tcs)
|
||||
{
|
||||
var s = new Subscriber(responseStream, tcs);
|
||||
_subscribers.Add(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
private static void SetEventHeaders(IOwinContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/eventstream";
|
||||
context.Response.Headers["Transfer-Encoding"] = "chunked";
|
||||
context.Response.Headers["cache-control"] = "no-cache";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Owin.Hosting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Start OWIN host
|
||||
try
|
||||
{
|
||||
var url = "http://127.0.0.1:9000";
|
||||
WebApp.Start<OWIN.Startup>(url: url);
|
||||
Console.WriteLine("start webapp");
|
||||
Console.WriteLine(url);
|
||||
Console.ReadLine();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Projects
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public Nullable<int> pidx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public Nullable<bool> isdel { get; set; }
|
||||
public string category { get; set; }
|
||||
public string status { get; set; }
|
||||
public string asset { get; set; }
|
||||
public Nullable<int> level { get; set; }
|
||||
public Nullable<int> rev { get; set; }
|
||||
public string process { get; set; }
|
||||
public string part { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public string name { get; set; }
|
||||
public string userManager { get; set; }
|
||||
public string usermain { get; set; }
|
||||
public string usersub { get; set; }
|
||||
public string userhw2 { get; set; }
|
||||
public string reqstaff { get; set; }
|
||||
public Nullable<double> costo { get; set; }
|
||||
public Nullable<double> costn { get; set; }
|
||||
public Nullable<int> cnt { get; set; }
|
||||
public string remark_req { get; set; }
|
||||
public string remark_ans { get; set; }
|
||||
public string sdate { get; set; }
|
||||
public string ddate { get; set; }
|
||||
public string edate { get; set; }
|
||||
public string odate { get; set; }
|
||||
public Nullable<int> progress { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public string orderno { get; set; }
|
||||
public string crdue { get; set; }
|
||||
public Nullable<bool> import { get; set; }
|
||||
public string path { get; set; }
|
||||
public string userprocess { get; set; }
|
||||
public string CMP_Background { get; set; }
|
||||
public string CMP_Description { get; set; }
|
||||
public string CMP_Before { get; set; }
|
||||
public string CMP_After { get; set; }
|
||||
public Nullable<bool> bCost { get; set; }
|
||||
public Nullable<bool> bFanOut { get; set; }
|
||||
public string div { get; set; }
|
||||
public string EB_Site { get; set; }
|
||||
public string EB_Line { get; set; }
|
||||
public string EB_Team { get; set; }
|
||||
public string EB_Model { get; set; }
|
||||
public string EB_OutSourceName { get; set; }
|
||||
public Nullable<double> EB_RepairTime { get; set; }
|
||||
public Nullable<double> EB_ConstNew { get; set; }
|
||||
public string EB_BoardName { get; set; }
|
||||
public Nullable<bool> bAlert { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class ProjectsPart
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public Nullable<int> no { get; set; }
|
||||
public Nullable<int> Project { get; set; }
|
||||
public string ItemGroup { get; set; }
|
||||
public string ItemModel { get; set; }
|
||||
public string ItemUnit { get; set; }
|
||||
public string ItemName { get; set; }
|
||||
public string ItemSid { get; set; }
|
||||
public string ItemSupply { get; set; }
|
||||
public Nullable<int> ItemSupplyidx { get; set; }
|
||||
public string ItemManu { get; set; }
|
||||
public Nullable<int> Item { get; set; }
|
||||
public string option1 { get; set; }
|
||||
public string option2 { get; set; }
|
||||
public string option3 { get; set; }
|
||||
public Nullable<int> qty { get; set; }
|
||||
public Nullable<int> qtyn { get; set; }
|
||||
public Nullable<decimal> price { get; set; }
|
||||
public Nullable<decimal> amt { get; set; }
|
||||
public Nullable<decimal> amtn { get; set; }
|
||||
public Nullable<int> jago { get; set; }
|
||||
public string remark { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public Nullable<bool> import { get; set; }
|
||||
public string qtyjago { get; set; }
|
||||
public Nullable<int> qtybuy { get; set; }
|
||||
public Nullable<int> qtyin { get; set; }
|
||||
public Nullable<bool> bbuy { get; set; }
|
||||
public Nullable<bool> bconfirm { get; set; }
|
||||
public Nullable<bool> bCancel { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이러한 특성 값을 변경하세요.
|
||||
[assembly: AssemblyTitle("WebServer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WebServer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("cafe5cd0-c055-4c77-9253-8d5ee9558d43")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
59
SubProject/WebServer/Properties/Settings.Designer.cs
generated
59
SubProject/WebServer/Properties/Settings.Designer.cs
generated
@@ -1,59 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
// 런타임 버전:4.0.30319.42000
|
||||
//
|
||||
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
// 이러한 변경 내용이 손실됩니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("{\n \"basicGoods\": [\n {\n \"id\": \"1234561\",\n \"name\": \"Mineral Water 550" +
|
||||
"ml\",\n \"barcode\": \"12421432143214321\",\n \"price\": \"2.00\",\n \"num\": \"" +
|
||||
"1\",\n \"amount\": \"2.00\"\n },\n {\n \"id\": \"1234562\",\n \"name\": \"He" +
|
||||
"rbal tea 300ml\",\n \"barcode\": \"12421432143214322\",\n \"price\": \"3.00\",\n " +
|
||||
" \"num\": \"2\",\n \"amount\": \"6.00\"\n },\n {\n \"id\": \"1234563\",\n " +
|
||||
" \"name\": \"Delicious potato chips\",\n \"barcode\": \"12421432143214323\",\n \"" +
|
||||
"price\": \"7.00\",\n \"num\": \"4\",\n \"amount\": \"28.00\"\n },\n {\n \"id" +
|
||||
"\": \"1234564\",\n \"name\": \"Specially delicious egg rolls\",\n \"barcode\": \"1" +
|
||||
"2421432143214324\",\n \"price\": \"8.50\",\n \"num\": \"3\",\n \"amount\": \"25." +
|
||||
"50\"\n }\n ],\n \"basicProgress\": [\n {\n \"key\": \"1\",\n \"time\": \"2017-" +
|
||||
"10-01 14:10\",\n \"rate\": \"Contact Clients\",\n \"status\": \"Processing\",\n " +
|
||||
" \"operator\": \"Pickup Assistant ID1234\",\n \"cost\": \"5mins\"\n },\n {\n " +
|
||||
" \"key\": \"2\",\n \"time\": \"2017-10-01 14:05\",\n \"rate\": \"Pickup Guy Depar" +
|
||||
"ts\",\n \"status\": \"Success\",\n \"operator\": \"Pickup Assistant ID1234\",\n " +
|
||||
" \"cost\": \"1h\"\n },\n {\n \"key\": \"3\",\n \"time\": \"2017-10-01 13:05\"," +
|
||||
"\n \"rate\": \"Pick-up person takes orders\",\n \"status\": \"Success\",\n \"" +
|
||||
"operator\": \"Pickup Assistant ID1234\",\n \"cost\": \"5mins\"\n },\n {\n \"" +
|
||||
"key\": \"4\",\n \"time\": \"2017-10-01 13:00\",\n \"rate\": \"Apply For Approval\"," +
|
||||
"\n \"status\": \"Success\",\n \"operator\": \"system\",\n \"cost\": \"1h\"\n }" +
|
||||
",\n {\n \"key\": \"5\",\n \"time\": \"2017-10-01 12:00\",\n \"rate\": \"Initi" +
|
||||
"ated a Return Request\",\n \"status\": \"Success\",\n \"operator\": \"user\",\n " +
|
||||
" \"cost\": \"5mins\"\n }\n ]\n}")]
|
||||
public string json {
|
||||
get {
|
||||
return ((string)(this["json"]));
|
||||
}
|
||||
set {
|
||||
this["json"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WebServer.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="json" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">{
|
||||
"basicGoods": [
|
||||
{
|
||||
"id": "1234561",
|
||||
"name": "Mineral Water 550ml",
|
||||
"barcode": "12421432143214321",
|
||||
"price": "2.00",
|
||||
"num": "1",
|
||||
"amount": "2.00"
|
||||
},
|
||||
{
|
||||
"id": "1234562",
|
||||
"name": "Herbal tea 300ml",
|
||||
"barcode": "12421432143214322",
|
||||
"price": "3.00",
|
||||
"num": "2",
|
||||
"amount": "6.00"
|
||||
},
|
||||
{
|
||||
"id": "1234563",
|
||||
"name": "Delicious potato chips",
|
||||
"barcode": "12421432143214323",
|
||||
"price": "7.00",
|
||||
"num": "4",
|
||||
"amount": "28.00"
|
||||
},
|
||||
{
|
||||
"id": "1234564",
|
||||
"name": "Specially delicious egg rolls",
|
||||
"barcode": "12421432143214324",
|
||||
"price": "8.50",
|
||||
"num": "3",
|
||||
"amount": "25.50"
|
||||
}
|
||||
],
|
||||
"basicProgress": [
|
||||
{
|
||||
"key": "1",
|
||||
"time": "2017-10-01 14:10",
|
||||
"rate": "Contact Clients",
|
||||
"status": "Processing",
|
||||
"operator": "Pickup Assistant ID1234",
|
||||
"cost": "5mins"
|
||||
},
|
||||
{
|
||||
"key": "2",
|
||||
"time": "2017-10-01 14:05",
|
||||
"rate": "Pickup Guy Departs",
|
||||
"status": "Success",
|
||||
"operator": "Pickup Assistant ID1234",
|
||||
"cost": "1h"
|
||||
},
|
||||
{
|
||||
"key": "3",
|
||||
"time": "2017-10-01 13:05",
|
||||
"rate": "Pick-up person takes orders",
|
||||
"status": "Success",
|
||||
"operator": "Pickup Assistant ID1234",
|
||||
"cost": "5mins"
|
||||
},
|
||||
{
|
||||
"key": "4",
|
||||
"time": "2017-10-01 13:00",
|
||||
"rate": "Apply For Approval",
|
||||
"status": "Success",
|
||||
"operator": "system",
|
||||
"cost": "1h"
|
||||
},
|
||||
{
|
||||
"key": "5",
|
||||
"time": "2017-10-01 12:00",
|
||||
"rate": "Initiated a Return Request",
|
||||
"status": "Success",
|
||||
"operator": "user",
|
||||
"cost": "5mins"
|
||||
}
|
||||
]
|
||||
}</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -1,52 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Purchase
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public string state { get; set; }
|
||||
public string process { get; set; }
|
||||
public string receive { get; set; }
|
||||
public string sc { get; set; }
|
||||
public string request { get; set; }
|
||||
public string sid { get; set; }
|
||||
public string pumname { get; set; }
|
||||
public Nullable<int> pumidx { get; set; }
|
||||
public string pumscale { get; set; }
|
||||
public string pumunit { get; set; }
|
||||
public Nullable<int> pumqty { get; set; }
|
||||
public Nullable<decimal> pumprice { get; set; }
|
||||
public Nullable<decimal> pumamt { get; set; }
|
||||
public string supply { get; set; }
|
||||
public Nullable<int> supplyidx { get; set; }
|
||||
public string project { get; set; }
|
||||
public Nullable<int> projectidx { get; set; }
|
||||
public string asset { get; set; }
|
||||
public string manuproc { get; set; }
|
||||
public string edate { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string po { get; set; }
|
||||
public string dept { get; set; }
|
||||
public string bigo { get; set; }
|
||||
public Nullable<bool> import { get; set; }
|
||||
public Nullable<bool> isdel { get; set; }
|
||||
public string orderno { get; set; }
|
||||
public string place { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public Nullable<int> inqty { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class UserGroup
|
||||
{
|
||||
public string dept { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string path_kj { get; set; }
|
||||
public Nullable<bool> advpurchase { get; set; }
|
||||
public Nullable<int> permission { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Users
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string password { get; set; }
|
||||
public string nameE { get; set; }
|
||||
public string name { get; set; }
|
||||
public string dept { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string email { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string outdate { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string hp { get; set; }
|
||||
public string place { get; set; }
|
||||
public string ads_employNo { get; set; }
|
||||
public string ads_title { get; set; }
|
||||
public string ads_created { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public string processs { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,302 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CAFE5CD0-C055-4C77-9253-8D5EE9558D43}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>WebServer</RootNamespace>
|
||||
<AssemblyName>WebServer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\HtmlAgilityPack.CssSelectors.1.0.2\lib\net45\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack.CssSelectors, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\HtmlAgilityPack.CssSelectors.1.0.2\lib\net45\HtmlAgilityPack.CssSelectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=1.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.SignalR.Core.1.2.2\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.SignalR.Owin, Version=1.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.SignalR.Owin.1.2.2\lib\net45\Microsoft.AspNet.SignalR.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.4.2.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Cors, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.Cors.4.2.0\lib\net45\Microsoft.Owin.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Diagnostics, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.Diagnostics.4.2.0\lib\net45\Microsoft.Owin.Diagnostics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.FileSystems, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.FileSystems.4.2.0\lib\net45\Microsoft.Owin.FileSystems.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.2.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Hosting, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.Hosting.4.2.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.StaticFiles, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Owin.StaticFiles.4.2.0\lib\net45\Microsoft.Owin.StaticFiles.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.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>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Net.Http.Json.5.0.0\lib\net461\System.Net.Http.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Text.Encodings.Web.5.0.1\lib\net461\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Text.Json.5.0.2\lib\net461\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.Cors.5.0.0\lib\net45\System.Web.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Auth.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseController.cs" />
|
||||
<Compile Include="Common.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controller\UserController.cs" />
|
||||
<Compile Include="Controller\CustomerController.cs" />
|
||||
<Compile Include="Controller\CommonController.cs" />
|
||||
<Compile Include="Controller\APIController.cs" />
|
||||
<Compile Include="Controller\HomeController.cs" />
|
||||
<Compile Include="Controller\ItemController.cs" />
|
||||
<Compile Include="Controller\JobreportController.cs" />
|
||||
<Compile Include="Controller\ProjectController.cs" />
|
||||
<Compile Include="Controller\PurchaseController.cs" />
|
||||
<Compile Include="Controller\ResourceController.cs" />
|
||||
<Compile Include="Controller\ResultController.cs" />
|
||||
<Compile Include="Controller\SettingController.cs" />
|
||||
<Compile Include="Customs.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EETGW_GroupUser.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EETGW_ProjectsSchedule.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EETGW_Project_Layout.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HolidayLIst.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Holyday.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Items.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JobReport.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LineCode.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MailData.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MailForm.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MethodExtentions.cs" />
|
||||
<Compile Include="Model1.Context.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Model1.Context.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model1.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\PageModel.cs" />
|
||||
<Compile Include="OWIN\Startup.cs" />
|
||||
<Compile Include="OWIN\StartupSSE.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Projects.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectsPart.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Purchase.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserGroup.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Users.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vFindSID.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vGroupUser.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vJobReportForUser.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vPurchase.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<EntityDeploy Include="Model1.edmx">
|
||||
<Generator>EntityModelCodeGenerator</Generator>
|
||||
<LastGenOutput>Model1.Designer.cs</LastGenOutput>
|
||||
</EntityDeploy>
|
||||
<None Include="Model1.edmx.diagram">
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FCOMMON\FCOMMON.csproj">
|
||||
<Project>{304bd018-194b-47da-b4e0-f16df7b606da}</Project>
|
||||
<Name>FCOMMON</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Model1.Context.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>Model1.Context.cs</LastGenOutput>
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Model1.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
<LastGenOutput>Model1.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net47" />
|
||||
<package id="EntityFramework.ko" version="6.2.0" targetFramework="net47" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net47" />
|
||||
<package id="HtmlAgilityPack.CssSelectors" version="1.0.2" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.Cors" version="5.0.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.SignalR.Core" version="1.2.2" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.SignalR.Owin" version="1.2.2" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.7" targetFramework="net47" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.Cors" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.Diagnostics" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.FileSystems" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.Hosting" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.SelfHost" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.StaticFiles" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Owin.StaticFiles.ko" version="4.2.0" targetFramework="net47" />
|
||||
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net47" />
|
||||
<package id="Owin" version="1.0" targetFramework="net47" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net47" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Memory" version="4.5.4" targetFramework="net47" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net47" />
|
||||
<package id="System.Net.Http.Json" version="5.0.0" targetFramework="net47" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net47" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net47" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Text.Encodings.Web" version="5.0.1" targetFramework="net47" />
|
||||
<package id="System.Text.Json" version="5.0.2" targetFramework="net47" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net47" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net47" />
|
||||
</packages>
|
||||
@@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vFindSID
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string Location { get; set; }
|
||||
public string date { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string name { get; set; }
|
||||
public string sid { get; set; }
|
||||
public string model { get; set; }
|
||||
public string manu { get; set; }
|
||||
public string unit { get; set; }
|
||||
public string supply { get; set; }
|
||||
public Nullable<decimal> price { get; set; }
|
||||
public string remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vGroupUser
|
||||
{
|
||||
public string gcode { get; set; }
|
||||
public string dept { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string name { get; set; }
|
||||
public string nameE { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string email { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string outdate { get; set; }
|
||||
public string hp { get; set; }
|
||||
public string place { get; set; }
|
||||
public string ads_employNo { get; set; }
|
||||
public string ads_title { get; set; }
|
||||
public string ads_created { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string processs { get; set; }
|
||||
public string id { get; set; }
|
||||
public string state { get; set; }
|
||||
public Nullable<bool> useJobReport { get; set; }
|
||||
public Nullable<bool> useUserState { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vJobReportForUser
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string process { get; set; }
|
||||
public string type { get; set; }
|
||||
public string svalue { get; set; }
|
||||
public Nullable<double> hrs { get; set; }
|
||||
public Nullable<double> ot { get; set; }
|
||||
public string requestpart { get; set; }
|
||||
public string package { get; set; }
|
||||
public string userProcess { get; set; }
|
||||
public string status { get; set; }
|
||||
public string projectName { get; set; }
|
||||
public string description { get; set; }
|
||||
public string ww { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebServer
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vPurchase
|
||||
{
|
||||
public string name { get; set; }
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public string state { get; set; }
|
||||
public string process { get; set; }
|
||||
public string receive { get; set; }
|
||||
public string sc { get; set; }
|
||||
public string request { get; set; }
|
||||
public string sid { get; set; }
|
||||
public string pumname { get; set; }
|
||||
public Nullable<int> pumidx { get; set; }
|
||||
public string pumscale { get; set; }
|
||||
public string pumunit { get; set; }
|
||||
public Nullable<int> pumqty { get; set; }
|
||||
public Nullable<decimal> pumprice { get; set; }
|
||||
public Nullable<decimal> pumamt { get; set; }
|
||||
public string supply { get; set; }
|
||||
public Nullable<int> supplyidx { get; set; }
|
||||
public string project { get; set; }
|
||||
public Nullable<int> projectidx { get; set; }
|
||||
public string asset { get; set; }
|
||||
public string manuproc { get; set; }
|
||||
public string edate { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string po { get; set; }
|
||||
public string dept { get; set; }
|
||||
public string bigo { get; set; }
|
||||
public Nullable<bool> import { get; set; }
|
||||
public Nullable<bool> isdel { get; set; }
|
||||
public string orderno { get; set; }
|
||||
public string place { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public Nullable<int> inqty { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user