プロジェクト

全般

プロフィール

リビジョン 327

堀内ほぼ7年前に追加

未使用ソース削除
見積書表紙・請求書表紙印鑑印刷バグ修正
請求書Excelシートブック移動
セキュリティマスタ:手間業者支払一覧追加
請求まとめ:ソース一部修正

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 150;
17
        public static int s_SystemVersion = 151;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/DataModel/BuilderPersonData.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace ProcessManagement.DataModel
8
{
9
    /// <summary>
10
    /// 工事担当者データ
11
    /// </summary>
12
    public class BuilderPersonData
13
    {
14
        #region 定数
15
        /// <summary>
16
        /// 設定区分定義
17
        /// </summary>
18
        public enum DivisionDef
19
        {
20
            /// <summary>
21
            /// 1:指導員給料行
22
            /// </summary>
23
            Instructor = 1,
24
            /// <summary>
25
            /// 2:副担当者給料行
26
            /// </summary>
27
            Assistant,
28
            /// <summary>
29
            /// 3:担当者給料行
30
            /// </summary>
31
            Payroll,
32
        }
33
        #endregion
34

  
35
        #region メンバ変数
36
        private int         m_PersonCode = 0;               // 担当者コード
37
        private int         m_Division = 0;                 // 設定区分
38
        private DateTime    m_StartDate = DateTime.Now;     // 担当開始年月日
39
        private DateTime    m_CompDate = DateTime.Now;      // 担当終了年月日
40
        private DateTime    m_EntryDate = DateTime.Now;     // 登録日付
41
        private DateTime    m_UpdateDate = DateTime.Now;    // 更新日付
42
        #endregion
43

  
44
        #region コンストラクタ
45
        #endregion
46

  
47
        #region プロパティ
48
        /// <summary>
49
        /// 担当者コード
50
        /// </summary>
51
        public int PersonCode
52
        {
53
            get { return m_PersonCode; }
54
            set { m_PersonCode = value; }
55
        }
56

  
57
        /// <summary>
58
        /// 設定区分
59
        /// </summary>
60
        public int Division
61
        {
62
            get { return m_Division; }
63
            set { m_Division = value; }
64
        }
65

  
66
        /// <summary>
67
        /// 担当開始年月日
68
        /// </summary>
69
        public DateTime StartDate
70
        {
71
            get { return m_StartDate; }
72
            set { m_StartDate = value; }
73
        }
74

  
75
        /// <summary>
76
        /// 担当終了年月日
77
        /// </summary>
78
        public DateTime CompDate
79
        {
80
            get { return m_CompDate; }
81
            set { m_CompDate = value; }
82
        }
83

  
84
        /// <summary>
85
        /// 登録日付
86
        /// </summary>
87
        public DateTime EntryDate
88
        {
89
            set { m_EntryDate = value; }
90
            get { return m_EntryDate; }
91
        }
92
        /// <summary>
93
        /// 更新日付
94
        /// </summary>
95
        public DateTime UpdateDate
96
        {
97
            set { m_UpdateDate = value; }
98
            get { return m_UpdateDate; }
99
        }
100
        #endregion
101

  
102
    }
103
}
branches/src/ProcessManagement/ProcessManagement/DataModel/ConstrCharge.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace ProcessManagement.DataModel
8
{
9
    /// <summary>
10
    /// 工事担当者データ
11
    /// </summary>
12
    public class ConstrCharge
13
    {
14
        #region 定数
15
        /// <summary>
16
        /// 設定区分定義
17
        /// </summary>
18
        public enum DivisionDef
19
        {
20
            /// <summary>
21
            /// 1:指導員給料行
22
            /// </summary>
23
            Instructor = 1,
24
            /// <summary>
25
            /// 2:副担当者給料行
26
            /// </summary>
27
            Assistant,
28
            /// <summary>
29
            /// 3:担当者給料行
30
            /// </summary>
31
            Payroll,
32
        }
33
        #endregion
34

  
35
        #region メンバ変数
36
        private int         m_ConstructionCode = 0;             // 工事コード
37
        private int         m_Division = 0;                     // 設定区分
38
        private int         m_SeqNo = 0;                        // 連番
39
        private int         m_DepartmentCode = 0;               // 部署コード
40
        private int         m_PersonCode = 0;                   // 担当者コード
41
        private DateTime    m_StartDate = DateTime.MinValue;    // 担当開始年月日
42
        private DateTime    m_CompDate = DateTime.MinValue;     // 担当終了年月日
43
        private DateTime    m_EntryDate = DateTime.Now;         // 登録日付
44
        private DateTime    m_UpdateDate = DateTime.Now;        // 更新日付
45
        #endregion
46

  
47
        #region コンストラクタ
48
        #endregion
49

  
50
        #region プロパティ
51
        /// <summary>
52
        /// 工事コード
53
        /// </summary>
54
        public int ConstructionCode
55
        {
56
            get { return m_ConstructionCode; }
57
            set { m_ConstructionCode = value; }
58
        }
59

  
60
        /// <summary>
61
        /// 設定区分
62
        /// </summary>
63
        public int Division
64
        {
65
            get { return m_Division; }
66
            set { m_Division = value; }
67
        }
68

  
69
        /// <summary>
70
        /// 連番
71
        /// </summary>
72
        public int SeqNo
73
        {
74
            get { return m_SeqNo; }
75
            set { m_SeqNo = value; }
76
        }
77

  
78
        /// <summary>
79
        /// 部署コード
80
        /// </summary>
81
        public int DepartmentCode
82
        {
83
            get { return m_DepartmentCode; }
84
            set { m_DepartmentCode = value; }
85
        }
86

  
87
        /// <summary>
88
        /// 担当者コード
89
        /// </summary>
90
        public int PersonCode
91
        {
92
            get { return m_PersonCode; }
93
            set { m_PersonCode = value; }
94
        }
95

  
96
        /// <summary>
97
        /// 担当開始年月日
98
        /// </summary>
99
        public DateTime StartDate
100
        {
101
            get { return m_StartDate; }
102
            set { m_StartDate = value; }
103
        }
104

  
105
        /// <summary>
106
        /// 担当終了年月日
107
        /// </summary>
108
        public DateTime CompDate
109
        {
110
            get { return m_CompDate; }
111
            set { m_CompDate = value; }
112
        }
113

  
114
        /// <summary>
115
        /// 登録日付
116
        /// </summary>
117
        public DateTime EntryDate
118
        {
119
            set { m_EntryDate = value; }
120
            get { return m_EntryDate; }
121
        }
122
        /// <summary>
123
        /// 更新日付
124
        /// </summary>
125
        public DateTime UpdateDate
126
        {
127
            set { m_UpdateDate = value; }
128
            get { return m_UpdateDate; }
129
        }
130
        #endregion
131

  
132
    }
133
}
branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfo.cs
255 255

  
256 256
        #region メンバ変数
257 257

  
258
        private int m_ConstructionCode = 0;	                            // 工事コード
259
        private int m_TyingFlg = 0;                                     // 紐付データフラグ
260
        private int m_JoinFlg = 0;                                      // 結合契約工事フラグ
