プロジェクト

全般

プロフィール

リビジョン 38

堀内ほぼ8年前に追加

2016/12/26版 不足分補足

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.Designer.cs
1
namespace ProcessManagement.Forms.DataEntry
2
{
3
    partial class FrmConstructionSplit
4
    {
5
        /// <summary>
6
        /// Required designer variable.
7
        /// </summary>
8
        private System.ComponentModel.IContainer components = null;
9

  
10
        /// <summary>
11
        /// Clean up any resources being used.
12
        /// </summary>
13
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14
        protected override void Dispose(bool disposing)
15
        {
16
            if (disposing && (components != null))
17
            {
18
                components.Dispose();
19
            }
20
            base.Dispose(disposing);
21
        }
22

  
23
        #region Windows Form Designer generated code
24

  
25
        /// <summary>
26
        /// Required method for Designer support - do not modify
27
        /// the contents of this method with the code editor.
28
        /// </summary>
29
        private void InitializeComponent()
30
        {
31
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
33
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
35
            this.btnCancel = new System.Windows.Forms.Button();
36
            this.btnEntry = new System.Windows.Forms.Button();
37
            this.dgvSource = new System.Windows.Forms.DataGridView();
38
            this.btnDataSelect = new System.Windows.Forms.Button();
39
            this.dgvDestination = new System.Windows.Forms.DataGridView();
40
            this.label1 = new System.Windows.Forms.Label();
41
            this.label2 = new System.Windows.Forms.Label();
42
            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
43
            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
44
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
45
            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
46
            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
47
            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
48
            ((System.ComponentModel.ISupportInitialize)(this.dgvSource)).BeginInit();
49
            ((System.ComponentModel.ISupportInitialize)(this.dgvDestination)).BeginInit();
50
            this.SuspendLayout();
51
            // 
52
            // btnCancel
53
            // 
54
            this.btnCancel.BackColor = System.Drawing.Color.Red;
55
            this.btnCancel.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
56
            this.btnCancel.ForeColor = System.Drawing.Color.White;
57
            this.btnCancel.Location = new System.Drawing.Point(642, 496);
58
            this.btnCancel.Name = "btnCancel";
59
            this.btnCancel.Size = new System.Drawing.Size(120, 30);
60
            this.btnCancel.TabIndex = 3;
61
            this.btnCancel.Text = "キャンセル";
62
            this.btnCancel.UseVisualStyleBackColor = false;
63
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
64
            // 
65
            // btnEntry
66
            // 
67
            this.btnEntry.BackColor = System.Drawing.Color.Green;
68
            this.btnEntry.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
69
            this.btnEntry.ForeColor = System.Drawing.Color.White;
70
            this.btnEntry.Location = new System.Drawing.Point(514, 496);
71
            this.btnEntry.Name = "btnEntry";
72
            this.btnEntry.Size = new System.Drawing.Size(120, 30);
73
            this.btnEntry.TabIndex = 2;
74
            this.btnEntry.Text = "実 行";
75
            this.btnEntry.UseVisualStyleBackColor = false;
76
            this.btnEntry.Click += new System.EventHandler(this.btnEntry_Click);
77
            // 
78
            // dgvSource
79
            // 
80
            this.dgvSource.AllowUserToAddRows = false;
81
            this.dgvSource.AllowUserToDeleteRows = false;
82
            this.dgvSource.AllowUserToResizeColumns = false;
83
            this.dgvSource.AllowUserToResizeRows = false;
84
            this.dgvSource.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
85
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
86
            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
87
            dataGridViewCellStyle1.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold);
88
            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
89
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
90
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
91
            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
92
            this.dgvSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
93
            this.dgvSource.ColumnHeadersHeight = 24;
94
            this.dgvSource.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
95
            this.dgvSource.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
96
            this.Column1,
97
            this.Column2,
98
            this.Column3,
99
            this.Column4});
100
            this.dgvSource.Location = new System.Drawing.Point(2, 36);
101
            this.dgvSource.Name = "dgvSource";
102
            this.dgvSource.RowHeadersVisible = false;
103
            this.dgvSource.RowHeadersWidth = 20;
104
            this.dgvSource.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
105
            this.dgvSource.RowTemplate.Height = 20;
106
            this.dgvSource.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
107
            this.dgvSource.Size = new System.Drawing.Size(760, 186);
108
            this.dgvSource.TabIndex = 4;
109
            this.dgvSource.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSource_CellDoubleClick);
110
            // 
111
            // btnDataSelect
112
            // 
113
            this.btnDataSelect.BackColor = System.Drawing.Color.NavajoWhite;
114
            this.btnDataSelect.Font = new System.Drawing.Font("MS 明朝", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
115
            this.btnDataSelect.ForeColor = System.Drawing.Color.Black;
116
            this.btnDataSelect.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
117
            this.btnDataSelect.Location = new System.Drawing.Point(292, 230);
118
            this.btnDataSelect.Name = "btnDataSelect";
119
            this.btnDataSelect.Size = new System.Drawing.Size(200, 33);
120
            this.btnDataSelect.TabIndex = 17;
121
            this.btnDataSelect.TabStop = false;
122
            this.btnDataSelect.Text = "⇓";
123
            this.btnDataSelect.UseVisualStyleBackColor = false;
124
            this.btnDataSelect.Click += new System.EventHandler(this.btnDataSelect_Click);
125
            // 
126
            // dgvDestination
127
            // 
128
            this.dgvDestination.AllowUserToAddRows = false;
129
            this.dgvDestination.AllowUserToDeleteRows = false;
130
            this.dgvDestination.AllowUserToResizeColumns = false;
131
            this.dgvDestination.AllowUserToResizeRows = false;
132
            this.dgvDestination.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
133
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
134
            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
135
            dataGridViewCellStyle3.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold);
