This commit is contained in:
chi
2023-12-19 11:49:57 +09:00
parent 4334725900
commit 6e925857b3
18 changed files with 1881 additions and 268 deletions

View File

@@ -172,12 +172,24 @@
<Compile Include="Equipment\rpt_equipmentAll.Designer.cs">
<DependentUpon>rpt_equipmentAll.cs</DependentUpon>
</Compile>
<Compile Include="fColumnFilter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fColumnFilter.Designer.cs">
<DependentUpon>fColumnFilter.cs</DependentUpon>
</Compile>
<Compile Include="fItemin.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fItemin.Designer.cs">
<DependentUpon>fItemin.cs</DependentUpon>
</Compile>
<Compile Include="fUserExportColumn.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fUserExportColumn.Designer.cs">
<DependentUpon>fUserExportColumn.cs</DependentUpon>
</Compile>
<Compile Include="MethodExtentions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -341,9 +353,15 @@
<EmbeddedResource Include="Equipment\rpt_equipmentAll.resx">
<DependentUpon>rpt_equipmentAll.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fColumnFilter.resx">
<DependentUpon>fColumnFilter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fItemin.resx">
<DependentUpon>fItemin.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fUserExportColumn.resx">
<DependentUpon>fUserExportColumn.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>

View File

@@ -20,15 +20,30 @@ namespace FEQ0000.Purchase
Properties.Settings.Default["EEEntities"] = FCOMMON.info.CS;
Cate = cate;
}
public fMailForm(string subject, string body, string to, string cc, string bcc)
{
InitializeComponent();
Properties.Settings.Default["gwcs"] = FCOMMON.info.CS;
Properties.Settings.Default["EEEntities"] = FCOMMON.info.CS;
Cate = "";
this.tbSubject.Text = subject;
this.tbTo.Text = to;
this.tbCC.Text = cc;
this.tbBcc.Text = bcc;
htmlEditor1.Html = body;
}
private void fMailForm_Load(object sender, EventArgs e)
{
var db = new DataClasses1DataContext();
var mailform = db.MailForm.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.cate == Cate).ToList();
this.cmbForm.DataSource = mailform;
this.cmbForm.DisplayMember = "title";
this.cmbForm.ValueMember = "idx";
if (Cate.isEmpty() == false)
{
var db = new DataClasses1DataContext();
var mailform = db.MailForm.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.cate == Cate).ToList();
this.cmbForm.DataSource = mailform;
this.cmbForm.DisplayMember = "title";
this.cmbForm.ValueMember = "idx";
}
else this.cmbForm.Enabled = false;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
@@ -43,6 +58,7 @@ namespace FEQ0000.Purchase
private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}

View File

@@ -147,9 +147,10 @@
this.btViewDel = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.dsPurchase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
@@ -487,6 +488,7 @@
this.columnSizeToolStripMenuItem,
this.toolStripMenuItem3,
this.exportDataToolStripMenuItem,
this.ToolStripMenuItem,
this.toolStripMenuItem4,
this.ToolStripMenuItem,
this.ToolStripMenuItem,
@@ -498,7 +500,7 @@
this.sC검색ToolStripMenuItem,
this.cRCF검색ToolStripMenuItem});
this.cm1.Name = "contextMenuStrip1";
this.cm1.Size = new System.Drawing.Size(314, 442);
this.cm1.Size = new System.Drawing.Size(314, 506);
this.cm1.Opening += new System.ComponentModel.CancelEventHandler(this.cm1_Opening);
//
// columnSizeToolStripMenuItem
@@ -854,30 +856,6 @@
this.fpSpread1.TabIndex = 4;
this.fpSpread1.EditModeOff += new System.EventHandler(this.fpSpread1_EditModeOff);
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label1.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label1.Location = new System.Drawing.Point(0, 639);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label1.Size = new System.Drawing.Size(1334, 23);
this.label1.TabIndex = 6;
this.label1.Text = "--";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label2.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label2.Location = new System.Drawing.Point(0, 616);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label2.Size = new System.Drawing.Size(1334, 23);
this.label2.TabIndex = 7;
this.label2.Text = "--";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// fpSpread1_Sheet1
//
this.fpSpread1_Sheet1.Reset();
@@ -1220,6 +1198,37 @@
this.fpSpread1_Sheet1.ShowRowSelector = true;
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label1.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label1.Location = new System.Drawing.Point(0, 639);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label1.Size = new System.Drawing.Size(1334, 23);
this.label1.TabIndex = 6;
this.label1.Text = "--";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label2.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label2.Location = new System.Drawing.Point(0, 616);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.label2.Size = new System.Drawing.Size(1334, 23);
this.label2.TabIndex = 7;
this.label2.Text = "--";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// 사용자내보내기ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "사용자내보내기ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(313, 42);
this.ToolStripMenuItem.Text = "사용자 내보내기";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// fPurchaseNR
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -1334,5 +1343,6 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
}
}