261
        private int m_ConstructionYear = 0;	                            // 工事年度
262
        private int m_ConstructionPeriod = 0;	                        // 工事期
263
        private DateTime m_RequestedDate = DateTime.MinValue;                // 依頼受け日
264
        private DateTime m_EstimatesSubmitDeadline = DateTime.MinValue;      // 見積提出期限
265
        private DateTime m_EstimatesSubmittedDate = DateTime.MinValue;       // 見積提出日
266
        private DateTime m_ProvisionalOrderDate = DateTime.MinValue;         // 仮受注日
267
        private DateTime m_OrderDate = DateTime.MinValue;	                // 受注日
268
        private DateTime m_OrderStartingDate = DateTime.MinValue;	        // 開始予定日
269
        private DateTime m_OrderCompletionDate = DateTime.MinValue;	        // 完了予定日
270
        private DateTime m_PreparationStartDate = DateTime.MinValue;         // 施工準備開始日
271
        private DateTime m_ConstructionStartingDate = DateTime.MinValue;	    // 施工開始日
272
        private DateTime m_ConstructionCompletionDate = DateTime.MinValue;   // 施工完了日
273
        private DateTime m_NonOrderDate = DateTime.MinValue;                 // 非受注日
274
        private double m_OrdersDecisionPrice = 0;	                        // 税抜受注決定金額
275
        private double m_OrdersDecisionPriceInTax = 0;	                    // 税込受注決定金額
276
        private int m_SalesPersonCode = 0;	                            // 営業担当者コード
277
        private int m_ConstructionPersonCode = 0;	                    // 工事担当者コード
278
        private int m_ConstrSubPersonCode = 0;	                        // 工事副担当者コード
279
        private int m_ConstructionInstructor = 0;                       // 工事指導員コード
280
        private int m_TransferConstruction = 0;                         // 移管先コード
281
        private DateTime m_TransferConstructionDate = DateTime.MinValue;     // 工事移管日
282
        private int m_OrderersDivision = 0;                             // 発注者区分
283
        private int m_OrderersCode = 0;                                 // 発注者コード
284
        private DateTime m_EstimatesExpirationDate = DateTime.MinValue;      // 見積有効期限
285
        private DateTime m_ConstructionPeriodStart = DateTime.MinValue;      // 契約工期開始
286
        private DateTime m_ConstructionPeriodEnd = DateTime.MinValue;        // 契約工期完了
287
        private DateTime m_ConstructionPeriodStart2 = DateTime.MinValue;     // 契約工期開始(延長時)
288
        private DateTime m_ConstructionPeriodEnd2 = DateTime.MinValue;       // 契約工期完了(延長時)
289
        private DateTime m_StartDate = DateTime.MinValue;	                // 工事開始日
290
        private DateTime m_EndDate = DateTime.MinValue;	                    // 工事終了日
291
        private DateTime m_PurchaseOrderMailingDate = DateTime.MinValue;     // 注文書郵送日
292
        private DateTime m_PurchaseOrderReturnDate = DateTime.MinValue;      // 注文書返送日
293
        private DateTime m_PurchaseOrderReturnCheckDate = DateTime.MinValue; // 注文書返送確認日
294
        private int m_ConsumptionTaxFlg = 1;                            // 消費税フラグ
295
        private int m_PrimeContractorFlg = 1;	                        // 元請フラグ
296
        private int m_SalesCostFlg = 1;	                                // 営業経費発生フラグ
297
        private int m_ConstructionStatusFlg = -1;	                    // 工事状態フラグ
298
        private int m_ConstructionType = 0;                             // 工事種別区分名称コード
299
        private int m_EstimateType = 1;                                 // 見積種別
300
        private DateTime m_BillingStartDate = DateTime.MinValue;	            // 請求準備開始日
301
        private DateTime m_BillingDate = DateTime.MinValue;	                // 請求日
302
        private int m_BillingSplitFlg = 1;                              // 請求回数フラグ
303
        private DateTime m_BillingSendDate = DateTime.MinValue;              // 請求書郵送/手渡し日
304
        private DateTime m_LedgerComplateDate = DateTime.MinValue;           // 工事詳細台帳入力完了日付
305
        private DateTime m_InspectPlanningDate = DateTime.MinValue;          // 検査予定日
306
        private DateTime m_InspectExecuteDate = DateTime.MinValue;           // 検査実行日
307
        private DateTime m_RevCompleteDate = DateTime.MinValue;              // 検査是正完了日
258
        private int         m_ConstructionCode = 0;	                            // 工事コード
259
        private int         m_TyingFlg = 0;                                     // 紐付データフラグ
260
        private int         m_JoinFlg = 0;                                      // 結合契約工事フラグ
261
        private int         m_ConstructionYear = 0;	                            // 工事年度
262
        private int         m_ConstructionPeriod = 0;	                        // 工事期
263
        private DateTime    m_RequestedDate = DateTime.MinValue;                // 依頼受け日
264
        private DateTime    m_EstimatesSubmitDeadline = DateTime.MinValue;      // 見積提出期限
265
        private DateTime    m_EstimatesSubmittedDate = DateTime.MinValue;       // 見積提出日
266
        private DateTime    m_ProvisionalOrderDate = DateTime.MinValue;         // 仮受注日
267
        private DateTime    m_OrderDate = DateTime.MinValue;	                // 受注日
268
        private DateTime    m_OrderStartingDate = DateTime.MinValue;	        // 開始予定日
269
        private DateTime    m_OrderCompletionDate = DateTime.MinValue;	        // 完了予定日
270
        private DateTime    m_PreparationStartDate = DateTime.MinValue;         // 施工準備開始日
271
        private DateTime    m_ConstructionStartingDate = DateTime.MinValue;	    // 施工開始日
272
        private DateTime    m_ConstructionCompletionDate = DateTime.MinValue;   // 施工完了日
273
        private DateTime    m_NonOrderDate = DateTime.MinValue;                 // 非受注日
274
        private double      m_OrdersDecisionPrice = 0;	                        // 税抜受注決定金額
275
        private double      m_OrdersDecisionPriceInTax = 0;	                    // 税込受注決定金額
276
        private int         m_SalesPersonCode = 0;	                            // 営業担当者コード
277
        private int         m_ConstructionPersonCode = 0;	                    // 工事担当者コード
278
        private int         m_ConstrSubPersonCode = 0;	                        // 工事副担当者コード
279
        private int         m_ConstructionInstructor = 0;                       // 工事指導員コード
280
        private int         m_TransferConstruction = 0;                         // 移管先コード
281
        private DateTime    m_TransferConstructionDate = DateTime.MinValue;     // 工事移管日
282
        private int         m_OrderersDivision = 0;                             // 発注者区分
283
        private int         m_OrderersCode = 0;                                 // 発注者コード
284
        private DateTime    m_EstimatesExpirationDate = DateTime.MinValue;      // 見積有効期限
285
        private DateTime    m_ConstructionPeriodStart = DateTime.MinValue;      // 契約工期開始
286
        private DateTime    m_ConstructionPeriodEnd = DateTime.MinValue;        // 契約工期完了