136
            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
137
            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
138
            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
139
            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
140
            this.dgvDestination.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
141
            this.dgvDestination.ColumnHeadersHeight = 24;
142
            this.dgvDestination.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
143
            this.dgvDestination.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
144
            this.dataGridViewTextBoxColumn1,
145
            this.dataGridViewTextBoxColumn2});
146
            this.dgvDestination.Location = new System.Drawing.Point(2, 304);
147
            this.dgvDestination.Name = "dgvDestination";
148
            this.dgvDestination.RowHeadersVisible = false;
149
            this.dgvDestination.RowHeadersWidth = 20;
150
            this.dgvDestination.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
151
            this.dgvDestination.RowTemplate.Height = 20;
152
            this.dgvDestination.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
153
            this.dgvDestination.Size = new System.Drawing.Size(760, 186);
154
            this.dgvDestination.TabIndex = 18;
155
            // 
156
            // label1
157
            // 
158
            this.label1.BackColor = System.Drawing.Color.White;
159
            this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
160
            this.label1.ForeColor = System.Drawing.Color.Black;
161
            this.label1.Location = new System.Drawing.Point(2, 4);
162
            this.label1.Name = "label1";
163
            this.label1.Size = new System.Drawing.Size(126, 30);
164
            this.label1.TabIndex = 19;
165
            this.label1.Text = "分割元工事";
166
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
167
            // 
168
            // label2
169
            // 
170
            this.label2.BackColor = System.Drawing.Color.White;
171
            this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
172
            this.label2.ForeColor = System.Drawing.Color.Black;
173
            this.label2.Location = new System.Drawing.Point(2, 272);
174
            this.label2.Name = "label2";
175
            this.label2.Size = new System.Drawing.Size(126, 30);
176
            this.label2.TabIndex = 20;
177
            this.label2.Text = "分割対象工事";
178
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
179
            // 
180
            // dataGridViewTextBoxColumn1
181
            // 
182
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
183
            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle4;
184
            this.dataGridViewTextBoxColumn1.Frozen = true;
185
            this.dataGridViewTextBoxColumn1.HeaderText = "工事番号";
186
            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
187
            this.dataGridViewTextBoxColumn1.ReadOnly = true;
188
            this.dataGridViewTextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
189
            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
190
            this.dataGridViewTextBoxColumn1.Width = 120;
191
            // 
192
            // dataGridViewTextBoxColumn2
193
            // 
194
            this.dataGridViewTextBoxColumn2.Frozen = true;
195
            this.dataGridViewTextBoxColumn2.HeaderText = "工 事 名 称";
196
            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
197
            this.dataGridViewTextBoxColumn2.ReadOnly = true;
198
            this.dataGridViewTextBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
199
            this.dataGridViewTextBoxColumn2.Width = 620;
200
            // 
201
            // Column1
202
            // 
203
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
204
            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
205
            this.Column1.Frozen = true;
206
            this.Column1.HeaderText = "工事番号";
207
            this.Column1.Name = "Column1";
208
            this.Column1.ReadOnly = true;
209
            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
210
            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
211
            this.Column1.Width = 120;
212
            // 
213
            // Column2
214
            // 
215
            this.Column2.Frozen = true;
216
            this.Column2.HeaderText = "工 事 名 称";
217
            this.Column2.Name = "Column2";
218
            this.Column2.ReadOnly = true;
219
            this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
220
            this.Column2.Width = 620;
221
            // 
222
            // Column3
223
            // 
224
            this.Column3.Frozen = true;
225
            this.Column3.HeaderText = "紐付きフラグ";
226
            this.Column3.Name = "Column3";
227
            this.Column3.ReadOnly = true;
228
            this.Column3.Visible = false;
229
            // 
230
            // Column4
231
            // 
232
            this.Column4.Frozen = true;
233
            this.Column4.HeaderText = "増減工事番号";
234
            this.Column4.Name = "Column4";
235
            this.Column4.ReadOnly = true;
236
            this.Column4.Visible = false;
237
            // 
238
            // FrmConstructionSplit
239
            // 
240
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
241
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
242
            this.BackColor = System.Drawing.Color.Black;
243
            this.ClientSize = new System.Drawing.Size(764, 531);
244
            this.Controls.Add(this.label2);
245
            this.Controls.Add(this.label1);
246
            this.Controls.Add(this.dgvDestination);
247
            this.Controls.Add(this.btnDataSelect);
248
            this.Controls.Add(this.dgvSource);
249
            this.Controls.Add(this.btnEntry);
250
            this.Controls.Add(this.btnCancel);
251
            this.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold);
252
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
253
            this.KeyPreview = true;
254
            this.MaximizeBox = false;
255
            this.MinimizeBox = false;
256
            this.Name = "FrmConstructionSplit";
257
            this.ShowIcon = false;
258
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
259
            this.Text = "工事分割処理";
260
            this.Load += new System.EventHandler(this.FrmConstructionSplit_Load);
261
            ((System.ComponentModel.ISupportInitialize)(this.dgvSource)).EndInit();