View File

@@ -15,6 +15,8 @@ using FEQ0000.Purchase;
using FCOMMON;
using NetOffice.OfficeApi;
using System.Web.Services.Protocols;
using System.Diagnostics;
using FarPoint.Win.Spread.CellType;
namespace FEQ0000
{
@@ -1475,5 +1477,23 @@ namespace FEQ0000
ToolStripMenuItem.Enabled = IsAdmin;
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
var cnt = this.fpSpread1_Sheet1.Columns.Count;
Dictionary<string, string> cols = new Dictionary<string, string>();
foreach(FarPoint.Win.Spread.Column col in fpSpread1_Sheet1.Columns)
{
if (col.Visible == false || col.Width < 10) continue;
if (col.CellType is CheckBoxCellType) continue;
var field = col.DataField;
var label = col.Label;
cols.Add(field, col.Label);
}
var f = new fUserExportColumn(this.Name, cols,this.dsPurchase.Purchase,this.bs.Filter);
f.ShowDialog();
}
}
}

View File

@@ -459,6 +459,7 @@
this.tbSID.Name = "tbSID";
this.tbSID.Size = new System.Drawing.Size(179, 34);
this.tbSID.TabIndex = 26;
this.tbSID.TextChanged += new System.EventHandler(this.tbSID_TextChanged);
//
// tbPumName
//

View File

@@ -1365,5 +1365,14 @@ namespace FEQ0000
{
this.dtPrdate.Enabled = chkprdate.Checked;
}
private void tbSID_TextChanged(object sender, EventArgs e)
{
var tb = sender as TextBox;
var bgcolor = tb.Text == "신규" ? Color.Yellow : Color.Gainsboro;
btEQManu.BackColor = bgcolor;
btEQModel.BackColor = bgcolor;
btManuProc.BackColor = bgcolor;
}
}
}

View File