287
        private DateTime    m_ConstructionPeriodStart2 = DateTime.MinValue;     // 契約工期開始(延長時)
288
        private DateTime    m_ConstructionPeriodEnd2 = DateTime.MinValue;       // 契約工期完了(延長時)
289
        private DateTime    m_StartDate = DateTime.MinValue;	                // 工事開始日
290
        private DateTime    m_EndDate = DateTime.MinValue;	                    // 工事終了日
291
        private DateTime    m_PurchaseOrderMailingDate = DateTime.MinValue;     // 注文書郵送日
292
        private DateTime    m_PurchaseOrderReturnDate = DateTime.MinValue;      // 注文書返送日
293
        private DateTime    m_PurchaseOrderReturnCheckDate = DateTime.MinValue; // 注文書返送確認日
294
        private int         m_ConsumptionTaxFlg = 1;                            // 消費税フラグ
295
        private int         m_PrimeContractorFlg = 1;	                        // 元請フラグ
296
        private int         m_SalesCostFlg = 1;	                                // 営業経費発生フラグ
297
        private int         m_ConstructionStatusFlg = -1;	                    // 工事状態フラグ
298
        private int         m_ConstructionType = 0;                             // 工事種別区分名称コード
299
        private int         m_EstimateType = 1;                                 // 見積種別
300
        private DateTime    m_BillingStartDate = DateTime.MinValue;	            // 請求準備開始日
301
        private DateTime    m_BillingDate = DateTime.MinValue;	                // 請求日
302
        private int         m_BillingSplitFlg = 1;                              // 請求回数フラグ
303
        private DateTime    m_BillingSendDate = DateTime.MinValue;              // 請求書郵送/手渡し日
304
        private DateTime    m_LedgerComplateDate = DateTime.MinValue;           // 工事詳細台帳入力完了日付
305
        private DateTime    m_InspectPlanningDate = DateTime.MinValue;          // 検査予定日
306
        private DateTime    m_InspectExecuteDate = DateTime.MinValue;           // 検査実行日
307
        private DateTime    m_RevCompleteDate = DateTime.MinValue;              // 検査是正完了日
308 308

  
309
        private DateTime m_EntryDate = DateTime.Now;                         // 登録日付
310
        private DateTime m_UpdateDate = DateTime.Now;                        // 更新日付
309
        private DateTime    m_EntryDate = DateTime.Now;                         // 登録日付
310
        private DateTime    m_UpdateDate = DateTime.Now;                        // 更新日付
311 311

  
312 312
        #endregion
313 313

  
branches/src/ProcessManagement/ProcessManagement/DataModel/PersonInChargeMaster.cs
96 96

  
97 97

  
98 98
        private int         m_DeleteFlg = 0;                    // 削除フラグ
99
        private DateTime    m_EntryDate = DateTime.Now;    // 登録日付
100
        private DateTime    m_UpdateDate = DateTime.Now;   // 更新日付
99
        private DateTime    m_EntryDate = DateTime.Now;         // 登録日付
100
        private DateTime    m_UpdateDate = DateTime.Now;        // 更新日付
101 101
        #endregion
102 102

  
103 103
        #region コンストラクタ
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs
28 28
        /// </summary>
29 29
        private void InitializeComponent()
30 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 dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
37
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
38
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
39
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
40
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
41
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
42
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
43
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
31
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
32
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
33
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
37
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
38
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
39
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
40
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
41
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
42
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
43
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
44 44
            this.btnDataEntry = new System.Windows.Forms.Button();
45 45
            this.btnEnd = new System.Windows.Forms.Button();
46 46
            this.label1 = new System.Windows.Forms.Label();
......
251 251
            this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
252 252
            this.label3.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
253 253
            this.label3.ForeColor = System.Drawing.Color.Black;
254
            this.label3.Location = new System.Drawing.Point(739, 19);
254
            this.label3.Location = new System.Drawing.Point(747, 19);
255 255
            this.label3.Name = "label3";
256 256
            this.label3.Size = new System.Drawing.Size(120, 25);
257 257
            this.label3.TabIndex = 4;
......
341 341
            this.cmbConstructionPerson.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
342 342
            this.cmbConstructionPerson.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
343 343
            this.cmbConstructionPerson.FormattingEnabled = true;
344
            this.cmbConstructionPerson.Location = new System.Drawing.Point(867, 20);
344
            this.cmbConstructionPerson.Location = new System.Drawing.Point(875, 20);
345 345
            this.cmbConstructionPerson.Name = "cmbConstructionPerson";
346 346
            this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
347 347
            this.cmbConstructionPerson.TabIndex = 2;
......
376 376
            this.dgvMaster.AllowUserToDeleteRows = false;
377 377
            this.dgvMaster.AllowUserToResizeColumns = false;
378 378
            this.dgvMaster.AllowUserToResizeRows = false;
379
            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
380
            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
379
            dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
380
            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27;
381 381
            this.dgvMaster.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
382 382
            | System.Windows.Forms.AnchorStyles.Left) 
383 383
            | System.Windows.Forms.AnchorStyles.Right)));
384 384
            this.dgvMaster.BackgroundColor = System.Drawing.Color.White;
385 385
            this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
386
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
387
            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
388
            dataGridViewCellStyle2.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
389
            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
390
            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
391
            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
392
            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
393
            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
386
            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
387
            dataGridViewCellStyle28.BackColor = System.Drawing.SystemColors.Control;
388
            dataGridViewCellStyle28.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
389
            dataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.WindowText;
390
            dataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight;
391
            dataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
392
            dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
393
            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
394 394
            this.dgvMaster.ColumnHeadersHeight = 24;
395 395
            this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
396 396
            this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
......
405 405
            this.Column3,
406 406
            this.Column2,
407 407
            this.Column11});
408
            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
409
            dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window;
410
            dataGridViewCellStyle13.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
411
            dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText;
412
            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
413
            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
414
            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
415
            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle13;
408
            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
409
            dataGridViewCellStyle39.BackColor = System.Drawing.SystemColors.Window;
410
            dataGridViewCellStyle39.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
411
            dataGridViewCellStyle39.ForeColor = System.Drawing.SystemColors.ControlText;
412
            dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
413
            dataGridViewCellStyle39.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
414
            dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
415
            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle39;
416 416
            this.dgvMaster.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
417 417
            this.dgvMaster.EnableHeadersVisualStyles = false;
418 418
            this.dgvMaster.Location = new System.Drawing.Point(10, 103);
......
430 430
            // 
431 431
            // Column1
432 432
            // 
433
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
434
            this.Column1.DefaultCellStyle = dataGridViewCellStyle3;
433
            dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
434
            this.Column1.DefaultCellStyle = dataGridViewCellStyle29;
435 435
            this.Column1.Frozen = true;
436 436
            this.Column1.HeaderText = "№";
437 437
            this.Column1.Name = "Column1";
......
442 442
            // 
443 443
            // Column9
444 444
            // 
445
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
446
            this.Column9.DefaultCellStyle = dataGridViewCellStyle4;
445
            dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
446
            this.Column9.DefaultCellStyle = dataGridViewCellStyle30;
447 447
            this.Column9.Frozen = true;