262
            ((System.ComponentModel.ISupportInitialize)(this.dgvDestination)).EndInit();
263
            this.ResumeLayout(false);
264

  
265
        }
266

  
267
        #endregion
268

  
269
        private System.Windows.Forms.Button btnCancel;
270
        private System.Windows.Forms.Button btnEntry;
271
        private System.Windows.Forms.DataGridView dgvSource;
272
        private System.Windows.Forms.Button btnDataSelect;
273
        private System.Windows.Forms.DataGridView dgvDestination;
274
        private System.Windows.Forms.Label label1;
275
        private System.Windows.Forms.Label label2;
276
        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
277
        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
278
        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
279
        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
280
        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
281
        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
282
    }
283
}
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Data;
5
using System.Drawing;
6
using System.Linq;
7
using System.Text;
8
using System.Windows.Forms;
9

  
10
using ProcessManagement.Common;
11
using ProcessManagement.DB.IOAccess;
12
using ProcessManagement.DataModel;
13
using ProcessManagement.Forms.CustomControls;
14
using ProcessManagement.Forms.ControlsAction;
15

  
16
namespace ProcessManagement.Forms.DataEntry
17
{
18
    public partial class FrmConstructionSplit : Form
19
    {
20
        #region ログ使用定義
21
        //log4netログを使用する
22
        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
23
        #endregion
24

  
25
        #region 定数
26

  
27
        /// <summary>
28
        /// グリッド標準行数
29
        /// </summary>
30
        private static int s_GridDefaultLine = 8;
31
        
32
        #endregion
33

  
34
        #region 変数
35

  
36
        /// <summary>
37
        /// 工事コード
38
        /// </summary>
39
        private int m_ConstructionCode = 0;
40

  
41
        #endregion
42

  
43
        #region プロパティ
44

  
45
        /// <summary>
46
        /// 工事番号
47
        /// </summary>
48
        public int ConstructionCode
49
        {
50
            get { return m_ConstructionCode; }
51
            set { m_ConstructionCode = value; }
52
        }
53

  
54
        #endregion
55

  
56
        #region コンストラクタ
57
        /// <summary>
58
        /// フォーム初期化
59
        /// </summary>
60
        public FrmConstructionSplit()
61
        {
62
            InitializeComponent();
63
        }
64
        #endregion
65

  
66
        #region フォームロード
67
        /// <summary>
68
        /// フォームロード
69
        /// </summary>
70
        /// <param name="sender"></param>
71
        /// <param name="e"></param>
72
        private void FrmConstructionSplit_Load(object sender, EventArgs e)
73
        {
74
            InitDataLoad();
75
        }
76
        #endregion
77

  
78
        #region 終了ボタン押下
79
        /// <summary>
80
        /// 終了ボタン押下
81
        /// </summary>
82
        /// <param name="sender"></param>
83
        /// <param name="e"></param>
84
        private void btnCancel_Click(object sender, EventArgs e)
85
        {
86
            this.Close();
87
        }
88
        #endregion
89

  
90
        #region 実行ボタン押下
91
        /// <summary>
92
        /// 実行ボタン押下
93
        /// </summary>
94
        /// <param name="sender"></param>
95
        /// <param name="e"></param>
96
        private void btnEntry_Click(object sender, EventArgs e)
97
        {
98
        }
99
        #endregion
100

  
101
        #region データ選択ボタン押下
102
        /// <summary>
103
        /// データ選択ボタン押下
104
        /// </summary>
105
        /// <param name="sender"></param>
106
        /// <param name="e"></param>
107
        private void btnDataSelect_Click(object sender, EventArgs e)
108
        {
109
            GridSelectData();
110
        }
111
        #endregion
112

  
113
        #region ソースグリッドダブルクリック
114
        /// <summary>
115
        /// ソースグリッドダブルクリック
116
        /// </summary>
117
        /// <param name="sender"></param>
118
        /// <param name="e"></param>
119
        private void dgvSource_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
120
        {
121
            GridSelectData();
122
        }
123
        #endregion
124
    }
125
}
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.resx
1
<?xml version="1.0" encoding="utf-8"?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
    <resheader name="version">2.0</resheader>
18
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of "resheader" rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
    <xsd:element name="root" msdata:IsDataSet="true">
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs="unbounded">
67
          <xsd:element name="metadata">
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
              </xsd:sequence>
72
              <xsd:attribute name="name" use="required" type="xsd:string" />
73
              <xsd:attribute name="type" type="xsd:string" />
74
              <xsd:attribute name="mimetype" type="xsd:string" />
75
              <xsd:attribute ref="xml:space" />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name="assembly">
79
            <xsd:complexType>
80
              <xsd:attribute name="alias" type="xsd:string" />
81
              <xsd:attribute name="name" type="xsd:string" />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name="data">
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
              </xsd:sequence>
90
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
              <xsd:attribute ref="xml:space" />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name="resheader">
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
              </xsd:sequence>
101
              <xsd:attribute name="name" type="xsd:string" use="required" />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name="resmimetype">
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name="version">
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name="reader">
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name="writer">
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
121
    <value>True</value>
122
  </metadata>
123
  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124
    <value>True</value>
125
  </metadata>
126
  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
127
    <value>True</value>
128
  </metadata>
129
  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
130
    <value>True</value>
131
  </metadata>
132
  <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
133
    <value>True</value>