@@ -0,0 +1,145 @@
namespace FEQ0000
{
partial class fColumnFilter
{
/// <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.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.button1.Location = new System.Drawing.Point(0, 109);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(353, 47);
this.button1.TabIndex = 0;
this.button1.Text = "변경 합니다";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(353, 28);
this.label1.TabIndex = 1;
this.label1.Text = "label1";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("굴림", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.textBox1.Location = new System.Drawing.Point(115, 41);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(226, 30);
this.textBox1.TabIndex = 2;
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("굴림", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.checkBox1.Location = new System.Drawing.Point(200, 81);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(15, 14);
this.checkBox1.TabIndex = 3;
this.checkBox1.UseVisualStyleBackColor = true;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("굴림", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"=",
"<>"});
this.comboBox1.Location = new System.Drawing.Point(9, 41);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(100, 28);
this.comboBox1.TabIndex = 4;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 82);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(181, 12);
this.label2.TabIndex = 5;
this.label2.Text = "위 조건에 맞는 데이터의 선택을 ";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label3.Location = new System.Drawing.Point(221, 82);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 6;
this.label3.Text = "상태로";
//
// fColumnFilter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(353, 156);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "fColumnFilter";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "fColumnFilter";
this.Load += new System.EventHandler(this.fColumnFilter_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox textBox1;
public System.Windows.Forms.CheckBox checkBox1;
public System.Windows.Forms.ComboBox comboBox1;
}
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FEQ0000
{
public partial class fColumnFilter : Form
{
public fColumnFilter(string col)
{
InitializeComponent();
this.label1.Text = $"{col} 열의 값에 대한 필터를 적용 합니다";
}
private void fColumnFilter_Load(object sender, EventArgs e)
{
comboBox1.SelectedIndex = 0;
this.Show();
textBox1.ImeMode = ImeMode.Hangul;
textBox1.Focus();
textBox1.SelectAll();
}
private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
}

View File

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

View File

@@ -0,0 +1,266 @@
namespace FEQ0000
{
partial class fUserExportColumn
{
/// <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();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fUserExportColumn));
this.listView1 = new System.Windows.Forms.ListView();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.listView2 = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.button3 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
this.button4 = new System.Windows.Forms.Button();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
this.panel1.SuspendLayout();
this.toolStrip2.SuspendLayout();
this.SuspendLayout();
//
// listView1
//
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(230, 25);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(860, 593);
this.listView1.TabIndex = 1;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripButton2,
this.toolStripButton3});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1090, 25);
this.toolStrip1.TabIndex = 2;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(63, 22);
this.toolStripButton1.Text = "refresh";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// toolStripButton2
//
this.toolStripButton2.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(96, 22);
this.toolStripButton2.Text = "save to excel";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
// toolStripButton3
//
this.toolStripButton3.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(110, 22);
this.toolStripButton3.Text = "save to outlook";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
//
// button1
//
this.button1.Dock = System.Windows.Forms.DockStyle.Top;
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(89, 70);
this.button1.TabIndex = 3;
this.button1.Text = "up";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Dock = System.Windows.Forms.DockStyle.Top;
this.button2.Location = new System.Drawing.Point(0, 70);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(89, 70);
this.button2.TabIndex = 3;
this.button2.Text = "down";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// listView2
//
this.listView2.CheckBoxes = true;
this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1});
this.listView2.Dock = System.Windows.Forms.DockStyle.Left;
this.listView2.HideSelection = false;
this.listView2.Location = new System.Drawing.Point(0, 25);
this.listView2.Name = "listView2";
this.listView2.Size = new System.Drawing.Size(141, 618);
this.listView2.TabIndex = 5;
this.listView2.UseCompatibleStateImageBehavior = false;
this.listView2.View = System.Windows.Forms.View.Details;
//
// columnHeader1
//
this.columnHeader1.Width = 122;
//
// button3
//
this.button3.Dock = System.Windows.Forms.DockStyle.Bottom;
this.button3.Location = new System.Drawing.Point(0, 548);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(89, 70);
this.button3.TabIndex = 6;
this.button3.Text = "prewview";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// panel1
//
this.panel1.Controls.Add(this.button4);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(141, 25);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(89, 618);
this.panel1.TabIndex = 7;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// toolStrip2
//
this.toolStrip2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton4,
this.toolStripButton5,
this.toolStripButton6});
this.toolStrip2.Location = new System.Drawing.Point(230, 618);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Size = new System.Drawing.Size(860, 25);
this.toolStrip2.TabIndex = 8;
this.toolStrip2.Text = "toolStrip2";
//
// toolStripButton4
//
this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image")));
this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton4.Name = "toolStripButton4";
this.toolStripButton4.Size = new System.Drawing.Size(75, 22);
this.toolStripButton4.Text = "전체선택";
this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click);
//
// toolStripButton5
//
this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image")));
this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton5.Name = "toolStripButton5";
this.toolStripButton5.Size = new System.Drawing.Size(75, 22);
this.toolStripButton5.Text = "선택반전";
this.toolStripButton5.Click += new System.EventHandler(this.toolStripButton5_Click);
//
// toolStripButton6
//
this.toolStripButton6.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton6.Image")));
this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton6.Name = "toolStripButton6";
this.toolStripButton6.Size = new System.Drawing.Size(75, 22);
this.toolStripButton6.Text = "선택해제";
this.toolStripButton6.Click += new System.EventHandler(this.toolStripButton6_Click);
//
// button4
//
this.button4.Dock = System.Windows.Forms.DockStyle.Top;
this.button4.Location = new System.Drawing.Point(0, 140);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(89, 70);
this.button4.TabIndex = 7;
this.button4.Text = "Filter";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// fUserExportColumn
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1090, 643);
this.Controls.Add(this.listView1);
this.Controls.Add(this.toolStrip2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.listView2);
this.Controls.Add(this.toolStrip1);
this.Name = "fUserExportColumn";
this.Text = "fUserExportColumn";
this.Load += new System.EventHandler(this.fUserExportColumn_Load);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
this.panel1.ResumeLayout(false);
this.toolStrip2.ResumeLayout(false);
this.toolStrip2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.BindingSource bs;
private System.Windows.Forms.ListView listView2;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.ToolStripButton toolStripButton2;
private System.Windows.Forms.ToolStripButton toolStripButton3;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolStrip toolStrip2;
private System.Windows.Forms.ToolStripButton toolStripButton4;
private System.Windows.Forms.ToolStripButton toolStripButton5;
private System.Windows.Forms.ToolStripButton toolStripButton6;
private System.Windows.Forms.Button button4;
}
}

