This commit is contained in:
chi
2021-02-08 15:57:07 +09:00
parent 310bd13a62
commit 30b06c2d35
15 changed files with 649 additions and 417 deletions

View File

@@ -9900,15 +9900,15 @@ ORDER BY name, idx";
this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@model", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[9].Connection = this.Connection;
this._commandCollection[9].CommandText = "UPDATE Items\r\nSET name = @name, model = @model, unit = @unit, disable = @d" +
"isable\r\nWHERE (gcode = @gcode) AND (sid = @Original_sid)";
this._commandCollection[9].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 200, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@model", global::System.Data.SqlDbType.NVarChar, 200, global::System.Data.ParameterDirection.Input, 0, 0, "model", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@unit", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@disable", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_sid", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "sid", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._commandCollection[9].CommandText = "dbo.UpdateItem";
this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sid", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 200, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@disable", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@unit", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -10617,43 +10617,43 @@ ORDER BY name, idx";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int UpdateMatrial(string name, string model, string unit, global::System.Nullable<bool> disable, string gcode, string Original_sid) {
public virtual int UpdateItem(string gcode, string sid, string name, string cate, global::System.Nullable<bool> disable, string unit) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[9];
if ((name == null)) {
command.Parameters[0].Value = global::System.DBNull.Value;
}
else {
command.Parameters[0].Value = ((string)(name));
}
if ((model == null)) {
if ((gcode == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(model));
command.Parameters[1].Value = ((string)(gcode));
}
if ((unit == null)) {
if ((sid == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
else {
command.Parameters[2].Value = ((string)(unit));
command.Parameters[2].Value = ((string)(sid));
}
if ((disable.HasValue == true)) {
command.Parameters[3].Value = ((bool)(disable.Value));
}
else {
if ((name == null)) {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((gcode == null)) {
else {
command.Parameters[3].Value = ((string)(name));
}
if ((cate == null)) {
command.Parameters[4].Value = global::System.DBNull.Value;
}
else {
command.Parameters[4].Value = ((string)(gcode));
command.Parameters[4].Value = ((string)(cate));
}
if ((Original_sid == null)) {
command.Parameters[5].Value = global::System.DBNull.Value;
if ((disable.HasValue == true)) {
command.Parameters[5].Value = ((bool)(disable.Value));
}
else {
command.Parameters[5].Value = ((string)(Original_sid));
command.Parameters[5].Value = global::System.DBNull.Value;
}
if ((unit == null)) {
command.Parameters[6].Value = global::System.DBNull.Value;
}
else {
command.Parameters[6].Value = ((string)(unit));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)

View File

@@ -227,51 +227,21 @@ WHERE (gcode = @gcode) AND (ISNULL(name, N'') = @name) AND (ISNULL(model, N'')
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.Items" DbObjectType="Table" GenerateShortCommands="true" GeneratorSourceName="UpdateMatrial" Modifier="Public" Name="UpdateMatrial" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy4" UserSourceName="UpdateMatrial">
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.UpdateItem" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="UpdateItem" Modifier="Public" Name="UpdateItem" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy4" UserSourceName="UpdateItem">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>UPDATE Items
SET name = @name, model = @model, unit = @unit, disable = @disable
WHERE (gcode = @gcode) AND (sid = @Original_sid)</CommandText>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.UpdateItem</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="name" ColumnName="name" DataSourceName="EE.dbo.Items" DataTypeServer="nvarchar(200)" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="200" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="model" ColumnName="model" DataSourceName="EE.dbo.Items" DataTypeServer="nvarchar(200)" DbType="String" Direction="Input" ParameterName="@model" Precision="0" ProviderType="NVarChar" Scale="0" Size="200" SourceColumn="model" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="unit" ColumnName="unit" DataSourceName="EE.dbo.Items" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@unit" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="unit" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="disable" ColumnName="disable" DataSourceName="EE.dbo.Items" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@disable" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="disable" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Items" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="Original_sid" ColumnName="sid" DataSourceName="EE.dbo.Items" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@Original_sid" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="sid" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@sid" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="200" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@cate" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@disable" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@unit" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>UPDATE Items
SET name = @name, model = @model,unit = @unit, disable = @disable
WHERE (gcode = @gcode,sid= @Original_sid);</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="name" ColumnName="name" DataSourceName="" DataTypeServer="nvarchar(200)" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="200" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="sid" ColumnName="sid" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@sid" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="sid" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="model" ColumnName="model" DataSourceName="" DataTypeServer="nvarchar(200)" DbType="String" Direction="Input" ParameterName="@model" Precision="0" ProviderType="NVarChar" Scale="0" Size="200" SourceColumn="model" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="manu" ColumnName="manu" DataSourceName="" DataTypeServer="nvarchar(100)" DbType="String" Direction="Input" ParameterName="@manu" Precision="0" ProviderType="NVarChar" Scale="0" Size="100" SourceColumn="manu" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="supply" ColumnName="supply" DataSourceName="" DataTypeServer="nvarchar(100)" DbType="String" Direction="Input" ParameterName="@supply" Precision="0" ProviderType="NVarChar" Scale="0" Size="100" SourceColumn="supply" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="price" ColumnName="price" DataSourceName="" DataTypeServer="decimal(18, 0)" DbType="Decimal" Direction="Input" ParameterName="@price" Precision="18" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="price" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="memo" ColumnName="memo" DataSourceName="" DataTypeServer="nvarchar(255)" DbType="String" Direction="Input" ParameterName="@memo" Precision="0" ProviderType="NVarChar" Scale="0" Size="255" SourceColumn="memo" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="wuid" ColumnName="wuid" DataSourceName="" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@wuid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="wuid" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="wdate" ColumnName="wdate" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@wdate" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="wdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="cate" ColumnName="cate" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@cate" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="cate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="supplyidx" ColumnName="supplyidx" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@supplyidx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="supplyidx" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="scale" ColumnName="scale" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@scale" Precision="0" ProviderType="Float" Scale="0" Size="8" SourceColumn="scale" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="unit" ColumnName="unit" DataSourceName="" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@unit" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="unit" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="disable" ColumnName="disable" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@disable" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="disable" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="bparam1" ColumnName="bparam1" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@bparam1" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="bparam1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="iparam1" ColumnName="iparam1" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@iparam1" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="iparam1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="import" ColumnName="import" DataSourceName="" DataTypeServer="char(1)" DbType="AnsiString" Direction="Input" ParameterName="@import" Precision="0" ProviderType="Char" Scale="0" Size="1" SourceColumn="import" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="Original_idx" ColumnName="idx" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</Sources>
</TableAdapter>

View File

@@ -6,16 +6,16 @@
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-12" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:Items" ZOrder="10" X="48" Y="30" Height="647" Width="191" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="387" />
<Shape ID="DesignTable:Common" ZOrder="9" X="245" Y="33" Height="267" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:Board" ZOrder="8" X="982" Y="70" Height="305" Width="179" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:RequestItem" ZOrder="7" X="1499" Y="70" Height="324" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Customs" ZOrder="6" X="1788" Y="70" Height="362" Width="263" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Staff" ZOrder="5" X="2121" Y="70" Height="286" Width="172" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:Purchase" ZOrder="4" X="2357" Y="30" Height="664" Width="245" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="556" />
<Shape ID="DesignTable:Projects" ZOrder="3" X="2672" Y="70" Height="324" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:HolidayLIst" ZOrder="2" X="2988" Y="70" Height="191" Width="210" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:InventoryUser" ZOrder="1" X="3268" Y="70" Height="343" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Items" ZOrder="1" X="48" Y="30" Height="590" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="387" />
<Shape ID="DesignTable:Common" ZOrder="10" X="292" Y="31" Height="267" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:Board" ZOrder="9" X="982" Y="70" Height="305" Width="179" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:RequestItem" ZOrder="8" X="1499" Y="70" Height="324" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Customs" ZOrder="7" X="1788" Y="70" Height="362" Width="263" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Staff" ZOrder="6" X="2121" Y="70" Height="286" Width="172" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:Purchase" ZOrder="5" X="2357" Y="30" Height="664" Width="245" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="556" />
<Shape ID="DesignTable:Projects" ZOrder="4" X="2672" Y="70" Height="324" Width="246" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:HolidayLIst" ZOrder="3" X="2988" Y="70" Height="191" Width="210" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:InventoryUser" ZOrder="2" X="3268" Y="70" Height="343" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
</Shapes>
<Connectors />
</DiagramLayout>

View File

@@ -67,20 +67,20 @@ namespace FCM0000
dtExcel.Columns.Add("Cate");
dtExcel.Columns.Add("SID");
dtExcel.Columns.Add("Delete");
dtExcel.Columns.Add("Name");
dtExcel.Columns.Add("Model");
//dtExcel.Columns.Add("Model");
dtExcel.Columns.Add("Unit");
dtExcel.Columns.Add("Memo");
dtExcel.Columns.Add("Disable");
if(book == null)
if (book == null)
{
book = new libxl.XmlBook();
book.setKey(FCOMMON.info.libxlCompany, FCOMMON.info.libxlKey);
}
try
{
book.load(textBox1.Text);
@@ -128,29 +128,17 @@ namespace FCM0000
//제목줄을 처리한다. 181029
List<string> cols = new List<string>();
try
{
for (int r = MinRow; r <= MaxRow; r++)
{
var v_sid = sheet.readStr(r, 0);
var v_cate = sheet.readStr(r, 4);
var v_memo = sheet.readStr(r, 23);
//이름
var v_name = sheet.readStr(r, 21);
if (v_name.isEmpty()) v_name = sheet.readStr(r, 2);
if (v_name.isEmpty()) v_name = sheet.readStr(r, 1);
//모델
var v_model = sheet.readStr(r, 22);
if (v_model.isEmpty()) v_model = sheet.readStr(r, 1);
if (v_model.isEmpty()) v_model = sheet.readStr(r, 2);
//삭제여부
var v_del = sheet.readStr(r, 8);
var v_name = sheet.readStr(r, 1);
var v_cate = sheet.readStr(r, 2);
var v_del = sheet.readStr(r, 3);
var v_unit = sheet.readStr(r, 4);
//이름이나 sid가없으면 처리하지 않음
if (v_name.Trim() == "") continue; //품명과 sid 없는 건 제외
@@ -158,11 +146,13 @@ namespace FCM0000
DataRow dr = dtExcel.NewRow();
dr["sid"] = v_sid;
dr["delete"] = v_del;
dr["name"] = v_name;
dr["model"] = v_model;
dr["unit"] = v_cate;
dr["memo"] = v_memo;
dr["cate"] = v_cate;
dr["disable"] = v_del;
dr["unit"] = v_unit;
//dr["memo"] = v_memo;
if (dr != null)
{
@@ -176,7 +166,7 @@ namespace FCM0000
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
}
//
// book = null;
// book = null;
this.bs.DataSource = dtExcel;
this.dataGridView1.DataSource = dtExcel;
@@ -191,11 +181,11 @@ namespace FCM0000
private void button3_Click(object sender, EventArgs e)
{
if (dtExcel == null || dtExcel.Rows.Count < 1)
{
FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
return;
}
//if (dtExcel == null || dtExcel.Rows.Count < 1)
//{
// FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
// return;
//}
System.Text.StringBuilder sb = new StringBuilder();
sb.AppendLine("다음 자료를 추가하시겠습니까?");
@@ -213,14 +203,11 @@ namespace FCM0000
this.progressBar1.Value = 0;
this.progressBar1.Maximum = (int)nudE.Value; // dtExcel.Rows.Count;
if (checkBox1.Checked) ta.DeleteImport(textBox2.Text, FCOMMON.info.Login.gcode);
int dup = 0;
int add = 0;
int cnt = 0;
int err = 0;
//12,13
var dtTarget = new dsMSSQL.ItemsDataTable();
try
{
var sheet = book.getSheet((int)nudSheetNo.Value);
@@ -234,95 +221,35 @@ namespace FCM0000
this.progressBar1.Value += 1;
//화면 업데이트
this.Text = string.Format("{0}/{1} : {2:N2}% 추가:{3},오류:{4},넘김:{5}", r, MaxRow, ((progressBar1.Value * 1.0) / progressBar1.Maximum) * 100.0,add,err,dup);
this.Text = string.Format("{0}/{1} : {2:N2}% ",
r, MaxRow,
((progressBar1.Value * 1.0) / progressBar1.Maximum) * 100.0);
//if(cnt % 10 == 0)
Application.DoEvents();
//if(cnt % 2 == 0)
Application.DoEvents();
var v_sid = sheet.readStr(r, 0);
v_sid = v_sid.Replace("_", "").Replace("-", "").Replace(" ", "").Replace(".", "");
var v_cate = sheet.readStr(r, 4);
var v_memo = sheet.readStr(r, 23);
//이름
var v_name = sheet.readStr(r, 2);
//if (v_name.isEmpty()) v_name = sheet.readStr(r, 2);
if (v_name.isEmpty()) v_name = sheet.readStr(r, 1);
//모델
var v_model = sheet.readStr(r, 22);
if (v_model.isEmpty()) v_model = sheet.readStr(r, 1);
if (v_model.isEmpty()) v_model = sheet.readStr(r, 2);
//삭제여부
var v_del = sheet.readStr(r, 8);
var v_sid = sheet.readStr(r, 0).Trim();
var v_name = sheet.readStr(r, 1).Trim();
var v_cate = sheet.readStr(r, 2).Trim();
var v_del = sheet.readStr(r, 3).Trim() == "X";
var v_unit = sheet.readStr(r, 4).Trim();
//var v_model = sheet.readStr(r, 5).Trim();
//이름이나 sid가없으면 처리하지 않음
if (v_name.Trim().isEmpty()) continue; //품명과 sid 없는 건 제외
if (v_sid.Trim().isEmpty()) continue;
//이 sid 의 중복검사
//중복은 처리하지 않는다.
if (ta.ExistSID("EET1P", v_sid) > 0)
{
//해당 sid데이터가 잇으므로 업데이트를 한다
Boolean disable = v_del == "X" ? true : false;
dup += ta.UpdateMatrial(v_name, v_model, v_cate, disable, "EET1P", v_sid);
// dup += 1;
continue;
}
if (v_name.Trim() == "") continue; //품명과 sid 없는 건 제외
if (v_sid.Trim() == "") continue;
try
{
//데이터추가
var newdr = dt.NewRow() as dsMSSQL.ItemsRow;
if (v_name.Length > 180) v_name = v_name.ToString().Substring(0, 170); // continue; //너무긴것도 뺸다.
//dtExcel.Columns.Add("SID");
//dtExcel.Columns.Add("Delete");
//dtExcel.Columns.Add("Name");
//dtExcel.Columns.Add("Model");
//dtExcel.Columns.Add("Unit");
//dtExcel.Columns.Add("Memo");
newdr.sid = v_sid;
if (v_del == "X") newdr.disable = true;
else newdr.disable = false;
newdr.name = v_name.Trim();
newdr.cate = v_cate.Trim();
newdr.unit = newdr.cate;
newdr.price = 0;
newdr.model = v_model.Trim();
newdr.memo = v_memo.Trim();
newdr.scale = 1;
newdr.gcode = "EET1P";
newdr.wuid = "DEV";
newdr.wdate = DateTime.Now;
//newdr.unit = "--";
newdr.import = textBox2.Text;
dt.Rows.Add(newdr);
add += ta.Update(newdr);
newdr.Delete();
dtTarget.AcceptChanges();
//add += 1;
cnt += this.ta.UpdateItem(FCOMMON.info.Login.gcode, v_sid, v_name, v_cate, v_del, v_unit);
}
catch (Exception ex)
{
err += 1;
}
//Application.DoEvents();
//DataRow dr = dtExcel.NewRow();
//dr["sid"] = v_sid;
//dr["delete"] = v_del;
@@ -333,7 +260,7 @@ namespace FCM0000
//실제 추가한다
}
FCOMMON.Util.MsgI("Save OK\n중복:" + dup.ToString() + "\n전체:" + cnt.ToString() + "\n에러:" + err.ToString());
FCOMMON.Util.MsgI("Save OK\n전체:" + cnt.ToString() + "\n에러:" + err.ToString());
}
catch (Exception ex)
@@ -341,7 +268,6 @@ namespace FCM0000
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
}
}
private void panel1_Paint(object sender, PaintEventArgs e)