448 448
            this.Column9.HeaderText = "営業部署";
449 449
            this.Column9.Name = "Column9";
......
453 453
            // 
454 454
            // Column5
455 455
            // 
456
            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
457
            this.Column5.DefaultCellStyle = dataGridViewCellStyle5;
456
            dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
457
            this.Column5.DefaultCellStyle = dataGridViewCellStyle31;
458 458
            this.Column5.Frozen = true;
459 459
            this.Column5.HeaderText = "営業担当者";
460 460
            this.Column5.Name = "Column5";
......
465 465
            // 
466 466
            // Column10
467 467
            // 
468
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
469
            this.Column10.DefaultCellStyle = dataGridViewCellStyle6;
468
            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
469
            this.Column10.DefaultCellStyle = dataGridViewCellStyle32;
470 470
            this.Column10.Frozen = true;
471 471
            this.Column10.HeaderText = "工事部署";
472 472
            this.Column10.Name = "Column10";
......
476 476
            // 
477 477
            // Column6
478 478
            // 
479
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
480
            this.Column6.DefaultCellStyle = dataGridViewCellStyle7;
479
            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
480
            this.Column6.DefaultCellStyle = dataGridViewCellStyle33;
481 481
            this.Column6.Frozen = true;
482 482
            this.Column6.HeaderText = "工事担当者";
483 483
            this.Column6.Name = "Column6";
......
488 488
            // 
489 489
            // Column4
490 490
            // 
491
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
492
            this.Column4.DefaultCellStyle = dataGridViewCellStyle8;
491
            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
492
            this.Column4.DefaultCellStyle = dataGridViewCellStyle34;
493 493
            this.Column4.Frozen = true;
494 494
            this.Column4.HeaderText = "工 事 名 称";
495 495
            this.Column4.Name = "Column4";
......
500 500
            // 
501 501
            // Column7
502 502
            // 
503
            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
504
            this.Column7.DefaultCellStyle = dataGridViewCellStyle9;
503
            dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
504
            this.Column7.DefaultCellStyle = dataGridViewCellStyle35;
505 505
            this.Column7.Frozen = true;
506 506
            this.Column7.HeaderText = "施工状態";
507 507
            this.Column7.Name = "Column7";
......
512 512
            // 
513 513
            // Column8
514 514
            // 
515
            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
516
            this.Column8.DefaultCellStyle = dataGridViewCellStyle10;
515
            dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
516
            this.Column8.DefaultCellStyle = dataGridViewCellStyle36;
517 517
            this.Column8.Frozen = true;
518 518
            this.Column8.HeaderText = "印刷";
519 519
            this.Column8.Name = "Column8";
......
524 524
            // 
525 525
            // Column3
526 526
            // 
527
            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
528
            this.Column3.DefaultCellStyle = dataGridViewCellStyle11;
527
            dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
528
            this.Column3.DefaultCellStyle = dataGridViewCellStyle37;
529 529
            this.Column3.Frozen = true;
530 530
            this.Column3.HeaderText = "営業期";
531 531
            this.Column3.Name = "Column3";
......
537 537
            // 
538 538
            // Column2
539 539
            // 
540
            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
541
            this.Column2.DefaultCellStyle = dataGridViewCellStyle12;
540
            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
541
            this.Column2.DefaultCellStyle = dataGridViewCellStyle38;
542 542
            this.Column2.Frozen = true;
543 543
            this.Column2.HeaderText = "工事コード";
544 544
            this.Column2.Name = "Column2";
......
567 567
            this.BackColor = System.Drawing.Color.Black;
568 568
            this.ClientSize = new System.Drawing.Size(1280, 657);
569 569
            this.Controls.Add(this.grpExample1);
570
            this.Controls.Add(this.ProgressBar);
571 570
            this.Controls.Add(this.btnDataCopy);
572 571
            this.Controls.Add(this.lblProcessTitil);
573 572
            this.Controls.Add(this.groupBox1);
......
576 575
            this.Controls.Add(this.btnDataEntry);
577 576
            this.Controls.Add(this.btnEnd);
578 577
            this.Controls.Add(this.dgvMaster);
578
            this.Controls.Add(this.ProgressBar);
579 579
            this.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
580 580
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
581 581
            this.KeyPreview = true;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstruction.cs
570 570
                ClearDisplay();
571 571

  
572 572
                // ?????\??
573
                InitDataLoad();
573
                DataLoadAll();
574 574

  
575 575
                // ?\???E???F?\??????
576 576
                InitApprovalDisplay();
......
1420 1420
            if (dTPCreateDate.Value != dtWork) dTPCreateDate.Value = dtWork;
1421 1421

  
1422 1422
            // ?w?????f?[?^????????
1423
            InitDataLoad();
1423
            DataLoadAll();
1424 1424
        }
1425 1425
        #endregion
1426 1426

  
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs
30 30
                m_GridWidth = dgvAllDisplay.Width;
31 31
                m_WindowWidth = this.Width;
32 32
                m_WindowHeight = this.Height;
33
                dTPCreateDate.Value = DateTime.Now.Date;
33 34
            }
34 35
            catch (Exception ex)