134
  </metadata>
135
  <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
136
    <value>True</value>
137
  </metadata>
138
</root>
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Collections;
4
using System.ComponentModel;
5
using System.Data;
6
using System.Drawing;
7
using System.Linq;
8
using System.Text;
9
using System.Windows.Forms;
10

  
11
using ProcessManagement.Common;
12
using ProcessManagement.DB.IOAccess;
13
using ProcessManagement.DataModel;
14
using ProcessManagement.Forms.CustomControls;
15
using ProcessManagement.Forms.ControlsAction;
16

  
17
namespace ProcessManagement.Forms.DataEntry
18
{
19
    partial class FrmConstructionSplit
20
    {
21
        #region 初期時データ取得
22
        /// <summary>
23
        /// 初期時データ取得
24
        /// </summary>
25
        private void InitDataLoad()
26
        {
27
            try
28
            {
29
                // データ表示
30
                DataDisplay();
31
            }
32
            catch (Exception ex)
33
            {
34
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
35
            }
36
        }
37
        #endregion
38

  
39
        #region 一覧データ表示処理
40
        /// <summary>
41
        /// 一覧データ表示処理
42
        /// </summary>
43
        private void DataDisplay()
44
        {
45
            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
46
            DataGridView dgvS = dgvSource;
47
            DataGridView dgvD = dgvDestination;
48
            try
49
            {
50
                dgvS.SuspendLayout();
51
                dgvS.Rows.Clear();
52
                dgvD.Rows.Clear();
53

  
54
                string strSQL = string.Empty;
55
                // SQL作成
56
                CreateInitSQL(ref strSQL);
57

  
58
                ArrayList arData = new ArrayList();
59
                // ----- 工事詳細台帳取得
60
                BaseDB.ExecuteReader(strSQL, ref arData);
61

  
62
                // 読込時データカウント取得
63
                if (arData.Count == 0) return;
64

  
65
                // データ表示
66
                foreach (object[] objRec in arData)
67
                {
68
                    int CCode = CommonMotions.cnvInt(objRec[0]);
69
                    string strCode = string.Format("{0}-{1:D2}", (CCode / 100), (CCode % 100));
70
                    dgvS.Rows.Add(strCode,
71
                                    CommonMotions.cnvString(objRec[1]),
72
                                    CommonMotions.cnvInt(objRec[2]),
73
                                    CommonMotions.cnvInt(objRec[3]));
74
                }
75
            }
76
            catch (Exception ex)
77
            {
78
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
79
            }
80
            finally
81
            {
82
                BaseDB.close(); BaseDB = null;
83
                if (dgvS.RowCount < s_GridDefaultLine) dgvS.RowCount += (s_GridDefaultLine - dgvS.RowCount);
84
                if (dgvD.RowCount < s_GridDefaultLine) dgvD.RowCount += (s_GridDefaultLine - dgvD.RowCount);
85
            }
86
        }
87
        #endregion
88

  
89
        #region データ取得SQL作成
90
        /// <summary>
91
        /// 表示用データ取得SQL作成
92
        /// </summary>
93
        private void CreateInitSQL(ref string strSQL)
94
        {
95
            try
96
            {
97
                // SQLにアクセス制限をかける
98
                string strSecurity = string.Empty;
99

  
100
                int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key;
101
                // ----- SQL作成
102
                // 存在詳細台帳データ検索
103
                strSQL = "SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING, A.TYINGFLG, C.CONSTRUCTIONCODE";
104
                strSQL += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B";
105
                strSQL += " LEFT JOIN CONSTRUCTIONLINK C ON C.FLUCTUATIONCODE = B.CONSTRUCTIONCODE";
106
                strSQL += string.Format(" WHERE TRUNC(A.CONSTRUCTIONCODE / 100) = {0}", CommonMotions.cnvTruncate(m_ConstructionCode / 100));
107
                strSQL += string.Format(" AND A.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
108
                strSQL += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
109
                strSQL += string.Format(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
110
                strSQL += " ORDER BY B.DETAILSTRING";
111

  
112
            }
113
            catch (Exception ex)
114
            {
115
                logger.ErrorFormat("システムエラー:{0}:{1}", ex.Message, strSQL);
116
            }
117
        }
118
        #endregion
119

  
120
        #region グリッドデータ選択
121
        /// <summary>
122
        /// グリッドデータ選択
123
        /// </summary>
124
        private void GridSelectData()
125
        {
126
            try
127
            {
128
                DataGridView dgvS = dgvSource;
129
                DataGridViewRow dgvSRow = dgvS.CurrentRow;
130

  
131
                DataGridView dgvD = dgvDestination;
132
                dgvD.Rows.Clear();
133

  
134
                int TyingFlg = CommonMotions.cnvInt(dgvSRow.Cells[2].Value);
135

  
136
                switch (TyingFlg)
137
                {
138
                    case (int)CommonDefine.BaseInfoTyingFlg.Standard:
139
                        // 0:独立データ
140
                    case (int)CommonDefine.BaseInfoTyingFlg.Tying:
141
                        // 2:紐付きデータ
142
                        MoveStandardData(dgvSRow);
143
                        break;
144
                    case (int)CommonDefine.BaseInfoTyingFlg.Parent:
145
                        // 1:親データ
146
                        MoveParentData(dgvSRow);
147
                        break;
148
                }
149
                if (dgvD.RowCount < s_GridDefaultLine) dgvD.RowCount += (s_GridDefaultLine - dgvD.RowCount);
150
            }
151
            catch (Exception ex)
152
            {
153
                logger.ErrorFormat("システムエラー:{0}", ex.Message);
154
            }
155
        }
156
        #endregion
157

  
158
        #region 通常データ移動
159
        /// <summary>
160
        /// 通常データ移動
161
        /// </summary>
162
        /// <param name="dgvSRow"></param>
163
        private void MoveStandardData(DataGridViewRow dgvSRow)
164
        {
165
            try
166
            {
167
                string ConstrCode = CommonMotions.cnvString(dgvSRow.Cells[0].Value);
168
                string ConstrName = CommonMotions.cnvString(dgvSRow.Cells[1].Value);
169

  
170
                DataGridView dgvD = dgvDestination;
171

  
172
                dgvD.Rows.Add(ConstrCode, ConstrName);
173

  
174
            }
175
            catch (Exception ex)
176
            {
177
                logger.ErrorFormat("システムエラー:{0}", ex.Message);
178
            }
179
        }
180
        #endregion
181

  
182
        #region 紐付き親データごとデータ移動
183
        /// <summary>
184
        /// 紐付き親データごとデータ移動
185
        /// </summary>
186
        /// <param name="dgvSRow"></param>
187
        private void MoveParentData(DataGridViewRow dgvSRow)
188
        {
189
            try
190
            {
191
                string sConstrCode = CommonMotions.cnvString(dgvSRow.Cells[0].Value);
192
                int iConstrCode = CommonMotions.cnvInt(sConstrCode.Replace("-", ""));
193
                string sConstrName = CommonMotions.cnvString(dgvSRow.Cells[1].Value);
194

  
195
                DataGridView dgvD = dgvDestination;
196

  
197
                dgvD.Rows.Add(sConstrCode, sConstrName);
198

  
199
                int iParentCode = 0;
200
                foreach (DataGridViewRow CurRow in dgvSource.Rows)
201
                {
202
                    iParentCode = CommonMotions.cnvInt(CurRow.Cells[3].Value);
203
                    if (iConstrCode != iParentCode) continue;
204

  
205
                    sConstrCode = CommonMotions.cnvString(CurRow.Cells[0].Value);
206
                    sConstrName = CommonMotions.cnvString(CurRow.Cells[1].Value);
207
                    dgvD.Rows.Add(sConstrCode, sConstrName);
208
                }
209
            }
210
            catch (Exception ex)
211
            {
212
                logger.ErrorFormat("システムエラー:{0}", ex.Message);
213
            }
214
        }
215
        #endregion
216

  
217
        #region 分割処理実行
218
        /// <summary>
219
        /// 分割処理実行
220
        /// </summary>
221
        private void SplitData()
222
        {
223
            IOConstructionBaseInfo DB01 = new IOConstructionBaseInfo();		        // 工事基本情報
224
            IOConstructionBaseInfoDetail DB02 = new IOConstructionBaseInfoDetail(); // 工事基本情報明細
225
            IOConstructionLink DB03 = new IOConstructionLink();                     // 工事増減情報
226
            IOProcessApproval DB04 = new IOProcessApproval();                       // 承認データ
227
            IOConstructionProgressDate DB05 = new IOConstructionProgressDate();     // 案件進捗日付データ
228
            IOEstimateData DB06 = new IOEstimateData();                             // 積算見積書データ
229
            IOEstimateDataBody DB07 = new IOEstimateDataBody();                     // 積算見積書ページデータ
230
            IOEstimateDataDetail DB08 = new IOEstimateDataDetail();                 // 積算見積書明細データ
231
            IOEstimateBudget DB09 = new IOEstimateBudget();                         // 積算予算書データ
232
            IOEstimateBudgetDetail DB10 = new IOEstimateBudgetDetail();             // 積算予算書明細データ
233
            IOConstructionBudget DB11 = new IOConstructionBudget();                 // 工事予算書データ
234
            IOOrdersPriceData DB12 = new IOOrdersPriceData();		                // 受注金額データ
235
            IOConstructionBudgetDetail DB13 = new IOConstructionBudgetDetail();     // 工事予算書明細データ
236
            IOConstructionLedger DB14 = new IOConstructionLedger();                 // 工事詳細台帳データ
237
            IOConstructionLedgerDetail DB15 = new IOConstructionLedgerDetail();     // 工事詳細台帳明細データ
238
            IOConstructionLedgerExcute DB16 = new IOConstructionLedgerExcute();     // 工事詳細台帳実行データ
239
            IOPurchaseOrder DB17 = new IOPurchaseOrder();			                // 注文書データ
240
            IOPurchaseOrderDetail DB18 = new IOPurchaseOrderDetail();               // 注文書明細データ
241
            try
242
            {
243
                // 工事番号を作成する
244
                int iConstrCode = CreateNewCode();
245
            }
246
            catch (Exception ex)
247
            {
248
                logger.ErrorFormat("システムエラー:{0}", ex.Message);
249
            }
250
            finally
251
            {
252
                DB01.close(); DB01 = null;
253
                DB02.close(); DB02 = null;
254
                DB03.close(); DB03 = null;
255
                DB04.close(); DB04 = null;
256
                DB05.close(); DB05 = null;
257
                DB06.close(); DB06 = null;
258
                DB07.close(); DB07 = null;
259
                DB08.close(); DB08 = null;
260
                DB09.close(); DB09 = null;
261
                DB10.close(); DB10 = null;
262
                DB11.close(); DB11 = null;
263
                DB12.close(); DB12 = null;
264
                DB13.close(); DB13 = null;
265
                DB14.close(); DB14 = null;
266
                DB15.close(); DB15 = null;
267
                DB16.close(); DB16 = null;
268
                DB17.close(); DB17 = null;
269
                DB18.close(); DB18 = null;
270
            }
271
        }
272
        #endregion
273

  
274
        #region 新規工事番号作成
275
        /// <summary>
276
        /// 新規工事番号作成
277
        /// </summary>
278
        /// <returns></returns>
279
        private int CreateNewCode()
280
        {
281
            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
282
            try
283
            {
284
                int PeriodValue = 0;
285
                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
286
                {   // ----- 営業期ベースの時
287
                    // 期数をセット
288
                    PeriodValue = CommonMotions.SystemMasterData.BusinessPeriod;
289
                }
290
                else
291
                {   // ----- 営業年度ベースの時
292

  
293
                    // 営業年をセット
294
                    PeriodValue = CommonMotions.SystemMasterData.ConstructionYear;
295
                }
296
                // 工事番号を作成する
297
                return BaseDB.CreateNewCounstructionCode(PeriodValue);
298
            }
299
            catch (Exception ex)
300
            {
301
                logger.ErrorFormat("システムエラー:{0}", ex.Message);
302
                return 0;
303
            }
304
            finally
305
            {
306
                BaseDB.close(); BaseDB = null;
307
            }
308
        }
309
        #endregion
310
    }
311
}
trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmVehicleSelector.Designer.cs
1
namespace ProcessManagement.Forms.SubForms
2
{
3
    partial class FrmVehicleSelector
4
    {
5
        /// <summary>
6
        /// Required designer variable.
7
        /// </summary>
8
        private System.ComponentModel.IContainer components = null;
9

  
10
        /// <summary>
11
        /// Clean up any resources being used.
12
        /// </summary>
13
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14
        protected override void Dispose(bool disposing)
15
        {
16
            if (disposing && (components != null))
17
            {
18
                components.Dispose();
19
            }
20
            base.Dispose(disposing);
21
        }
22

  
23
        #region Windows Form Designer generated code
24

  
25
        /// <summary>
26
        /// Required method for Designer support - do not modify
27
        /// the contents of this method with the code editor.
28
        /// </summary>
29
        private void InitializeComponent()
30
        {
31
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
33
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
34
            this.btnEnd = new System.Windows.Forms.Button();
35
            this.btnSelect = new System.Windows.Forms.Button();
36
            this.dgvMaster = new System.Windows.Forms.DataGridView();
37
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
38
            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
39
            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
40
            ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
41
            this.SuspendLayout();
42
            // 
43
            // btnEnd
44
            // 
45
            this.btnEnd.BackColor = System.Drawing.Color.Blue;
46
            this.btnEnd.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
47
            this.btnEnd.ForeColor = System.Drawing.Color.White;
48
            this.btnEnd.Location = new System.Drawing.Point(407, 238);
49
            this.btnEnd.Name = "btnEnd";
50
            this.btnEnd.Size = new System.Drawing.Size(120, 30);
51
            this.btnEnd.TabIndex = 3;
52
            this.btnEnd.Text = "終 了";
53
            this.btnEnd.UseVisualStyleBackColor = false;
54
            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
55
            // 
56
            // btnSelect
57
            // 
58
            this.btnSelect.BackColor = System.Drawing.Color.Green;
59
            this.btnSelect.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
60
            this.btnSelect.ForeColor = System.Drawing.Color.White;
61
            this.btnSelect.Location = new System.Drawing.Point(279, 238);
62
            this.btnSelect.Name = "btnSelect";
63
            this.btnSelect.Size = new System.Drawing.Size(120, 30);
64
            this.btnSelect.TabIndex = 2;
65
            this.btnSelect.Text = "選 択";
66
            this.btnSelect.UseVisualStyleBackColor = false;
67
            this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
68
            // 
69
            // dgvMaster
70
            // 
71
            this.dgvMaster.AllowUserToAddRows = false;
72
            this.dgvMaster.AllowUserToDeleteRows = false;
73
            this.dgvMaster.AllowUserToResizeColumns = false;
74
            this.dgvMaster.AllowUserToResizeRows = false;
75
            this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
76
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
77
            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
78
            dataGridViewCellStyle1.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold);
79
            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
80
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
81
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
82
            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
83
            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
84
            this.dgvMaster.ColumnHeadersHeight = 24;
85
            this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
86
            this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
87
            this.Column1,
88
            this.Column2,
89
            this.Column3});
90
            this.dgvMaster.Location = new System.Drawing.Point(7, 8);
91
            this.dgvMaster.Name = "dgvMaster";
92
            this.dgvMaster.RowHeadersVisible = false;
93
            this.dgvMaster.RowHeadersWidth = 20;
94
            this.dgvMaster.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
95
            this.dgvMaster.RowTemplate.Height = 20;
96
            this.dgvMaster.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
97
            this.dgvMaster.Size = new System.Drawing.Size(520, 226);
98
            this.dgvMaster.TabIndex = 0;
99
            this.dgvMaster.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellDoubleClick);
100
            // 
101
            // Column1
102
            // 
103
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
104
            dataGridViewCellStyle2.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
105
            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
106
            this.Column1.Frozen = true;
107
            this.Column1.HeaderText = "№";
108
            this.Column1.Name = "Column1";
109
            this.Column1.ReadOnly = true;
110
            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
111
            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
112
            this.Column1.Width = 60;
113
            // 
114
            // Column2
115
            // 
116
            this.Column2.Frozen = true;
117
            this.Column2.HeaderText = "車両コード";
118
            this.Column2.Name = "Column2";
119
            this.Column2.ReadOnly = true;
120
            this.Column2.Visible = false;
121
            this.Column2.Width = 5;
122
            // 
123
            // Column3
124
            // 
125
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
126
            dataGridViewCellStyle3.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
127
            this.Column3.DefaultCellStyle = dataGridViewCellStyle3;
128
            this.Column3.Frozen = true;
129
            this.Column3.HeaderText = "名   称";
130
            this.Column3.Name = "Column3";
131
            this.Column3.ReadOnly = true;
132
            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
133
            this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
134
            this.Column3.Width = 440;
135
            // 
136
            // FrmVehicleSelector
137
            // 
138
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
139
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
140
            this.BackColor = System.Drawing.Color.Black;
141
            this.ClientSize = new System.Drawing.Size(534, 271);
142
            this.Controls.Add(this.dgvMaster);
143
            this.Controls.Add(this.btnSelect);
144
            this.Controls.Add(this.btnEnd);
145
            this.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold);