View File

@@ -0,0 +1,530 @@
using arUtil;
using FarPoint.Win.Spread;
using FCOMMON;
using GrapeCity.CalcEngine;
using Microsoft.Reporting.Map.WebForms.BingMaps;
using NetOffice;
using Outlook = NetOffice.OutlookApi;
using NetOffice.OutlookApi.Enums;
using NetOffice.OfficeApi;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using libxl;
using FarPoint.Excel;
namespace FEQ0000
{
public partial class fUserExportColumn : Form
{
string presavefn = "";
//this.Name, cols,this.dsPurchase.Purchase,this.bs.Filter
string Source = "";
dsPurchase.PurchaseDataTable dt;
public fUserExportColumn(string source, Dictionary<string, string> cols, DataTable dt_, string filter)
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
presavefn = Util.MakeFilePath("exportsetting", source);
var prelists = "";
if (System.IO.File.Exists(presavefn)) prelists = System.IO.File.ReadAllText(presavefn, System.Text.Encoding.Default);
// Dictionary<int, string> preitems = new Dictionary<int, string>();
this.listView2.Items.Clear();
this.listView1.FullRowSelect = true;
this.listView1.CheckBoxes = true;
Source = source;
dt = new dsPurchase.PurchaseDataTable();
this.dt.Merge(dt_);
this.bs.DataSource = dt;
this.bs.Filter = filter;
if (prelists.Length > 0)
{
var itemsbu = prelists.Split('\n');
foreach (var item in prelists.Split('\n'))
{
if (item.isEmpty()) continue;
var items = item.Split('|');
var chk = items[0] == "1";
var field = items[1];
var title = items[2].Replace("\r", "");
var lv = listView2.Items.Add(title);
lv.Tag = field;
lv.Checked = chk;
}
}
else
{
foreach (var item in cols)
{
var title = item.Value.Replace("\n", "").Replace("\r", "");
var lv = listView2.Items.Add(title);
lv.Tag = item.Key;
}
}
listView2.FullRowSelect = true;
listView2.HideSelection = false;
listView2.GridLines = true;
listView2.MultiSelect = false;
}
private void button1_Click(object sender, EventArgs e)
{
// 선택된 아이템이 있고, 그것이 첫 번째 아이템이 아닌 경우에만 실행합니다.
if (listView2.FocusedItem.Index > 0)
{
int currentIndex = listView2.FocusedItem.Index;
ListViewItem currentItem = listView2.FocusedItem;
// 이전 아이템과 위치를 바꿉니다.
listView2.Items.RemoveAt(currentIndex);
listView2.Items.Insert(currentIndex - 1, currentItem);
// 위로 올리는 동작을 시각적으로 보여주기 위해 선택된 아이템을 변경합니다.
currentItem.Selected = true;
currentItem.Focused = true;
}
}
private void button2_Click(object sender, EventArgs e)
{
if (listView2.FocusedItem.Index < listView2.Items.Count - 1)
{
int currentIndex = listView2.FocusedItem.Index;
ListViewItem currentItem = listView2.FocusedItem;
// 다음 아이템과 위치를 바꿉니다.
listView2.Items.RemoveAt(currentIndex);
listView2.Items.Insert(currentIndex + 1, currentItem);
// 아래로 내리는 동작을 시각적으로 보여주기 위해 선택된 아이템을 변경합니다.
currentItem.Selected = true;
currentItem.Focused = true;
}
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
}
private void fUserExportColumn_Load(object sender, EventArgs e)
{
button3.PerformClick();
}
private void button3_Click(object sender, EventArgs e)
{
//rprewviwe
var items = this.listView2.CheckedItems;
SortedDictionary<int, string> cols = new SortedDictionary<int, string>();
var sb = new System.Text.StringBuilder();
foreach (ListViewItem lv in items)
{
var no = lv.Index;
var field = lv.SubItems[0].Text + "|" + lv.Tag.ToString();
cols.Add(no, field);
}
foreach (ListViewItem lv in listView2.Items)
{
sb.AppendLine($"{(lv.Checked ? "1" : "0")}|{lv.Tag}|{lv.SubItems[0].Text}");
}
var fi = new System.IO.FileInfo(presavefn);
if (fi.Directory.Exists == false) fi.Directory.Create();
System.IO.File.WriteAllText(fi.FullName, sb.ToString(), System.Text.Encoding.Default);
listView1.Clear();
listView1.Columns.Add("No");
foreach (var item in cols)
{
var titles = item.Value.Split('|');
listView1.Columns.Add(titles[0],titles[0]);
}
for (int i = 0; i < bs.Count; i++)
{
var drv = bs[i] as DataRowView;
var no = this.listView1.Items.Count + 1;
var lv = this.listView1.Items.Add(no.ToString());
lv.Checked = true;
lv.Tag = string.Empty;
var colno = -1;
foreach (var item in cols)
{
colno += 1;
var titles = item.Value.Split('|');
var field = titles[1];
var title = titles[0];
var val = drv[field];
var dr = drv.Row;
var coldata = dr.Table.Columns[field];
if (coldata.DataType == typeof(int))
{
if (val == null) lv.SubItems.Add("--");
else lv.SubItems.Add(((int)val).ToString("N0"));
lv.Tag += "," + (colno+1).ToString();
}
else if (coldata.DataType == typeof(decimal))
{
if (val == null) lv.SubItems.Add("--");
else lv.SubItems.Add(((decimal)val).ToString("N0"));
lv.Tag += "," + (colno + 1).ToString();
}
else
{
if (val == null) lv.SubItems.Add("");
else lv.SubItems.Add(val.ToString());
}
}
}
}
List<string> ChangeMailAddress(List<string> userid)
{
var db = new DataClasses1DataContext();
List<string> retval = new List<string>();
foreach (var id in userid)
{
UInt32 userno;
if (UInt32.TryParse(id, out userno) == true)
{
var user = db.Users.Where(t => t.id == id).FirstOrDefault();
if (user != null)
{
var data = string.Format("{0}<{1}>", user.name, user.email);
if (retval.Contains(data) == false)
retval.Add(data);
}
}
else
{
if (retval.Contains(id) == false)
retval.Add(id);
}
}
return retval;
}
void save(string fn = "")
{
if (fn.isEmpty()) fn = (Util.MakeFilePath("temp", DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".xlsx"));
var fi = new System.IO.FileInfo(fn);
if (fi.Directory.Exists == false) fi.Directory.Create();
libxl.Book book;// = new libxl.BinBook();
book = new libxl.XmlBook();
book.setKey(FCOMMON.info.libxlCompany, FCOMMON.info.libxlKey);
var sheet = book.addSheet("data");
var colno = 0;
var rowno = 0;
for (int i = 0; i < this.listView1.Columns.Count; i++)
{
var col = this.listView1.Columns[i];
sheet.writeStr(rowno, i, col.Text);
}
foreach (ListViewItem lv in this.listView1.CheckedItems)
{
rowno += 1;
var tagstr = lv.Tag?.ToString() ?? string.Empty;
var numcols = tagstr.Split(',');
for (int i = 0; i < this.listView1.Columns.Count; i++)
{
var data = lv.SubItems[i].Text;
if (i == 0) data = rowno.ToString();
if (numcols.Contains(i.ToString()))
sheet.writeNum(rowno, i, double.Parse(data));
else
sheet.writeStr(rowno, i, data);
}
}
//sheet.siz
book.save(fi.FullName);
}
private void toolStripButton3_Click(object sender, EventArgs e)
{
//데이터수집
if(listView1.CheckedItems.Count < 1)
{
Util.MsgE("선택된 대상이 없습니다");
return;
}
//현재표시데이터중에 수신자목록을 가져온다
var drows = (dsPurchase.PurchaseRow[])(this.dt.Select(this.bs.Filter, this.bs.Sort));
var grp_req = drows.Where(t => t.request.isEmpty() == false).GroupBy(t => t.request).Select(t => t.FirstOrDefault().request).ToList();
var grp_rec = drows.Where(t => t.receive.isEmpty() == false).GroupBy(t => t.receive).Select(t => t.FirstOrDefault().receive).ToList();
List<string> tolist = new List<string>(); //최종받는사람
List<string> cclist = new List<string>();
List<string> bcclist = new List<string>();
var fn = new System.IO.FileInfo(Util.MakeFilePath("mailform", this.Source + ".xml"));
if (fn.Directory.Exists == false) fn.Directory.Create();
var xml = new XMLHelper(fn.FullName);
string form_subject, form_body, form_to, form_cc, form_bcc;
form_subject = form_body = form_to = form_cc = form_bcc = "";
form_subject = xml.get_Data("subject");
form_body = xml.get_Data("body");
form_to = xml.get_Data("to");
form_cc = xml.get_Data("cc");
if (form_cc.isEmpty()) form_cc = "{요청}";
form_bcc = xml.get_Data("bcc");
var f = new Purchase.fMailForm(form_subject, form_body, form_to, form_cc, form_bcc);
if (f.ShowDialog() != DialogResult.OK) return;
//받는사람
if (form_to.Contains("{요청}") == true) tolist.AddRange(grp_req);
if (form_to.Contains("{수령}") == true) tolist.AddRange(grp_rec);
form_to = form_to.Replace("{요청}", "");
form_to = form_to.Replace("{수령}", "");
tolist.AddRange(form_to.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
tolist = ChangeMailAddress(tolist);
//참조
if (form_cc.Contains("{요청}") == true) cclist.AddRange(grp_req);
if (form_cc.Contains("{수령}") == true) cclist.AddRange(grp_rec);
form_cc = form_cc.Replace("{요청}", "");
form_cc = form_cc.Replace("{수령}", "");
cclist.AddRange(form_cc.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
cclist = ChangeMailAddress(cclist);
//숨은참조
if (form_bcc.Contains("{요청}") == true) bcclist.AddRange(grp_req);
if (form_bcc.Contains("{수령}") == true) bcclist.AddRange(grp_rec);
form_bcc = form_bcc.Replace("{요청}", "");
form_bcc = form_bcc.Replace("{수령}", "");
bcclist.AddRange(form_bcc.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
bcclist = ChangeMailAddress(bcclist);
form_subject = f.tbSubject.Text.Trim();
form_body = f.htmlEditor1.Html;
form_to = f.tbTo.Text.Trim();
form_cc = f.tbCC.Text.Trim();
form_bcc = f.tbBcc.Text.Trim();
xml.set_Data("subject", form_subject);
xml.set_Data("body", form_body);
xml.set_Data("to", form_to);
xml.set_Data("cc", form_cc);
xml.set_Data("bcc", form_bcc);
xml.Save();
//받는사람
if (form_to.Contains("{요청}") == true) tolist.AddRange(grp_req);
if (form_to.Contains("{수령}") == true) tolist.AddRange(grp_rec);
form_to = form_to.Replace("{요청}", "");
form_to = form_to.Replace("{수령}", "");
tolist.AddRange(form_to.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
tolist = ChangeMailAddress(tolist);
//참조
if (form_cc.Contains("{요청}") == true) cclist.AddRange(grp_req);
if (form_cc.Contains("{수령}") == true) cclist.AddRange(grp_rec);
form_cc = form_cc.Replace("{요청}", "");
form_cc = form_cc.Replace("{수령}", "");
cclist.AddRange(form_cc.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
cclist = ChangeMailAddress(cclist);
//숨은참조
if (form_bcc.Contains("{요청}") == true) bcclist.AddRange(grp_req);
if (form_bcc.Contains("{수령}") == true) bcclist.AddRange(grp_rec);
form_bcc = form_bcc.Replace("{요청}", "");
form_bcc = form_bcc.Replace("{수령}", "");
bcclist.AddRange(form_bcc.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
bcclist = ChangeMailAddress(bcclist);
//form_subject = form_subject.Replace("{DATE}", datestr);
try
{
Outlook.Application outlookApplication = new Outlook.Application();
var newMail = outlookApplication.CreateItem(OlItemType.olMailItem) as Outlook.MailItem;
newMail.Display();
newMail.Subject = form_subject; // this.tbSubject.Text.Trim(); // dr.title;
newMail.To = string.Join(";", tolist.ToArray());
newMail.CC = string.Join(";", cclist.ToArray());
newMail.BCC = string.Join(";", bcclist.ToArray());
if (f.chkAttach.Checked)
{
var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + "\\Export\\Purchase_" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".xls");
if (fi.Directory.Exists == false) fi.Directory.Create();
///save file
save(fi.FullName);
newMail.Attachments.Add(fi.FullName);
}
if (f.chkList.Checked)
{
//목록을 본문에 추가한다
System.Text.StringBuilder sb = new StringBuilder();
sb.AppendLine("<table border='1' cellspacing='0' cellpadding='1'>");
sb.AppendLine("<thead>");
for (int i = 0; i < this.listView1.Columns.Count; i++)
{
var col = this.listView1.Columns[i];
sb.AppendLine($"<td style='text-align:center;background-color: aqua;'>{col.Text}</td>");
}
sb.AppendLine("</thead>");
sb.AppendLine("<tbody>");
var row = 1;
foreach (ListViewItem lv in this.listView1.CheckedItems)
{
sb.AppendLine("<tr>");
for (int i = 0; i < this.listView1.Columns.Count; i++)
{
var data = lv.SubItems[i].Text;
var txt = i == 0 ? (row).ToString() : data;
sb.AppendLine($"<td>{txt}</td>");
}
sb.AppendLine("</tr>");
row += 1;
}
sb.AppendLine("</tbody>");
sb.AppendLine("</table>");
form_body += sb.ToString();
}
//newMail.BodyFormat = OlBodyFormat.olFormatHTML;
//form_body = form_body.Replace("{DATE}", datestr);
newMail.HTMLBody = form_body + newMail.HTMLBody; //
}
catch (System.Exception ex)
{
Util.MsgE("전송실패\n\n" + ex.Message + "\n\n" +
"아웃룩의 설정이 정상인지 확인하세요");
}
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
if (listView1.CheckedItems.Count < 1)
{
Util.MsgE("선택된 대상이 없습니다");
return;
}
var sd = new SaveFileDialog();
sd.Filter = "xlsx|*.xlsx";
if (sd.ShowDialog() != DialogResult.OK) return;
save(sd.FileName);
Util.RunExplorer(sd.FileName);
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void toolStripButton4_Click(object sender, EventArgs e)
{
foreach (ListViewItem lv in this.listView1.Items)
lv.Checked = true;
}
private void toolStripButton5_Click(object sender, EventArgs e)
{
foreach (ListViewItem lv in this.listView1.Items)
lv.Checked = !lv.Checked;
}
private void toolStripButton6_Click(object sender, EventArgs e)
{
foreach (ListViewItem lv in this.listView1.Items)
lv.Checked = false;
}
private void button4_Click(object sender, EventArgs e)
{
var lv = this.listView2.FocusedItem;
if (lv == null)
{
Util.MsgE("필터를 적용할 컬럼을 좌측에서 선택하세요");
return;
}
if(lv.Checked ==false)
{
Util.MsgE("선택된 열이 아닙니다. 필터는 선택된 열만 가능합니다");
return;
}
var f = new fColumnFilter(lv.SubItems[0].Text);
if (f.ShowDialog() != DialogResult.OK) return;
var = f.comboBox1.Text;
var = f.textBox1.Text;
var = f.checkBox1.Checked;
var col = listView1.Columns[lv.SubItems[0].Text];
foreach(ListViewItem item in this.listView1.Items)
{
var curvalue = item.SubItems[col.Index].Text;
if(curvalue.Equals())
{
item.Checked = ;
item.ForeColor = ? System.Drawing.Color.Blue : System.Drawing.Color.DimGray;
}
}
}
}
}

View File

@@ -0,0 +1,220 @@
<?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="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>123, 17</value>
</metadata>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>187, 17</value>
</metadata>
<data name="toolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
</root>