장비목록에서 엑셀 가져올때 오류 처리 작업

장비목록 디비 기록시 팝업 창 추가
장비목록에서 날짜를 역정렬 하도록 수정
This commit is contained in:
chikyun.kim
2018-09-17 16:39:34 +09:00
parent 650ec72616
commit c209a974c0
9 changed files with 252 additions and 149 deletions

View File

@@ -1 +1,2 @@
180624 chi setting 의 경로를 applicationdata 적용 되도록 수정
180917 chi
180624 chi setting 의 경로를 applicationdata 적용 되도록 수정

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("18.06.24.1600")]
[assembly: AssemblyFileVersion("18.06.24.1600")]
[assembly: AssemblyVersion("18.09.17.1600")]
[assembly: AssemblyFileVersion("18.09.17.1600")]

View File

@@ -6594,11 +6594,11 @@ namespace FEQ0000 {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string code {
get {
try {
return ((string)(this[this.tableLineCode.codeColumn]));
if (this.IscodeNull()) {
return string.Empty;
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("\'LineCode\' 테이블의 \'code\' 열의 값이 DBNull입니다.", e);
else {
return ((string)(this[this.tableLineCode.codeColumn]));
}
}
set {
@@ -6610,11 +6610,11 @@ namespace FEQ0000 {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string team {
get {
try {
return ((string)(this[this.tableLineCode.teamColumn]));
if (this.IsteamNull()) {
return string.Empty;
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("\'LineCode\' 테이블의 \'team\' 열의 값이 DBNull입니다.", e);
else {
return ((string)(this[this.tableLineCode.teamColumn]));
}
}
set {
@@ -6626,11 +6626,11 @@ namespace FEQ0000 {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string part {
get {
try {
return ((string)(this[this.tableLineCode.partColumn]));
if (this.IspartNull()) {
return string.Empty;
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("\'LineCode\' 테이블의 \'part\' 열의 값이 DBNull입니다.", e);
else {
return ((string)(this[this.tableLineCode.partColumn]));
}
}
set {
@@ -6642,11 +6642,11 @@ namespace FEQ0000 {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool except {
get {
try {
return ((bool)(this[this.tableLineCode.exceptColumn]));
if (this.IsexceptNull()) {
return false;
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("\'LineCode\' 테이블의 \'except\' 열의 값이 DBNull입니다.", e);
else {
return ((bool)(this[this.tableLineCode.exceptColumn]));
}
}
set {
@@ -6658,11 +6658,11 @@ namespace FEQ0000 {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string memo {
get {
try {
return ((string)(this[this.tableLineCode.memoColumn]));
if (this.IsmemoNull()) {
return string.Empty;
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("\'LineCode\' 테이블의 \'memo\' 열의 값이 DBNull입니다.", e);
else {
return ((string)(this[this.tableLineCode.memoColumn]));
}
}
set {
@@ -7207,15 +7207,15 @@ namespace FEQ0000.dsEQTableAdapters {
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
this._commandCollection[1].CommandText = "SELECT pdate FROM EquipmentB GROUP BY pdate ORDER BY pdate";
this._commandCollection[1].CommandText = "SELECT pdate\r\nFROM EquipmentB\r\nGROUP BY pdate\r\nORDER BY pdate DESC";
this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "SELECT pdate\r\nFROM EquipmentF\r\nGROUP BY pdate\r\norder by pdate";
this._commandCollection[2].CommandText = "SELECT pdate\r\nFROM EquipmentF\r\nGROUP BY pdate\r\nORDER BY pdate DESC";
this._commandCollection[2].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[3].Connection = this.Connection;
this._commandCollection[3].CommandText = "SELECT pdate\r\nFROM EquipmentME\r\nGROUP BY pdate\r\norder by pdate";
this._commandCollection[3].CommandText = "SELECT pdate\r\nFROM EquipmentME\r\nGROUP BY pdate\r\nORDER BY pdate DESC";
this._commandCollection[3].CommandType = global::System.Data.CommandType.Text;
}

View File

@@ -34,30 +34,33 @@ GROUP BY pdate</CommandText>
<Sources>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.EquipmentB" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetDateListB" GetMethodModifier="Public" GetMethodName="GetDateListB" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDateListB" UserSourceName="GetDateListB">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT pdate FROM EquipmentB GROUP BY pdate ORDER BY pdate</CommandText>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT pdate
FROM EquipmentB
GROUP BY pdate
ORDER BY pdate DESC</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.EquipmentF" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetDateListF" GetMethodModifier="Public" GetMethodName="GetDateListF" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDateListF" UserSourceName="GetDateListF">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT pdate
FROM EquipmentF
GROUP BY pdate
order by pdate</CommandText>
ORDER BY pdate DESC</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.EquipmentME" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetDateListME" GetMethodModifier="Public" GetMethodName="GetDateListME" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDateListME" UserSourceName="GetDateListME">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT pdate
FROM EquipmentME
GROUP BY pdate
order by pdate</CommandText>
ORDER BY pdate DESC</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
@@ -1383,29 +1386,29 @@ SELECT idx, code, team, part, [except], memo, wuid, wdate FROM LineCode WHERE (i
<xs:complexType>
<xs:sequence>
<xs:element name="idx" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidx" msprop:Generator_ColumnPropNameInRow="idx" msprop:Generator_ColumnPropNameInTable="idxColumn" msprop:Generator_UserColumnName="idx" type="xs:int" />
<xs:element name="code" msprop:Generator_ColumnVarNameInTable="columncode" msprop:Generator_ColumnPropNameInRow="code" msprop:Generator_ColumnPropNameInTable="codeColumn" msprop:Generator_UserColumnName="code" minOccurs="0">
<xs:element name="code" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="code" msprop:Generator_ColumnVarNameInTable="columncode" msprop:Generator_ColumnPropNameInTable="codeColumn" msprop:Generator_UserColumnName="code" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="team" msprop:Generator_ColumnVarNameInTable="columnteam" msprop:Generator_ColumnPropNameInRow="team" msprop:Generator_ColumnPropNameInTable="teamColumn" msprop:Generator_UserColumnName="team" minOccurs="0">
<xs:element name="team" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="team" msprop:Generator_ColumnVarNameInTable="columnteam" msprop:Generator_ColumnPropNameInTable="teamColumn" msprop:Generator_UserColumnName="team" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="part" msprop:Generator_ColumnVarNameInTable="columnpart" msprop:Generator_ColumnPropNameInRow="part" msprop:Generator_ColumnPropNameInTable="partColumn" msprop:Generator_UserColumnName="part" minOccurs="0">
<xs:element name="part" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="part" msprop:Generator_ColumnVarNameInTable="columnpart" msprop:Generator_ColumnPropNameInTable="partColumn" msprop:Generator_UserColumnName="part" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="except" msprop:Generator_ColumnVarNameInTable="columnexcept" msprop:Generator_ColumnPropNameInRow="except" msprop:Generator_ColumnPropNameInTable="exceptColumn" msprop:Generator_UserColumnName="except" type="xs:boolean" minOccurs="0" />
<xs:element name="memo" msprop:Generator_ColumnVarNameInTable="columnmemo" msprop:Generator_ColumnPropNameInRow="memo" msprop:Generator_ColumnPropNameInTable="memoColumn" msprop:Generator_UserColumnName="memo" minOccurs="0">
<xs:element name="except" msprop:nullValue="0" msprop:Generator_ColumnPropNameInRow="except" msprop:Generator_ColumnVarNameInTable="columnexcept" msprop:Generator_ColumnPropNameInTable="exceptColumn" msprop:Generator_UserColumnName="except" type="xs:boolean" minOccurs="0" />
<xs:element name="memo" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="memo" msprop:Generator_ColumnVarNameInTable="columnmemo" msprop:Generator_ColumnPropNameInTable="memoColumn" msprop:Generator_UserColumnName="memo" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />

View File

@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="1506" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:EqDateList" ZOrder="9" X="70" Y="70" Height="153" Width="207" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
<Shape ID="DesignTable:EquipmentF" ZOrder="8" X="347" Y="70" Height="324" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />

View File

@@ -67,6 +67,7 @@ namespace FEQ0000
else if (dataType == eTabletype.FOL) dtList = taDateList.GetDateListF();
else dtList = taDateList.GetDateListME();
this.cmbDate.Items.Clear();
if (dtList != null)
{
foreach (DataRow dr in dtList.Rows)

View File

@@ -38,50 +38,53 @@
this.panel1 = new System.Windows.Forms.Panel();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.label1 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
this.bn.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(42, 8);
this.textBox1.Location = new System.Drawing.Point(42, 9);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(222, 21);
this.textBox1.TabIndex = 0;
this.textBox1.Size = new System.Drawing.Size(170, 21);
this.textBox1.TabIndex = 1;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(12, 12);
this.linkLabel1.Location = new System.Drawing.Point(12, 13);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(25, 12);
this.linkLabel1.TabIndex = 1;
this.linkLabel1.TabIndex = 0;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "File";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// button1
//
this.button1.Location = new System.Drawing.Point(270, 8);
this.button1.Location = new System.Drawing.Point(312, 9);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(114, 21);
this.button1.TabIndex = 3;
this.button1.Size = new System.Drawing.Size(72, 21);
this.button1.TabIndex = 4;
this.button1.Text = "1.View";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
@@ -90,15 +93,15 @@
//
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 59);
this.dataGridView1.Location = new System.Drawing.Point(0, 36);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(767, 444);
this.dataGridView1.TabIndex = 4;
this.dataGridView1.Size = new System.Drawing.Size(693, 467);
this.dataGridView1.TabIndex = 1;
//
// button3
//
this.button3.Location = new System.Drawing.Point(270, 32);
this.button3.Location = new System.Drawing.Point(569, 9);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(114, 21);
this.button3.TabIndex = 6;
@@ -108,6 +111,8 @@
//
// panel1
//
this.panel1.Controls.Add(this.numericUpDown1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.dateTimePicker1);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.textBox1);
@@ -116,15 +121,15 @@
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(767, 59);
this.panel1.TabIndex = 10;
this.panel1.Size = new System.Drawing.Size(693, 36);
this.panel1.TabIndex = 0;
//
// dateTimePicker1
//
this.dateTimePicker1.Location = new System.Drawing.Point(42, 32);
this.dateTimePicker1.Location = new System.Drawing.Point(390, 9);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(221, 21);
this.dateTimePicker1.TabIndex = 8;
this.dateTimePicker1.Size = new System.Drawing.Size(174, 21);
this.dateTimePicker1.TabIndex = 5;
//
// bn
//
@@ -152,10 +157,35 @@
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn.Name = "bn";
this.bn.PositionItem = this.bindingNavigatorPositionItem;
this.bn.Size = new System.Drawing.Size(767, 25);
this.bn.TabIndex = 9;
this.bn.Size = new System.Drawing.Size(693, 25);
this.bn.TabIndex = 2;
this.bn.Text = "bindingNavigator1";
//
// bindingNavigatorAddNewItem
//
this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorAddNewItem.Text = "새로 추가";
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// bindingNavigatorDeleteItem
//
this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorDeleteItem.Text = "삭제";
//
// bindingNavigatorMoveFirstItem
//
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -188,16 +218,9 @@
this.bindingNavigatorPositionItem.Text = "0";
this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// bindingNavigatorSeparator1
//
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator";
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorMoveNextItem
@@ -220,38 +243,42 @@
//
// bindingNavigatorSeparator2
//
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator";
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorAddNewItem
//
this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorAddNewItem.Text = "새로 추가";
//
// bindingNavigatorDeleteItem
//
this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorDeleteItem.Text = "삭제";
//
// progressBar1
//
this.progressBar1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(200, 22);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(218, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(37, 12);
this.label1.TabIndex = 2;
this.label1.Text = "Sheet";
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(261, 9);
this.numericUpDown1.Maximum = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(45, 21);
this.numericUpDown1.TabIndex = 3;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// fImpEquipment
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(767, 528);
this.ClientSize = new System.Drawing.Size(693, 528);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.bn);
this.Controls.Add(this.panel1);
@@ -265,6 +292,7 @@
this.bn.ResumeLayout(false);
this.bn.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -293,5 +321,7 @@
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
private System.Windows.Forms.ToolStripProgressBar progressBar1;
private System.Windows.Forms.BindingSource bs;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown numericUpDown1;
}
}

View File

@@ -96,27 +96,67 @@ namespace FEQ0000
}
private void button1_Click(object sender, EventArgs e)
{
if(textBox1.Text.isEmpty())
{
FCOMMON.Util.MsgE("파일을 선택하세요");
textBox1.Focus();
return;
}
if(!System.IO.File.Exists(textBox1.Text))
{
FCOMMON.Util.MsgE("입력하신 파일이 존재하지 않습니다.");
textBox1.Focus();
textBox1.SelectAll();
return;
}
dtExcel.Columns.Clear();
dtExcel.Rows.Clear();
dtExcel.AcceptChanges();
libxl.Book book;// = new libxl.BinBook();
book = new libxl.XmlBook();
book.setKey("Amkor Technology korea, Inc", "windows-282b2b0800c5e0016bb06a6fafjfd6o8");
try
{
book.load(textBox1.Text);
}catch (Exception ex)
{
FCOMMON.Util.MsgE(ex.Message);
return;
}
var sheet = book.getSheet(0);
int sheetNum = (int)numericUpDown1.Value;
if (sheetNum >= book.sheetCount())
{
FCOMMON.Util.MsgE("입력한 시트 번호는 존재하지 않습니다.");
book = null;
return;
}
var sheet = book.getSheet(sheetNum);
var MaxRow = sheet.lastRow();
var MinRow = sheet.firstRow();
var MaxCol = sheet.lastCol();
var MinCol = sheet.firstCol();
List<string> cols = new List<string>();
bool firstRow = true;
try{
for (int r = MinRow; r <= MaxRow; r++)
{
DataRow dr = null;
if (r > 0) dr = dtExcel.NewRow();
if (firstRow ==false) dr = dtExcel.NewRow();
for (int c = sheet.firstCol(); c <= sheet.lastCol(); c++)
Boolean nullColumn = false;
for (int c = MinCol; c <= MaxCol; c++)
{
var strVallue = sheet.readStr(r, c);
if (r == 0)
if (strVallue.isEmpty() && c == MinCol)
{
//첫줄 첫행이 빈값이면 처리하지 않는다.
nullColumn = true;
break;
}
if (firstRow)
{
cols.Add(strVallue);
this.dtExcel.Columns.Add(strVallue);
@@ -127,15 +167,27 @@ namespace FEQ0000
dr[cols[c]] = strVallue;
}
}
if (nullColumn) continue; //줄처리를 못한 경우 넘어감
if (firstRow) firstRow = false;
if (dr != null) dtExcel.Rows.Add(dr);
}
dtExcel.AcceptChanges();
}
catch(Exception ex)
{
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
}
//
book = null;
this.bs.DataSource = dtExcel;
this.dataGridView1.DataSource = dtExcel;
this.bn.BindingSource = this.bs;
if(this.bs.Count < 1)
{
FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다.");
}
}
private void button2_Click(object sender, EventArgs e)
@@ -178,6 +230,23 @@ namespace FEQ0000
private void button3_Click(object sender, EventArgs e)
{
if(dtExcel == null || dtExcel.Rows.Count < 1)
{
FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
return;
}
System.Text.StringBuilder sb = new StringBuilder();
sb.AppendLine("다음 자료를 추가하시겠습니까?");
sb.AppendLine();
sb.AppendLine("등록일 : " + dateTimePicker1.Value.ToShortDateString());
sb.AppendLine();
sb.AppendLine("해당 일자에 등록된 자료가 있다면 삭제 됩니다.");
sb.AppendLine("'저장 완료' 메세지가 나올때 까지 기다려 주세요.");
sb.AppendLine();
sb.AppendLine("실행 하려면 '예' 를 누르세요");
var dlg = FCOMMON.Util.MsgQ(sb.ToString());
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
//라인코드를 읽어서 값을 기록해준다.
var taLine = new dsEQTableAdapters.LineCodeTableAdapter();
@@ -279,8 +348,7 @@ namespace FEQ0000
break;
}
dt.AcceptChanges();
FCOMMON.Util.MsgE("test");
}
FCOMMON.Util.MsgI("Save OK");
}
}
}

View File

@@ -123,66 +123,66 @@
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="bindingNavigatorAddNewItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFKSURBVDhPYxi84O4C9v+35nH+vzqH6//FGbz/ocLEg+tA
jX8eNf7/87Dh/8nJAqQbcH46L9yAgz0ipBtwfJIgUHPd/z8Pqv7vaBcnbMClmTz/z07l+38SqPFIv9D/
fd0iQM3l///eK/q/vkHm/6oauf9LKxX/zy9V/j+rSBXTwFNAf/55WA/UVAvElf//3CsB4rz/f+9m/v97
J/n/39tx///djADikP+TcjQxDTjUKwx27t/7pUCNBUCN2UCNqUCNCf//3YoGagz7/+9G0P9/1/3+d6Xp
Yhqws13i/5Zmqf/rwM6V/7+kQvH/31sxQI3h/6fmafyfkKX1vztD9397qv7/5kRDwmEyG+hPkHP/3Qj4
35OhQ1gDOgD5898NfyD2+9+arE+6Ad3pumD/gnB9nBHpBrQkGfxviDf8XxNr/L8y2oR0A+gEGBgAJCPY
nnX8iGkAAAAASUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++
Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ
/5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA
zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/
IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E
rkJggg==
</value>
</data>
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFvSURBVDhPtZBNKMNhHMd3Vd5K7eKCWjkgk7yEZDKksciE
yMwkBw6LhHZxcCDlQg64SA4kJeVE4jRv89qaWn8tUtoF/7g8H2Ootb+x4nt56nm+38/v+/xUfyJcJ9Bt
BMcOH1eRiZV5RGcVwqyHrfWwELweWJoJ9rC2AL0mRLse0VEBcxOKkLeGwlwGIz2h75w6ApC6bERjAdia
gkxiyIow5cKkPWxDFYvTiMrUdxDDVnCfwVh/AOo/P2zhhccFzcWBLxmzEPV50Nfyu/Cn2N/1V85DGNKh
Rhth+EaCxkLISUDWxvOgjYXa7F/Wv7kGUz4UJeKzGODi6H25d2l+yPLsDwu8v4NWHY8lSbhL0/HtbX8F
GLXh1MQgnxwoQ3h5hkEL6JI5TlPj21gNMd6WZyC1VSN7r0Mh7G4i56pxpkQhdTWA/KQ4aUcTh+x0KACm
RpBSo3HrM0G6Uq7pl2zvhvNDBcClE8YH4HDv2/A/SKV6BYojAxyEJtLJAAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC
DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC
rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV
i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG
86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG
QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX
bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEqSURBVDhPYxg8oHDW8/9NC57/z5z4+D9UCAOEtz/AKceQ
O/PZ/1VH3v/HpSi++8H/4IZruA3ImPL0/8J9H7Aqiu95+H/p/v///asv4DYgoefJ/2lb3mMoimi/D9ac
Oev/f6/SE7gNiOx69L939QcURaGt98CaW9cBbe/8+98l/wBuAwKbH/6vm/8Orii45e7/RXv//+8Aas6Y
8/O/Xd3P//YZ23Eb4FF1/3/+tDcoiuyKb/9Pn/P7v3/Xt/86he/+WySsx22Afend/9mTX2Mo0k85/9+k
6MV/laxP/40jl+E2wCLvzv/U/tdYFRkknfgvm/b1v27wPNwGGGbd/h/W8hKnIv3Uy/81fKfhNkAn7cZ/
v+qHeBWpeEzAbYBT7pX/IAV4FQ1CwMAAAPB2wKul5ZpwAAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77
wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0
v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg
UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA
Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu
lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC2SURBVDhPYxg6ILz9wX8ok3QQ3/3gf3DDNfIMiO95+H/p
/v///asvkG5ARPt9sObMWf//e5WeIM2A0NZ7YM2t64C2d/7975J/gHgDglvu/l+09///DqDmjDk//9vV
/fxvn7GdNBfYFd/+nz7n93//rm//dQrf/bdIWE96GOinnP9vUvTiv0rWp//GkctINwAEDJJO/JdN+/pf
N3geeQaAgH7q5f8avtPINwAEVDwmUGbAYAUMDADQFGCYBLpQVQAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w
5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f
Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+
08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC
</value>
</data>
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACjSURBVDhPYxh8oHDW8/9QJnkgd+az/wnd98g3JGPK0//z
9v/+n9B1hzxDEnqe/J+979f/zq1//7uVXibdkMiuR/+nbPv1v2Tp3/8J0//+t8k9S5ohgc0P/7eufQ/W
bFzy5b909LX/xpHLiDfEo+r+/5K57+CaFV16SHOBfend/4Etz8jTDAIWeXf+2xRcIU8zCBhm3SZfMwjo
pN0gX/NQBAwMAKB+X6AHNEI4AAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78
n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI
N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f
oAc0QjgAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEsSURBVDhPYxhcoHDW8/9QJgYAyTUteP4/c+JjnGoYcmc+
+5/QfQ+rApDcqiPv/4e3P8BtQMaUp//n7f/9P6HrDoYikNzCfR/+Bzdcw21AQs+T/7P3/frfufXvf7fS
yygKQXLTtrz/7199AbcBkV2P/k/Z9ut/ydK//xOm//1vk3sWrhgk17v6w3+v0hO4DQhsfvi/de17sGbj
ki//paOv/TeOXAbWAJKrm//uv0v+AdwGeFTd/18y9x1cs6JLD1wxSC5/2pv/9hnbcRtgX3r3f2DLMwzN
IACSy578+r9FwnrcBljk3flvU3AFQzMIgORS+1/DvYQVGGbdxqoZBEByYS0v/+sGz8NtgE7aDZySIDm/
6of/NXyn4TYAH3DKvfJfxWMCGEOFBgVgYAAAvtG/s7kMTpwAAAAASUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+//
h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B
twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA
kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG
WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">