146
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
147
            this.KeyPreview = true;
148
            this.MaximizeBox = false;
149
            this.MinimizeBox = false;
150
            this.Name = "FrmVehicleSelector";
151
            this.ShowIcon = false;
152
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
153
            this.Text = "車 両 選 択";
154
            this.Load += new System.EventHandler(this.FrmVehicleSelector_Load);
155
            ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).EndInit();
156
            this.ResumeLayout(false);
157

  
158
        }
159

  
160
        #endregion
161

  
162
        private System.Windows.Forms.Button btnEnd;
163
        private System.Windows.Forms.Button btnSelect;
164
        private System.Windows.Forms.DataGridView dgvMaster;
165
        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
166
        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
167
        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
168
    }
169
}
trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmVehicleSelector.cs
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Data;
5
using System.Drawing;
6
using System.Linq;
7
using System.Text;
8
using System.Windows.Forms;
9

  
10
using ProcessManagement.Common;
11
using ProcessManagement.DB.IOAccess;
12
using ProcessManagement.DataModel;
13
using ProcessManagement.Forms.CustomControls;
14
using ProcessManagement.Forms.ControlsAction;
15

  
16
namespace ProcessManagement.Forms.SubForms
17
{
18
    public partial class FrmVehicleSelector : Form
19
    {
20
        #region ログ使用定義
21
        //log4netログを使用する
22
        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
23
        #endregion
24

  
25
        #region 定数
26
        /// <summary>
27
        /// 表示カラム
28
        /// </summary>
29
        private enum GridCol
30
        {
31
            No = 0,
32
            VehicleCode,
33
            VehicleString,
34
        }
35
        #endregion
36

  
37
        #region 変数
38
        
39
        /// <summary>
40
        /// 車両番号
41
        /// </summary>
42
        private int m_VehicleCode = 0;
43
        
44
        /// <summary>
45
        /// 終了状態フラグ
46
        /// </summary>
47
        private DialogResult m_EndButton = DialogResult.Cancel;
48

  
49
        #endregion
50

  
51
        #region プロパティ
52
        /// <summary>
53
        /// 車両キー取得
54
        /// </summary>
55
        public int VehicleCode
56
        {
57
            get { return m_VehicleCode; }
58
        }
59

  
60
        /// <summary>
61
        /// 終了ボタン状態
62
        /// </summary>
63
        public DialogResult EndButton
64
        {
65
            get { return m_EndButton; }
66
        }
67

  
68
        #endregion
69

  
70
        #region コンストラクタ
71
        /// <summary>
72
        /// フォーム初期化
73
        /// </summary>
74
        public FrmVehicleSelector()
75
        {
76
            InitializeComponent();
77
        }
78
        #endregion
79

  
80
        #region フォームロード
81
        /// <summary>
82
        /// フォームロード
83
        /// </summary>
84
        /// <param name="sender"></param>
85
        /// <param name="e"></param>
86
        private void FrmVehicleSelector_Load(object sender, EventArgs e)
87
        {
88
            // 初期表示
89
            InitDataLoad();
90
            // フォームサイズ固定
91
            this.MaximizedBounds = new Rectangle(this.Left, this.Top, this.Width, this.Height);
92
        }
93
        #endregion
94

  
95
        #region 終了ボタン押下
96
        /// <summary>
97
        /// 終了ボタン押下
98
        /// </summary>
99
        /// <param name="sender"></param>
100
        /// <param name="e"></param>
101
        private void btnEnd_Click(object sender, EventArgs e)
102
        {
103
            m_EndButton = DialogResult.Cancel;
104
            Close();
105
        }
106
        #endregion
107

  
108
        #region 選択ボタン押下
109
        /// <summary>
110
        /// 選択ボタン押下
111
        /// </summary>
112
        /// <param name="sender"></param>
113
        /// <param name="e"></param>
114
        private void btnSelect_Click(object sender, EventArgs e)
115
        {
116
            DataGridView dgv = dgvMaster;
117
            DataGridViewRow CurRow = dgv.CurrentRow;
118

  
119
            if (CurRow.Index < 0)
120
            {
121
                MessageBox.Show("車両が選択されていません。", "車両選択", MessageBoxButtons.OK, MessageBoxIcon.Error);
122
                return;
123
            }
124
            m_VehicleCode = CommonMotions.cnvInt(CurRow.Cells[(int)GridCol.VehicleCode].Value);
125
            if (m_VehicleCode == 0) return;
126

  
127
            m_EndButton = DialogResult.OK;
128
            this.Close();
129
        }
130
        #endregion
131

  
132
        #region セルのダブルクリック時
133
        /// <summary>
134
        /// セルのダブルクリック時
135
        /// </summary>
136
        /// <param name="sender"></param>
137
        /// <param name="e"></param>
138
        private void dgvMaster_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
139
        {
140
            DataGridView dgv = dgvMaster;
141
            DataGridViewRow CurRow = dgv.CurrentRow;
142

  
143
            // 選択無しは処理しない
144
            if (e.RowIndex < 0) return;
145

  
146
            m_VehicleCode = CommonMotions.cnvInt(CurRow.Cells[(int)GridCol.VehicleCode].Value);
147
            if (m_VehicleCode == 0) return;
148

  
149
            m_EndButton = DialogResult.OK;
150
            this.Close();
151
        }
152
        #endregion
153

  
154
        #region 初期表示処理
155
        /// <summary>
156
        /// 初期表示処理
157
        /// </summary>
158
        private void InitDataLoad()
159
        {
160
            IOMVehicle vcDB = new IOMVehicle();
161
            try
162
            {
163
                dgvMaster.Rows.Clear();
164

  
165
                string strSQL = " WHERE VEHICLESCHEDULEFLG = 0 ORDER BY DISPLAYORDER";
166
                List<VehicleMaster> vcList = new List<VehicleMaster>();
167
                if (!vcDB.SelectAction(strSQL, ref vcList)) return;
168

  
169
                int no = 1;
170
                foreach (VehicleMaster vcRec in vcList)
171
                {
172
                    dgvMaster.Rows.Add(no++,
173
                                        vcRec.VehicleCode,
174
                                        vcRec.VehicleName);
175
                }
176
            }
177
            catch (Exception ex)
178
            {
179
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
180
            }
181
            finally
182
            {
183
                if (dgvMaster.RowCount < 10)
184
                {
185
                    dgvMaster.RowCount = 10;
186
                }
187
                vcDB.close(); vcDB = null;
188
            }
189
        }
190
        #endregion
191
    }
192
}
trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmVehicleSelector.resx
1
<?xml version="1.0" encoding="utf-8"?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
    <resheader name="version">2.0</resheader>