35 36
            {
......
791 792
        /// 初期時データ取得
792 793
        /// </summary>
793 794
        /// <returns>true:データ表示処理実行 false:データ無新規時</returns>
794
        private void InitDataLoad()
795
        private void DataLoadAll()
795 796
        {
796 797
            try
797 798
            {
......
802 803
                if (!DispHeader()) return;
803 804

  
804 805
                // データがある場合は表示を行う
805
                InitDispData();
806
                DetailDispData();
806 807
                
807 808
            }
808 809
            catch (Exception ex)
......
822 823
        /// 日報データ読込
823 824
        /// </summary>
824 825
        /// <returns></returns>
825
        private void InitDispData()
826
        private void DetailDispData()
826 827
        {
827 828
            try
828 829
            {
......
974 975
            IODailyDataDetail DetailDB = new IODailyDataDetail();
975 976
            try
976 977
            {
977
                DateTime MaxDate = GetFPNDataDate((int)ReadData.Final);
978
                if (MaxDate > dTPCreateDate.Value) return false;
978
                //DateTime MaxDate = GetFPNDataDate((int)ReadData.Final);
979
                //if (MaxDate > dTPCreateDate.Value) return false;
980
                DateTime MaxDate = GetFPNDataDate((int)ReadData.Previous);
979 981

  
980 982
                // 明細データ取得
981 983
                StringBuilder strSQL = new StringBuilder();
......
2882 2884
                dTPCreateDate.Value = dtWork;
2883 2885

  
2884 2886
                // データ表示
2885
                InitDataLoad();
2887
                DataLoadAll();
2886 2888

  
2887 2889
            }
2888 2890
            catch (System.Exception ex)
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimatePrint/FrmEstimatePrint.cs
31 31
        #endregion
32 32

  
33 33
        #region 定数
34
        #region 表示カラム
34 35
        /// <summary>
35 36
        /// 表示カラム
36 37
        /// </summary>
......
50 51
            LineTotal,
51 52
            Note,
52 53
        }
54
        #endregion
53 55

  
56
        #region 表示ラベル
54 57
        /// <summary>
55 58
        /// 表示ラベル
56 59
        /// </summary>
......
65 68
            ItemCount,
66 69
            WorkCount,
67 70
        }
71
        #endregion
68 72

  
73
        #region ボタンコントロール
69 74
        /// <summary>
70 75
        /// ボタンコントロール
71 76
        /// </summary>
......
76 81
            DataEntry,
77 82
            DataDelete,
78 83
        }
84
        #endregion
79 85

  
80 86
        /// <summary>
81 87
        /// グリッド幅サイズ
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimatePrint/FrmEstimatePrintAuxiliary.cs
496 496
                strSQLSeal.Append(paDB.CreatePrimarykeyString(m_ConstructionCode, (int)ClsExcute.ApprovalListNo.EstimateApproval, CommonDefine.s_Default_OrderNo));
497 497
                strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE");
498 498
                strSQLSeal.Append(" AND C.SECCODE = B.SECCODE");
499
                strSQLSeal.Append(" Order By B.SECURITYMANAGEMENT ASC");
499
                strSQLSeal.Append(" Order By C.SecRank ASC");
500 500
                if (!paDB.ExecuteReader(strSQLSeal.ToString(), ref arlist)) return;
501 501

  
502 502
                // 印刷テーブル作成
......
516 516
                    PersonInChargeMaster PersonRec = new PersonInChargeMaster();
517 517
                    picDB.Reader2Struct(readObj, ref PersonRec);
518 518

  
519
                    bool SelData = false;
520

  
521 519
                    // セキュリティデータチェック
522

  
523 520
                    int SecRank = CommonMotions.cnvInt(readObj[PersonDataCnt]);
524 521
                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // 特別権限
525 522
                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // 統括者権限
526 523
                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // 所属長権限
527 524

  
528
                    // 最高責任者・統括責任者・所属長かどうかを調べる
529
                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
530
                        || SecRank == CommonDefine.SecurityRankList[SRank].Key
525
                    // 担当者以外は役職がある
526
                    if (SecRank == CommonDefine.SecurityRankList[SRank].Key
531 527
                        || SecRank == CommonDefine.SecurityRankList[FRank].Key
532 528
                        || SecRank == CommonDefine.SecurityRankList[LRank].Key)
533 529
                    {
534
                        SelData = true;
535
                    }
536

  
537
                    if (SelData)
538
                    {
539 530
                        // コードと名前と役職を取得する
540 531
                        PorsonCode[i] = PersonRec.PersonCode;
541 532
                        NameTable[i] = PersonRec.SealPrintName;
542
                        OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
543 533
                        // 7文字以上は文字が見えないので省略
544
                        if (OrderOfPrecedenceTable[i].Length > 7) OrderOfPrecedenceTable[i] = OrderOfPrecedenceTable[i].Substring(0, 7);
534
                        if (PersonRec.DisplayString.Length > 7)
535
                        {
536
                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString.Substring(0, 7);
537
                        }
538
                        else if (PersonRec.DisplayString.Length < 1)
539
                        {
540
                            OrderOfPrecedenceTable[i] = "担 当";
541
                        }
542
                        else
543
                        {
544
                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
545
                        }
545 546
                    }
546 547
                    else
547 548
                    {   // 担当者
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmEntryDeposit.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.Threading.Tasks;
9
using System.Windows.Forms;
10
using ProcessManagement.DataModel;
11
using ProcessManagement.Common;
12
using ProcessManagement.Forms.SubForms;
13
using System.Collections;
14
using ProcessManagement.DB.IOAccess;
15

  
16
using System.Diagnostics;
17
using System.Threading;
18
using System.Text.RegularExpressions;
19

  
20
using log4net;
21
using log4net.Appender;
22
using log4net.Repository.Hierarchy;
23

  
24
using ProcessManagement.DB.Core;
25
using ProcessManagement.Forms.Master;
26
using ProcessManagement.Forms.CustomControls;
27
using ProcessManagement.Forms.ControlsAction;
28

  
29
namespace ProcessManagement.Forms.DataEntry.Request
30
{
31
    public partial class FrmEntryDeposit : Form
32
    {
33
        #region ログ使用定義
34
        //log4netログを使用する
35
        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
36
        #endregion
37

  
38
        #region 変数
39
        /// <summary>
40
        /// 入金データ
41
        /// </summary>
42
        private DepositData m_DepositData = new DepositData();
43

  
44
        /// <summary>
45
        /// 編集前のセルの内容
46
        /// </summary>
47
        private string oldCellValue = "";
48

  
49
        private List<DepositList> Dlist;
50
        private bool isDirty = false;
51

  
52
        #endregion
53

  
54
        #region 定数
55
        private const long amount_max = 9999999999;             // 金額最大
56
        private const long amount_min = -9999999999;            // 金額最小
57
        #endregion
58

  
59
        #region 入金情報クラス定義
60
        /// <summary>
61
        /// 入金情報
62
        /// </summary>
63
        private class DepositList
64
        {
65
            public int orderersDivision;
66
            public int orderersCode;
67
            public int targetDate;
68
            public int seqNo;
69
            public string depositDate;
70
            public long depositAmount;
71
            public long depositAmountCash;
72
            public long depositAmountBill;
73
            public int depositPersonCode;
74
            public string personName;
75
            public string note;
76

  
77
            public int AddEdit = 0;
78
        }
79
        #endregion
80

  
81
        #region 取得するデータ項目
82
        /// <summary>
83
        /// 取得するデータ項目
84
        /// </summary>
85
        private enum GetData
86
        {
87
            orderersName = 0,
88
            orderersDivision,
89
            orderersCode,
90
            targetDate,
91
            seqNo,
92
            depositDate,
93
            depositAmount,
94
            depositAmountCash,
95
            depositAmountBill,
96
            depositPersonCode,
97
            personName,
98
            note,
99
        }
100
        #endregion
101

  
102
        #region カラム追加用
103
        /// <summary>
104
        /// カラム追加用
105
        /// </summary>
106
        private enum DispColumn
107
        {
108
            orderersDivision = 0,
109
            orderersCode,
110
            targetDate,
111
            seqNo,
112
            BusinessPeriod,
113
            depositDate,
114
            depositAmount,
115
            depositAmountCash,
116
            depositAmountBill,
117
            depositPersonCode,
118
            personName,
119
            note,
120
        }
121
        #endregion
122

  
123
        #region プロパティ
124
        /// <summary>
125
        /// 入金データ
126
        /// </summary>
127
        public DepositData depositdata
128
        {
129
            get { return m_DepositData; }
130
            set { m_DepositData = value; }
131
        }
132

  
133
        #endregion
134

  
135
        #region コンストラクタ
136
        public FrmEntryDeposit()
137
        {
138
            InitializeComponent();
139
        }
140
        #endregion
141

  
142
        #region フォームロード
143
        /// <summary>
144
        /// フォームロード
145
        /// </summary>
146
        /// <param name="sender"></param>
147
        /// <param name="e"></param>
148
        private void FrmEntryDeposit_Load(object sender, EventArgs e)
149
        {
150
            //フォームサイズ固定
151
            this.MaximizedBounds = new Rectangle(this.Left, this.Top, this.Width, this.Height);
152
            // 初期表示
153
            InitDataLoad();
154
        }
155
        #endregion
156

  
157
        #region 初期表示処理
158
        /// <summary>
159
        /// 初期表示処理
160
        /// </summary>
161
        private void InitDataLoad()
162
        {
163
            try
164
            {
165
                var Dep = SelectDepositData().OfType<object[]>();
166
                Dlist = new List<DepositList>();
167

  
168
                // 取得情報をリストに入れる
169
                foreach (var orderer in Dep)
170
                {
171
                    var o = new DepositList();
172

  
173
                    string orderersName = CommonMotions.cnvString(orderer[(int)GetData.orderersName]);
174
                    if (orderersName != null)
175
                    {
176
                        OrderersName.Text = orderersName;
177
                    }
178
                    o.orderersDivision = CommonMotions.cnvInt(orderer[(int)GetData.orderersDivision]);
179
                    o.orderersCode = CommonMotions.cnvInt(orderer[(int)GetData.orderersCode]);
180
                    o.targetDate = CommonMotions.cnvInt(orderer[(int)GetData.targetDate]);
181
                    o.seqNo = CommonMotions.cnvInt(orderer[(int)GetData.seqNo]);
182
                    o.depositDate = CommonMotions.cnvString(orderer[(int)GetData.depositDate]);
183
                    o.depositAmount = CommonMotions.cnvInt(orderer[(int)GetData.depositAmount]);
184
                    o.depositAmountCash = CommonMotions.cnvInt(orderer[(int)GetData.depositAmountCash]);
185
                    o.depositAmountBill = CommonMotions.cnvInt(orderer[(int)GetData.depositAmountBill]);
186
                    o.depositPersonCode = CommonMotions.cnvInt(orderer[(int)GetData.depositPersonCode]);
187
                    o.personName = CommonMotions.cnvString(orderer[(int)GetData.personName]);
188
                    o.note = CommonMotions.cnvString(orderer[(int)GetData.note]);
189
                    o.AddEdit = 0;
190

  
191
                    Dlist.Add(o);
192
                }
193

  
194
                // 一覧表示
195
                Display();
196

  
197
            }
198
            catch (Exception ex)
199
            {
200
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
201
            }
202
        }
203
        #endregion
204

  
205
        #region 入金データを取得する
206
        /// <summary>
207
        /// 入金データを取得する
208
        /// </summary>
209
        /// <returns></returns>
210
        private ArrayList SelectDepositData()
211
        {
212
            var Dep = new IODepositData();
213
            int Od = depositdata.OrderersDivision;
214
            int Oc = depositdata.OrderersCode;
215
            string Tg = depositdata.TargetDate;
216

  
217
            try
218
            {
219
                var sql = new StringBuilder();
220
                sql.Append(" ( ");
221
                sql.Append("  SELECT ");
222
                sql.Append("   CONCAT(OrderersName1, ' ', OrderersName2) AS ORDERERSNAME ");
223
                sql.Append("   , ORDERCOTEGORY AS ORDERERSDIVISION ");
224
                sql.Append("   , ORDERERSCODE AS ORDERERSCODE ");
225
                sql.AppendFormat("   , {0} AS TARGETDATE ", Tg);
226
                sql.Append("   , NULL AS SEQNO ");
227
                sql.Append("   , NULL AS DEPOSITDATE ");
228
                sql.Append("   , NULL AS DEPOSITAMOUNT ");
229
                sql.Append("   , NULL AS DEPOSITAMOUNTCASH ");
230
                sql.Append("   , NULL AS DEPOSITAMOUNTBILL ");
231
                sql.Append("   , NULL AS DEPOSITPERSONCODE ");
232
                sql.Append("   , NULL AS PERSONNAME ");
233
                sql.Append("   , NULL AS NOTE ");
234
                sql.Append("  FROM ");
235
                sql.Append("   ORDERERSMASTER ");
236
                sql.Append("  WHERE ");
237
                sql.AppendFormat("   ORDERCOTEGORY = {0} ", Od);
238
                sql.AppendFormat("  AND ORDERERSCODE = {0} ", Oc);
239
                sql.Append(" ) ");
240
                sql.Append(" UNION ");
241
                sql.Append(" ( ");
242
                sql.Append("  SELECT ");
243
                sql.Append("   NULL AS ORDERERSNAME ");
244
                sql.Append("   , DEP.ORDERERSDIVISION ");
245
                sql.Append("   , DEP.ORDERERSCODE ");
246
                sql.Append("   , DEP.TARGETDATE ");
247
                sql.Append("   , DEP.SEQNO ");
248
                sql.Append("   , DATE_FORMAT(DEP.DEPOSITDATE, '%m/%d') AS DEPOSITDATE");
249
                sql.Append("   , DEP.DEPOSITAMOUNT ");
250
                sql.Append("   , DEP.DEPOSITAMOUNTCASH ");
251
                sql.Append("   , DEP.DEPOSITAMOUNTBILL ");
252
                sql.Append("   , DEP.DEPOSITPERSONCODE ");
253
                sql.Append("   , PICM.SEALPRINTNAME AS PERSONNAME");
254
                sql.Append("   , DEP.NOTE ");
255
                sql.Append("  FROM ");
256
                sql.Append("   DEPOSITDATA AS DEP ");
257
                sql.Append("   LEFT OUTER JOIN PERSONINCHARGEMASTER PICM ON ");
258
                sql.Append("    PICM.PERSONCODE = DEP.DEPOSITPERSONCODE ");
259
                sql.AppendFormat("  WHERE ORDERERSDIVISION ={0} ", Od);
260
                sql.AppendFormat("   AND ORDERERSCODE = {0} ", Oc);
261
                sql.AppendFormat("   AND TARGETDATE = {0} ", Tg);
262
                sql.Append(" ) ");
263
                sql.Append(" ORDER BY ");
264
                sql.Append(" ORDERERSNAME ");
265
                sql.Append(" ,SEQNO ");
266
                sql.Append(" ; ");
267

  
268
                var data = new ArrayList();
269
                if (!Dep.ExecuteReader(sql.ToString(), ref data)) return new ArrayList();
270
                return data;
271
            }
272
            catch (Exception ex)
273
            {
274
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
275
                return new ArrayList();
276
            }
277
            finally
278
            {
279
                Dep.close();
280
                Dep = null;
281
            }
282
        }
283
        #endregion
284

  
285
        #region 一覧表示
286
        /// <summary>
287
        /// 一覧表示
288
        /// </summary>
289
        private void Display()
290
        {
291
            try
292
            {
293
                for (var i = 0; i < Dlist.Count; i++)
294
                {
295
                    dgv1.Rows.Add();
296
                    dgv1.Rows[i].Cells[(int)DispColumn.orderersDivision].Value = Dlist[i].orderersDivision;
297
                    dgv1.Rows[i].Cells[(int)DispColumn.orderersCode].Value = Dlist[i].orderersCode;
298
                    dgv1.Rows[i].Cells[(int)DispColumn.targetDate].Value = Dlist[i].targetDate;
299
                    dgv1.Rows[i].Cells[(int)DispColumn.depositDate].Value = Dlist[i].depositDate;
300
                    dgv1.Rows[i].Cells[(int)DispColumn.BusinessPeriod].Value = CommonMotions.SystemMasterData.BusinessPeriod;
301
                    SetPrice(dgv1.Rows[i].Cells, (int)DispColumn.depositAmount, Dlist[i].depositAmountCash + Dlist[i].depositAmountBill);
302
                    SetPrice(dgv1.Rows[i].Cells, (int)DispColumn.depositAmountCash, Dlist[i].depositAmountCash);
303
                    SetPrice(dgv1.Rows[i].Cells, (int)DispColumn.depositAmountBill, Dlist[i].depositAmountBill);
304

  
305
                    if (Dlist[i].depositPersonCode != 0)
306
                    {
307
                        dgv1.Rows[i].Cells[(int)DispColumn.seqNo].Value = Dlist[i].seqNo;
308
                        dgv1.Rows[i].Cells[(int)DispColumn.depositPersonCode].Value = Dlist[i].depositPersonCode;
309
                        dgv1.Rows[i].Cells[(int)DispColumn.personName].Value = Dlist[i].personName;
310
                        dgv1.Rows[i].Cells[(int)DispColumn.personName].Style.ForeColor = Color.Red;
311
                    }
312
                    else
313
                    {
314
                        dgv1.Rows[i].Cells[(int)DispColumn.seqNo].Value = i;
315
                        dgv1.Rows[i].Cells[(int)DispColumn.depositPersonCode].Value = CommonMotions.LoginUserData.PersonCode;
316
                        dgv1.Rows[i].Cells[(int)DispColumn.personName].Value = CommonMotions.LoginUserData.SealPrintName;
317
                        dgv1.Rows[i].Cells[(int)DispColumn.personName].Style.ForeColor = Color.Gray;
318
                    }
319
                    dgv1.Rows[i].Cells[(int)DispColumn.note].Value = Dlist[i].note;
320
                }
321
            }
322
            catch (Exception ex)
323
            {
324
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
325
            }
326
        }
327
        #endregion
328

  
329
        #region 金額の設定
330
        /// <summary>
331
        /// 金額の設定
332
        /// </summary>
333
        /// <param name="cells"></param>
334
        /// <param name="index"></param>
335
        /// <param name="price"></param>
336
        private void SetPrice(DataGridViewCellCollection cells, int index, long price)
337
        {
338
            try
339
            {
340
                cells[index].Value = price.ToString("#,0");
341
                cells[index].Style.ForeColor = Color.Black;
342
                if (price < 0)
343
                {
344
                    cells[index].Style.ForeColor = Color.Red;
345
                }
346
            }
347
            catch (Exception ex)
348
            {
349
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
350
            }
351
        }
352
        #endregion
353

  
354
        #region セル編集開始
355
        /// <summary>
356
        /// セル編集開始
357
        /// </summary>
358
        /// <param name="sender"></param>
359
        /// <param name="e"></param>
360
        private void dgv1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
361
        {
362
            dgv1.CellBeginEdit -= dgv1_CellBeginEdit;
363
            dgv1.CellValueChanged -= dgv1_CellValueChanged;
364

  
365
            int tcol = e.ColumnIndex;
366
            int trow = e.RowIndex;
367

  
368
            try
369
            {                    
370

  
371
                if(tcol == (int)DispColumn.depositAmountCash ||
372
                   tcol == (int)DispColumn.depositAmountBill ||
373
                   tcol == (int)DispColumn.depositDate)
374
                {
375
                    // 数字系の時はIMEモードをオフにする
376
                    dgv1.ImeMode = System.Windows.Forms.ImeMode.Off;
377
                }
378
                else if (tcol == (int)DispColumn.note)
379
                {
380
                    // 備考欄のときはIMEモードをオンにする
381
                    dgv1.ImeMode = System.Windows.Forms.ImeMode.Hiragana;
382
                }
383
                if ((tcol == (int)DispColumn.depositAmountCash) ||
384
                (tcol == (int)DispColumn.depositAmountBill))
385
                {
386
                    string val;
387

  
388
                    // セルに値が格納されている場合
389
                    if (dgv1[tcol, trow].Value != null)
390
                    {
391
                        // カンマ区切りを解除
392
                        val = dgv1[tcol, trow].Value.ToString().Replace(",", string.Empty);
393
                    }
394
                    else
395
                    {
396
                        // 0を入力
397
                        val = "0";
398
                    }
399
                    dgv1[tcol, trow].Value = val;
400

  
401
                    // 文字色は一律黒
402
                    dgv1[tcol, trow].Style.ForeColor = Color.Black;
403
                }
404
                dgv1.CellBeginEdit += dgv1_CellBeginEdit;
405
                dgv1.CellValueChanged += dgv1_CellValueChanged;
406
            }
407
            catch (Exception ex)
408
            {
409
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
410
            }
411
        }
412
        #endregion
413

  
414
        #region セルフォーカス取得
415
        /// <summary>
416
        /// セル編集開始時のイベント
417
        /// </summary>
418
        /// <param name="sender"></param>
419
        /// <param name="e"></param>
420
        private void dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
421
        {
422
            try
423
            {
424
                if (dgv1.RowCount == 0)
425
                {
426
                    return;
427
                }
428
                oldCellValue = CommonMotions.cnvString(dgv1[e.ColumnIndex, e.RowIndex].Value);
429

  
430
            }
431
            catch (Exception ex)
432
            {
433
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
434
            }
435
        }
436
        #endregion
437

  
438
        #region セル編集完了時のイベント
439
        /// <summary>
440
        /// セル編集完了時のイベント
441
        /// </summary>
442
        /// <param name="sender"></param>
443
        /// <param name="e"></param>
444
        private void dgv1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
445
        {
446
            dgv1.CellEnter -= dgv1_CellEnter;
447
            dgv1.CellValueChanged -= dgv1_CellValueChanged;
448

  
449
            try
450
            {
451

  
452
                // 行が追加されたときではなく、セルの内容が変更されているときだけ処理を実行する。また金額以外の変更は処理を抜ける。
453
                if (e.RowIndex == dgv1.NewRowIndex ||
454
                    !dgv1.IsCurrentCellDirty //||
455
                    //e.ColumnIndex == (int)DispColumn.depositAmountBill ||
456
                    //e.ColumnIndex != (int)DispColumn.depositAmountCash
457
                    )
458
                {
459
                    return;
460
                }
461

  
462
                // 行がなければそのまま返す
463
                if (dgv1.RowCount == 0)
464
                {
465
                    return;
466
                }
467

  
468
                var cells = dgv1.Rows[e.RowIndex].Cells;
469
                var cellValue = CommonMotions.cnvString(cells[e.ColumnIndex].Value);
470

  
471
                // 値が変わっていなければそのまま返す
472
                if (oldCellValue == cellValue)
473
                {
474
                    return;
475
                }
476
                try
477
                {
478
                    // 日付の自動編集
479
                    if (dgv1.Rows[e.RowIndex].Cells[e.ColumnIndex].ColumnIndex == (int)DispColumn.depositDate)
480
                    {
481
                        string txtbox = dgv1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
482

  
483
                        // 日付をyyyy/mm/dd形式で表示する
484
                        if (txtbox.Length == 0)
485
                        {
486
                            return;
487
                        }
488

  
489
                        // 文字の出現回数カウント
490
                        if (CommonMotions.chkNumeric(txtbox))
491
                        {   // 数字のみ入力
492
                            if (txtbox.ToString().Length <= 4)
493
                            {
494
                                txtbox = CommonMotions.cnvInt(txtbox.Substring(0, 2)).ToString("00")
495
                                    + "/" + CommonMotions.cnvInt(txtbox.Substring(2)).ToString("00");
496
                            }
497
                        }
498
                        else
499
                        {   // 99/99の入力
500
                            if (txtbox.ToString().Length <= 5)
501
                            {
502
                                txtbox = CommonMotions.cnvInt(txtbox.Substring(0, txtbox.IndexOf("/"))).ToString("00")
503
                                                + "/" + CommonMotions.cnvInt(txtbox.Substring(txtbox.IndexOf("/") + 1)).ToString("00");
504

  
505
                            }
506
                        }
507

  
508
                        if (!CommonMotions.chkDate(txtbox.ToString()))
509
                        {
510
                            throw new Exception();
511
                        }
512

  
513
                        dgv1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = txtbox.ToString();
514
                        cellValue = txtbox.ToString();
515
                    }
516
                }
517
                catch(Exception ex)
518
                {
519
                    logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
520
                    MessageBox.Show("入金日の値が不正です", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
521
                    dgv1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = "";
522
                }
523

  
524
                // 入金情報を編集
525
                if (e.ColumnIndex == (int)DispColumn.depositAmountCash
526
                    || e.ColumnIndex == (int)DispColumn.depositAmountBill
527
                    || e.ColumnIndex == (int)DispColumn.depositDate
528
                    || e.ColumnIndex == (int)DispColumn.note)
529
                {
530
                    switch (e.ColumnIndex)
531
                    {
532
                        case (int)DispColumn.depositAmountCash:
533
                            if (cellValue != "")
534
                                Dlist[e.RowIndex].depositAmountCash = (int)CommonMotions.cnvLong(cellValue);
535
                            else
536
                                Dlist[e.RowIndex].depositAmountCash = 0;
537
                            break;
538
                        case (int)DispColumn.depositAmountBill:
539
                            if (cellValue != "")
540
                                Dlist[e.RowIndex].depositAmountBill = (int)CommonMotions.cnvLong(cellValue);
541
                            else
542
                                Dlist[e.RowIndex].depositAmountBill = 0;
543
                            break;
544
                        case (int)DispColumn.depositDate:
545
                            DateTime dt;
546
                            if (DateTime.TryParse(cellValue, out dt))
547
                                Dlist[e.RowIndex].depositDate = dt.ToString("yyyy/MM/dd");
548
                            else
549
                                Dlist[e.RowIndex].depositDate = "";
550
                            break;
551
                        case (int)DispColumn.note:
552
                            if (cellValue != "")
553
                                Dlist[e.RowIndex].note = CommonMotions.cnvString(cellValue);
554
                            else
555
                                Dlist[e.RowIndex].note = "";
556
                            break;
557
                    }
558

  
559
                    if (dgv1.Rows[e.RowIndex].Cells[(int)DispColumn.seqNo].Value == null)
560
                    {
561
                        return;
562
                    }
563
                    int seqno = (int)dgv1.Rows[e.RowIndex].Cells[(int)DispColumn.seqNo].Value + 1;
564
                    if (seqno == Dlist.Count)
565
                    {
566
                        Dlist[e.RowIndex].AddEdit = 1;
567
                        isDirty = true;
568
                    }
569
                    else
570
                    {
571
                        Dlist[e.RowIndex].AddEdit = 2;
572
                        isDirty = true;
573
                    }
574
                }
575
            }
576
            catch (Exception ex)
577
            {
578
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
579
            }
580
            finally
581
            {
582
                dgv1.CellEnter += dgv1_CellEnter;
583
                dgv1.CellValueChanged += dgv1_CellValueChanged;
584
            }
585
        }
586
        #endregion
587

  
588
        #region 金額セル検証
589
        /// <summary>
590
        /// 金額セル検証
591
        /// </summary>
592
        /// <param name="sender"></param>
593
        /// <param name="e"></param>
594
        private void dgv1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
595
        {
596
            int tcol = e.ColumnIndex;
597
            int trow = e.RowIndex;
598

  
599
            if (trow == -1)
600
            {
601
                return;
602
            }
603

  
604
            try
605
            {
606
                if ((tcol == (int)DispColumn.depositAmountCash) ||              // 入金金額(振込)
607
                   (tcol == (int)DispColumn.depositAmountBill))                // 入金金額(手形)
608
                {
609
                    // カンマは一旦削除して文字列を取得
610
                    string str = e.FormattedValue.ToString().Replace(",", string.Empty);
611

  
612
                    // 不要な空白は削除
613
                    str.Trim();
614

  
615
                    // 値が未設定の場合は0とする
616
                    if (str == "")
617
                    {
618
                        str = "0";
619
                    }
620

  
621
                    long n = 0;
622

  
623
                    if (long.TryParse(str, out n) == true)
624
                    {
625
                        if ((n > amount_max) || (n < amount_min))
626
                        {
627
                            MessageBox.Show("金額が登録可能範囲(-9,999,999,999~9,999,999,999)を超えました。", "入力エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
628
                            e.Cancel = true;
629
                        }
630
                    }
631
                    else
632
                    {
633
                        MessageBox.Show("金額を入力してください", "入力エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
634
                        e.Cancel = true;
635
                    }
636
                }
637
                return;
638
            }
639
            catch (Exception ex)
640
            {
641
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
642
            }
643
        }
644
        #endregion
645

  
646
        #region セルフォーマッティング
647
        /// <summary>
648
        /// セルフォーマッティング
649
        /// </summary>
650
        /// <param name="sender"></param>
651
        /// <param name="e"></param>
652
        private void dgv1_CellFormatting_1(object sender, DataGridViewCellFormattingEventArgs e)
653
        {
654
            DataGridView dgv = (DataGridView)sender;
655

  
656
            try
657
            {
658
                if (dgv.RowCount == 0)
659
                    return;
660

  
661
                if (e.ColumnIndex == (int)DispColumn.depositAmountBill ||
662
                    e.ColumnIndex == (int)DispColumn.depositAmountCash)
663
                {
664
                    // マイナス値は赤
665
                    if (CommonMotions.cnvInt(dgv[e.ColumnIndex, e.RowIndex].Value) < 0)
666
                    {
667
                        dgv[e.ColumnIndex, e.RowIndex].Style.ForeColor = Color.Red;
668
                    }
669
                    else
670
                    {
671
                        dgv[e.ColumnIndex, e.RowIndex].Style.ForeColor = SystemColors.ControlText;
672
                    }
673

  
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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