18
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of "resheader" rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
    <xsd:element name="root" msdata:IsDataSet="true">
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs="unbounded">
67
          <xsd:element name="metadata">
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
              </xsd:sequence>
72
              <xsd:attribute name="name" use="required" type="xsd:string" />
73
              <xsd:attribute name="type" type="xsd:string" />
74
              <xsd:attribute name="mimetype" type="xsd:string" />
75
              <xsd:attribute ref="xml:space" />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name="assembly">
79
            <xsd:complexType>
80
              <xsd:attribute name="alias" type="xsd:string" />
81
              <xsd:attribute name="name" type="xsd:string" />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name="data">
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
              </xsd:sequence>
90
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
              <xsd:attribute ref="xml:space" />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name="resheader">
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
              </xsd:sequence>
101
              <xsd:attribute name="name" type="xsd:string" use="required" />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name="resmimetype">
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name="version">
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name="reader">
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name="writer">
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
121
    <value>True</value>
122
  </metadata>
123
  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124
    <value>True</value>
125
  </metadata>
126
  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
127
    <value>True</value>
128
  </metadata>
129
</root>
trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj
121 121
    <Compile Include="Common\Process\ClsExcute.cs" />
122 122
    <Compile Include="Common\CommonDefine.cs" />
123 123
    <Compile Include="Common\Office\UsedWord.cs" />
124
    <Compile Include="DataModel\ContractSplit.cs" />
125 124
    <Compile Include="DataModel\ConstructionLink.cs" />
126 125
    <Compile Include="DataModel\OrdersPriceData.cs" />
127 126
    <Compile Include="DataModel\PersonDepartmentMaster.cs" />
......
151 150
    <Compile Include="DataModel\SubContractorJobILink.cs" />
152 151
    <Compile Include="DataModel\SuppliersMaster.cs" />
153 152
    <Compile Include="DataModel\SecurityMaster.cs" />
154
    <Compile Include="DB\IOAccess\IOContractSplit.cs" />
155 153
    <Compile Include="DB\IOAccess\IOConstructionLink.cs" />
156 154
    <Compile Include="DB\IOAccess\IOMPersonDepartment.cs" />
157 155
    <Compile Include="DB\IOAccess\IOMPersonSalary.cs" />
......
1258 1256
  </ItemGroup>
1259 1257
  <ItemGroup>
1260 1258
    <Folder Include="DB\SqlServerCompact\" />
1261
    <Folder Include="Forms\SystemFrm\" />
1262 1259
    <Folder Include="Utility\" />
1263 1260
  </ItemGroup>
1264 1261
  <ItemGroup>

他の形式にエクスポート: Unified diff