プロジェクト

全般

プロフィール

リビジョン 288

堀内約7年前に追加

工事予算書:交渉フラグを共通費に追加
工事日報:台帳未作成時でも作成可能に変更
台帳未作成一覧:工事予算書存在時は経費を予算書から持ってくるように変更

差分を表示:

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

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/DataModel/DivisionMaster.cs
17 17
        public enum DivisionMasterCodeDefine
18 18
        {
19 19
            /// <summary>
20
            /// 発注者区分登録
20
            /// 1:発注者区分登録
21 21
            /// </summary>
22 22
            OrderDivision = 1,
23 23
            /// <summary>
24
            /// 工事種別登録
24
            /// 2:工事種別登録
25 25
            /// </summary>
26 26
            ConstructionClass = 2,
27 27
            /// <summary>
28
            /// 工事経費名称登録
28
            /// 3:工事経費名称登録
29 29
            /// </summary>
30 30
            ConstructionExpenses = 3,
31 31
        }
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs
183 183
            this.grpExample1.Size = new System.Drawing.Size(400, 38);
184 184
            this.grpExample1.TabIndex = 33;
185 185
            this.grpExample1.TabStop = false;
186
            this.grpExample1.Text = "施工状態変更より1カ月経過時";
186
            this.grpExample1.Text = "施工状態変更より1カ月経過時";
187 187
            this.grpExample1.Visible = false;
188 188
            // 
189 189
            // lblEstimateType03
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs
1071 1071
                    switch (GroupNo)
1072 1072
                    {
1073 1073
                        // ????{?H?E?O????O???[?v??O??????????
1074
                        case (int)FrmConstructionBudget.DataGroup.CommonTempCosts:
1074 1075
                        case (int)FrmConstructionBudget.DataGroup.OutSourceCosts:
1075 1076
                        case (int)FrmConstructionBudget.DataGroup.MyConstruction:
1076 1077
                            // ???????????Z?b?g????
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs
4411 4411
                dgv.CurrentRow.Cells[(int)GridColumn.CompanyType].Value = frm.DataType;
4412 4412
                dgv.CurrentRow.Cells[(int)GridColumn.CompanyCode].Value = selRec.CompanyCode;
4413 4413
                dgv.CurrentRow.Cells[(int)GridColumn.CompanyName].Value = selRec.CompanyName;
4414

  
4415
                // 変更フラグON
4416
                m_bChengeAns = true;
4414 4417
            }
4415 4418
            catch (System.Exception ex)
4416 4419
            {
......
4548 4551
                }
4549 4552

  
4550 4553
                wrkRow.Cells[(int)GridColumn.Negotiation].Value = NegoStr;
4554

  
4555
                // 変更フラグON
4556
                m_bChengeAns = true;
4551 4557
            }
4552 4558
            catch (System.Exception ex)
4553 4559
            {
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs
141 141
        /// ????SQL??Z?L?????e?B??????????????
142 142
        /// </summary>
143 143
        /// <param name="strSQL"></param>
144
        private void CreateSecuritySQL(ref string strSQL)
144
        private void CreateSecuritySQL(ref StringBuilder strSQL)
145 145
        {
146 146
            try
147 147
            {
......
165 165
                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key;
166 166
                    int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key;
167 167

  
168
                    strSQL += " And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1";
169
                    strSQL += string.Format(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
168
                    strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1");
169
                    strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
170 170

  
171
                    strSQL += string.Format(" Or (A.ConstructionStatusFlg >= {0}", iStatus);
171
                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus);
172 172

  
173
                    strSQL += " And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3";
174
                    strSQL += string.Format(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
173
                    strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3");
174
                    strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
175 175

  
176
                    strSQL += " Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5";
177
                    strSQL += string.Format(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
176
                    strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5");
177
                    strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
178 178

  
179
                    strSQL += " Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7";
180
                    strSQL += string.Format(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode);
179
                    strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7");
180
                    strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode);
181 181

  
182
                    strSQL += string.Format(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus);          // ????????????o???H???S??????????????????\??
183
                    strSQL += string.Format(" Or (A.ConstructionStatusFlg = {0}", iStatus2);                                            // ???????p??????p???????????????
184
                    strSQL += string.Format(" And A.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
182
                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus);          // ????????????o???H???S??????????????????\??
183
                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2);                                            // ???????p??????p???????????????
184
                    strSQL.AppendFormat(" And A.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
185 185
                }
186 186
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
187 187
                {
188 188
                    // ???g?p??
189 189
                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key;
190 190

  
191
                    strSQL += string.Format(" And (A.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
191
                    strSQL.AppendFormat(" And (A.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
192 192

  
193
                    strSQL += string.Format(" Or (A.ConstructionStatusFlg > {0}", iStatus);
193
                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg > {0}", iStatus);
194 194

  
195
                    strSQL += string.Format(" And (A.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
195
                    strSQL.AppendFormat(" And (A.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
196 196

  
197
                    strSQL += string.Format(" Or A.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
197
                    strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
198 198

  
199
                    strSQL += string.Format(" Or A.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
199
                    strSQL.AppendFormat(" Or A.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
200 200
                }
201 201
            }
202 202
            catch (Exception ex)
......
210 210
        /// <summary>
211 211
        /// ?H??????f?[?^??SQL??
212 212
        /// </summary>
213
        private void CreateInitSQL1(ref string strSQL)
213
        private void CreateInitSQL1(ref StringBuilder strSQL)
214 214
        {
215
            string strSub1 = "";
216
            string strSub2 = "";
215
            StringBuilder strSub1 = new StringBuilder();
216
            StringBuilder strSub2 = new StringBuilder();
217 217
            try
218 218
            {
219 219
                int iCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("????????")).Key;
......
227 227
                if (cmbDepartment.Visible) DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
228 228

  
229 229
                // SQL??A?N?Z?X????????????
230
                string strSecurity = string.Empty;
230
                StringBuilder strSecurity = new StringBuilder();
231 231
                CreateSecuritySQL(ref strSecurity);
232 232

  
233 233
                // ?????????H??
234
                strSub1 = "SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING, C.PERSONCODE, C.PERSONNAME, '', D.DEPARTMENTCODE, D.DEPARTMENTSTRING, D.DISPLAYORDER, C.DISPLAYORDER, E.COMPLATEFLG";
235
                strSub1 += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C, DEPARTMENTMASTER D, CONSTRUCTIONLEDGER E";
236
                strSub1 += " WHERE NOT EXISTS (SELECT * FROM DAILYDATACONSTRUCTION Z WHERE Z.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND Z.PERSONCODE = A.CONSTRUCTIONPERSONCODE)";
237
                strSub1 += string.Format(" And A.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
234
                strSub1.Append("SELECT A.CONSTRUCTIONCODE");
235
                strSub1.Append(", B.DETAILSTRING");
236
                strSub1.Append(", C.PERSONCODE");
237
                strSub1.Append(", C.PERSONNAME");
238
                strSub1.Append(", ''");
239
                strSub1.Append(", D.DEPARTMENTCODE");
240
                strSub1.Append(", D.DEPARTMENTSTRING");
241
                strSub1.Append(", D.DISPLAYORDER");
242
                strSub1.Append(", C.DISPLAYORDER");
243

  
244
                // strSub1.Append(", E.COMPLATEFLG"); 2017/10/30 ?????o???????????????????????
238 245
                
246
                strSub1.Append(", 0");
247
                strSub1.Append(" FROM CONSTRUCTIONBASEINFO A");
248
                strSub1.Append(", CONSTRUCTIONBASEINFODETAIL B");
249
                strSub1.Append(", PERSONINCHARGEMASTER C");
250
                strSub1.Append(", DEPARTMENTMASTER D");
251

  
252
                // strSub1.Append(", CONSTRUCTIONLEDGER E"); 2017/10/30 ?????o???????????????????????
253
                
254
                strSub1.Append(" WHERE NOT EXISTS (SELECT * FROM DAILYDATACONSTRUCTION Z WHERE Z.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND Z.PERSONCODE = A.CONSTRUCTIONPERSONCODE)");
255
                strSub1.AppendFormat(" And A.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
256
                
239 257
                // ??????????~????O
240
                strSub1 += string.Format(" AND ((A.CONSTRUCTIONSTATUSFLG < {0})", iCode);
258
                strSub1.AppendFormat(" AND ((A.CONSTRUCTIONSTATUSFLG < {0})", iCode);
241 259
                // ??????????A7????????????\?????
242
                strSub1 += string.Format(" OR (A.CONSTRUCTIONSTATUSFLG = {0}", iCode);
243
                //strSub1 += string.Format(" AND TO_DATE('{0}','YYYY/MM/DD') <= A.BILLINGDATE))", DateTime.Now.AddDays(-7).ToShortDateString());
244
                strSub1 += string.Format(" AND STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(A.BILLINGDATE)))", DateTime.Now.AddDays(-7).ToShortDateString());
260
                strSub1.AppendFormat(" OR (A.CONSTRUCTIONSTATUSFLG = {0}", iCode);
261
                strSub1.AppendFormat(" AND STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(A.BILLINGDATE)))", DateTime.Now.AddDays(-7).ToShortDateString());
245 262
                
246 263
                // ?S????I?????????
247 264
                if (PersonCode > 0)
248
                    strSub1 += string.Format(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
249
                
250
                strSub1 += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
251
                strSub1 += " AND A.CONSTRUCTIONPERSONCODE = C.PERSONCODE";
265
                    strSub1.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
266

  
267
                strSub1.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
268
                strSub1.Append(" AND A.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
252 269
                // ?????I????????
253 270
                if (DepartmentCode > 0)
254
                    strSub1 += string.Format(" AND C.DEPARTMENTCODE = {0}", DepartmentCode);
271
                    strSub1.AppendFormat(" AND C.DEPARTMENTCODE = {0}", DepartmentCode);
255 272

  
256
                strSub1 += string.Format(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
257
                strSub1 += " AND C.DEPARTMENTCODE = D.DEPARTMENTCODE";
258
                strSub1 += " AND E.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
273
                strSub1.AppendFormat(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
274
                strSub1.Append(" AND C.DEPARTMENTCODE = D.DEPARTMENTCODE");
275
                // strSub1.Append(" AND E.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"); 2017/10/30 ?????o???????????????????????
259 276
                // ????????H?????????H??
260
                //strSub2 = " UNION (SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING , D.PERSONCODE, D.PERSONNAME, MAX(TO_CHAR(C.DAILYDATADATE,'YYYY/MM/DD'))";
261
                strSub2 = " UNION (SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING , D.PERSONCODE, D.PERSONNAME, MAX(DATE_FORMAT(C.DAILYDATADATE,'%Y/%m/%d'))";
262
                strSub2 += " , E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG";
263
                strSub2 += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, DAILYDATACONSTRUCTION C, PERSONINCHARGEMASTER D, DEPARTMENTMASTER E, CONSTRUCTIONLEDGER F";
264
                strSub2 += string.Format(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
277
                strSub2.Append(" UNION (SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING , D.PERSONCODE, D.PERSONNAME, MAX(DATE_FORMAT(C.DAILYDATADATE,'%Y/%m/%d'))");
278
                strSub2.Append(" , E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG");
279
                strSub2.Append(" FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, DAILYDATACONSTRUCTION C, PERSONINCHARGEMASTER D, DEPARTMENTMASTER E, CONSTRUCTIONLEDGER F");
280
                strSub2.AppendFormat(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
265 281
                // ?S????I?????????
266 282
                if (PersonCode > 0)
267
                    strSub2 += string.Format(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
283
                    strSub2.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
268 284

  
269
                strSub2 += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
270
                strSub2 += " AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
271
                strSub2 += " AND C.PERSONCODE = D.PERSONCODE";
285
                strSub2.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
286
                strSub2.Append(" AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
287
                strSub2.Append(" AND C.PERSONCODE = D.PERSONCODE");
272 288
                // ?????I????????
273 289
                if (DepartmentCode > 0)
274
                    strSub2 += string.Format(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
275
                strSub2 += " AND D.DEPARTMENTCODE = E.DEPARTMENTCODE";
276
                strSub2 += " AND F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
290
                    strSub2.AppendFormat(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
291
                strSub2.Append(" AND D.DEPARTMENTCODE = E.DEPARTMENTCODE");
292
                strSub2.Append(" AND F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
277 293

  
278
                strSQL = strSub1 + strSecurity + strSub2 + strSecurity;
279
                strSQL += " GROUP BY A.CONSTRUCTIONCODE, B.DETAILSTRING, D.PERSONCODE, D.PERSONNAME, E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG)";
294
                strSQL.Append(strSub1.ToString() + strSecurity.ToString() + strSub2.ToString() + strSecurity.ToString());
295
                strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, B.DETAILSTRING, D.PERSONCODE, D.PERSONNAME, E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG)");
280 296
                // Order by ?t??
281
                strSQL += " ORDER BY 10 ASC, 8 ASC, 9 ASC, 6 ASC, 7 ASC, 3 ASC";
297
                strSQL.Append(" ORDER BY 10 ASC, 8 ASC, 9 ASC, 6 ASC, 7 ASC, 3 ASC");
282 298

  
283 299
            }
284 300
            catch (Exception ex)
......
292 308
        /// <summary>
293 309
        /// ????????c???^?f?[?^??SQL??
294 310
        /// </summary>
295
        private void CreateInitSQL2(ref string strSQL)
311
        private void CreateInitSQL2(ref StringBuilder strSQL)
296 312
        {
297
            string strSub1 = "";
298
            string strSub2 = "";
313
            StringBuilder strSub1 = new StringBuilder();
314
            StringBuilder strSub2 = new StringBuilder();
299 315
            try
300 316
            {
301 317
                int iCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("????????")).Key;
......
309 325
                if (cmbDepartment.Visible) DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
310 326

  
311 327
                // SQL??A?N?Z?X????????????
312
                string strSecurity = string.Empty;
328
                StringBuilder strSecurity = new StringBuilder();
313 329
                CreateSecuritySQL(ref strSecurity);
314 330

  
315 331
                // ?????????H??
316
                strSub1 = "SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING, C.PERSONCODE, C.PERSONNAME, '', D.DEPARTMENTCODE, D.DEPARTMENTSTRING, D.DISPLAYORDER, C.DISPLAYORDER, E.COMPLATEFLG";
317
                strSub1 += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C, DEPARTMENTMASTER D, CONSTRUCTIONLEDGER E";
318
                strSub1 += " WHERE NOT EXISTS (SELECT * FROM PROCEEDINGSDATA Z WHERE Z.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
319
                strSub1 += string.Format(" And A.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
332
                strSub1.Append("SELECT A.CONSTRUCTIONCODE");
333
                strSub1.Append(", B.DETAILSTRING");
334
                strSub1.Append(", C.PERSONCODE");
335
                strSub1.Append(", C.PERSONNAME");
336
                strSub1.Append(", ''");
337
                strSub1.Append(", D.DEPARTMENTCODE");
338
                strSub1.Append(", D.DEPARTMENTSTRING");
339
                strSub1.Append(", D.DISPLAYORDER");
340
                strSub1.Append(", C.DISPLAYORDER");
341
                
342
                // strSub1.Append(", E.COMPLATEFLG"); 2017/10/30 ?????o???????????????????????
343
                strSub1.Append(", 0");
320 344

  
345
                strSub1.Append(" FROM CONSTRUCTIONBASEINFO A");
346
                strSub1.Append(", CONSTRUCTIONBASEINFODETAIL B");
347
                strSub1.Append(", PERSONINCHARGEMASTER C");
348
                strSub1.Append(", DEPARTMENTMASTER D");
349

  
350
                // strSub1.Append(", CONSTRUCTIONLEDGER E"); 2017/10/30 ?????o???????????????????????
351
                
352
                strSub1.Append(" WHERE NOT EXISTS (SELECT * FROM PROCEEDINGSDATA Z WHERE Z.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
353
                strSub1.AppendFormat(" And A.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
354

  
321 355
                // ??????????~????O
322
                strSub1 += string.Format(" AND ((A.CONSTRUCTIONSTATUSFLG < {0})", iCode);
356
                strSub1.AppendFormat(" AND ((A.CONSTRUCTIONSTATUSFLG < {0})", iCode);
323 357
                // ??????????A7????????????\?????
324
                strSub1 += string.Format(" OR (A.CONSTRUCTIONSTATUSFLG = {0}", iCode);
325
                //strSub1 += string.Format(" AND TO_DATE('{0}','YYYY/MM/DD') <= A.BILLINGDATE))", DateTime.Now.AddDays(-7).ToShortDateString());
326
                strSub1 += string.Format(" AND STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(A.BILLINGDATE)))", DateTime.Now.AddDays(-7).ToShortDateString());
358
                strSub1.AppendFormat(" OR (A.CONSTRUCTIONSTATUSFLG = {0}", iCode);
359
                strSub1.AppendFormat(" AND STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(A.BILLINGDATE)))", DateTime.Now.AddDays(-7).ToShortDateString());
327 360

  
328 361
                // ?S????I?????????
329 362
                if (PersonCode > 0)
330
                    strSub1 += string.Format(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
363
                    strSub1.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
331 364

  
332
                strSub1 += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
333
                strSub1 += " AND A.CONSTRUCTIONPERSONCODE = C.PERSONCODE";
365
                strSub1.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
366
                strSub1.Append(" AND A.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
334 367
                // ?????I????????
335 368
                if (DepartmentCode > 0)
336
                    strSub1 += string.Format(" AND C.DEPARTMENTCODE = {0}", DepartmentCode);
369
                    strSub1.AppendFormat(" AND C.DEPARTMENTCODE = {0}", DepartmentCode);
337 370

  
338
                strSub1 += string.Format(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
339
                strSub1 += " AND C.DEPARTMENTCODE = D.DEPARTMENTCODE";
340
                strSub1 += " AND E.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
371
                strSub1.AppendFormat(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
372
                strSub1.Append(" AND C.DEPARTMENTCODE = D.DEPARTMENTCODE");
373
                // strSub1.Append(" AND E.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"); 2017/10/30 ?????o???????????????????????
341 374
                // ????????H?????????H??
342
                //strSub2 = " UNION (SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING , D.PERSONCODE, D.PERSONNAME, MAX(TO_CHAR(C.PROCEEDINGSDATADATE,'YYYY/MM/DD'))";
343
                strSub2 = " UNION (SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING , D.PERSONCODE, D.PERSONNAME, MAX(DATE_FORMAT(C.PROCEEDINGSDATADATE,'%Y/%m/%d'))";
344
                strSub2 += " , E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG";
345
                strSub2 += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PROCEEDINGSDATA C, PERSONINCHARGEMASTER D, DEPARTMENTMASTER E, CONSTRUCTIONLEDGER F";
346
                strSub2 += string.Format(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
375
                strSub2.Append(" UNION (SELECT A.CONSTRUCTIONCODE, B.DETAILSTRING , D.PERSONCODE, D.PERSONNAME, MAX(DATE_FORMAT(C.PROCEEDINGSDATADATE,'%Y/%m/%d'))");
376
                strSub2.Append(" , E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG");
377
                strSub2.Append(" FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PROCEEDINGSDATA C, PERSONINCHARGEMASTER D, DEPARTMENTMASTER E, CONSTRUCTIONLEDGER F");
378
                strSub2.AppendFormat(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
347 379
                // ?S????I?????????
348 380
                if (PersonCode > 0)
349
                    strSub2 += string.Format(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
381
                    strSub2.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
350 382

  
351
                strSub2 += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
352
                strSub2 += " AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
353
                strSub2 += " AND D.PERSONCODE = A.CONSTRUCTIONPERSONCODE";
383
                strSub2.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
384
                strSub2.Append(" AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
385
                strSub2.Append(" AND D.PERSONCODE = A.CONSTRUCTIONPERSONCODE");
354 386
                // ?????I????????
355 387
                if (DepartmentCode > 0)
356
                    strSub2 += string.Format(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
357
                strSub2 += " AND D.DEPARTMENTCODE = E.DEPARTMENTCODE";
358
                strSub2 += " AND F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
388
                    strSub2.AppendFormat(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
389
                strSub2.Append(" AND D.DEPARTMENTCODE = E.DEPARTMENTCODE");
390
                strSub2.Append(" AND F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
359 391

  
360
                strSQL = strSub1 + strSecurity + strSub2 + strSecurity;
361
                strSQL += " GROUP BY A.CONSTRUCTIONCODE, B.DETAILSTRING, D.PERSONCODE, D.PERSONNAME, E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG)";
392
                strSQL.Append(strSub1.ToString() + strSecurity.ToString() + strSub2.ToString() + strSecurity.ToString());
393
                strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, B.DETAILSTRING, D.PERSONCODE, D.PERSONNAME, E.DEPARTMENTCODE, E.DEPARTMENTSTRING, E.DISPLAYORDER, D.DISPLAYORDER, F.COMPLATEFLG)");
362 394
                // Order by ?t??
363
                strSQL += " ORDER BY 10 ASC, 8 ASC, 9 ASC, 6 ASC, 7 ASC, 3 ASC";
395
                strSQL.Append(" ORDER BY 10 ASC, 8 ASC, 9 ASC, 6 ASC, 7 ASC, 3 ASC");
364 396

  
365 397
            }
366 398
            catch (Exception ex)
......
374 406
        /// <summary>
375 407
        /// ?f?[?^??SQL??
376 408
        /// </summary>
377
        private void CreateInitSQL(ref string strSQL)
409
        private void CreateInitSQL(ref StringBuilder strSQL)
378 410
        {
379 411
            try
380 412
            {
......
425 457
            try
426 458
            {
427 459
                dgvMaster.Rows.Clear();
428
                string strSQL = "";
460
                StringBuilder strSQL = new StringBuilder();
429 461
                // SQL??
430 462
                CreateInitSQL(ref strSQL);
431 463
                bool init = true;
432 464
                // ?H????{????
433
                if (!cbiDB.ExecuteReader(strSQL, ref arData)) return;
465
                if (!cbiDB.ExecuteReader(strSQL.ToString(), ref arData)) return;
434 466

  
435 467
                int DepCode = 0;
436 468
                int PersonCode = 0;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs
1284 1284
        }
1285 1285
        #endregion
1286 1286

  
1287

  
1288 1287
        #region ?w?b?_?[??o????^??\??????
1289 1288
        /// <summary>
1290 1289
        /// ?w?b?_?[??o????^??\??????
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs
126 126
        private DialogResult m_EndButton = DialogResult.None;
127 127

  
128 128
        // 合計エリア
129
        private int[] m_TotalArea;
129
        private long[] m_TotalArea;
130 130

  
131 131
        /// <summary>
132
        /// 経費率マスタレコード数
133
        /// </summary>
134
        private int m_ExpensesMasterCount = 3;
135
        /// <summary>
132 136
        /// 次画面選択
133 137
        /// </summary>
134 138
        private bool m_NextProc = false;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs
43 43
            {
44 44
                // ?????v?G???A??????
45 45
                int TotalColCnt = Enum.GetNames(typeof(GridColumn)).Length;
46
                m_TotalArea = new int[TotalColCnt];
46
                m_TotalArea = new long[TotalColCnt];
47 47
                Array.Clear(m_TotalArea, 0, m_TotalArea.Length);
48 48

  
49 49
                dgv.Rows.Clear();
......
130 130
            /// ???
131 131
            /// </summary>
132 132
            OrderDate,
133
            /// <summary>
134
            /// ?H???\?Z???F?O???[?v??
135
            /// </summary>
136
            GroupCount,
137
            /// <summary>
138
            /// ?H???\?Z???F?s?J?E???g
139
            /// </summary>
140
            LineCount,
141
            /// <summary>
142
            /// ?H???\?Z???F???s???z
143
            /// </summary>
144
            ExecutionAmount,
145
            /// <summary>
146
            /// ?H???\?Z???F???z??
147
            /// </summary>
148
            AmountConfigRate,
133 149
        }
134 150
        #endregion
135 151

  
......
144 160

  
145 161
            // ???v?G???A??????
146 162
            int TotalColCnt = Enum.GetNames(typeof(GridColumn)).Length;
147
            int[] CurTotalArea = new int[TotalColCnt];
163
            long[] CurTotalArea = new long[TotalColCnt];
148 164
            Array.Clear(CurTotalArea, 0, CurTotalArea.Length);
149 165
            try
150 166
            {
......
157 173
                int iCode1 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?? ?? ??")).Key;
158 174
                int iCode2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?{?H?J?n")).Key;
159 175

  
160
                string strSQL = "(SELECT C1.DISPLAYORDER, A.CONSTRUCTIONCODE, A.ORDERSDECISIONPRICE,";
161
                strSQL += " A.CONSTRUCTIONSTATUSFLG, A.CONSTRUCTIONPERSONCODE,";
162
                strSQL += " C1.DEPARTMENTSTRING, B1.PERSONNAME,";
163
                strSQL += " D1.EXPENSESRAITO, D2.EXPENSESRAITO, D3.EXPENSESRAITO,";
164
                strSQL += " E1.DETAILSTRING, B1.DISPLAYORDER,";
165
                strSQL += " A.ORDERDATE";
166
                strSQL += " FROM CONSTRUCTIONBASEINFO A, PERSONINCHARGEMASTER B1, DEPARTMENTMASTER C1";
167
                strSQL += string.Format(" LEFT JOIN DEPARTMENTEXPENSESMASTER D1 ON D1.DEPARTMENTCODE = C1.DEPARTMENTCODE AND D1.EXPENSESPERIOD = {0} AND D1.NameCode = 3", SelectPeriod);
168
                strSQL += string.Format(" LEFT JOIN DEPARTMENTEXPENSESMASTER D2 ON D2.DEPARTMENTCODE = C1.DEPARTMENTCODE AND D2.EXPENSESPERIOD = {0} AND D2.NameCode = 2", SelectPeriod);
169
                strSQL += string.Format(" LEFT JOIN DEPARTMENTEXPENSESMASTER D3 ON D3.DEPARTMENTCODE = C1.DEPARTMENTCODE AND D3.EXPENSESPERIOD = {0} AND D3.NameCode = 1", SelectPeriod);
170
                strSQL += ", CONSTRUCTIONBASEINFODETAIL E1";
171
                strSQL += " WHERE NOT EXISTS (SELECT * FROM CONSTRUCTIONLEDGER A1 WHERE A1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
172
                strSQL += string.Format(" AND A.CONSTRUCTIONPERIOD = {0}", SelectPeriod);
176
                StringBuilder strSQL = new StringBuilder();
177
                strSQL.Append("(SELECT C1.DISPLAYORDER");
178
                strSQL.Append(", A.CONSTRUCTIONCODE");
179
                strSQL.Append(", A.ORDERSDECISIONPRICE");
180
                strSQL.Append(", A.CONSTRUCTIONSTATUSFLG");
181
                strSQL.Append(", A.CONSTRUCTIONPERSONCODE");
182
                strSQL.Append(", C1.DEPARTMENTSTRING");
183
                strSQL.Append(", B1.PERSONNAME");
184
                strSQL.Append(", D1.EXPENSESRAITO");
185
                strSQL.Append(", D2.EXPENSESRAITO");
186
                strSQL.Append(", D3.EXPENSESRAITO");
187
                strSQL.Append(", E1.DETAILSTRING");
188
                strSQL.Append(", B1.DISPLAYORDER");
189
                strSQL.Append(", A.ORDERDATE");
190
                strSQL.Append(", Budget.GroupCount");
191
                strSQL.Append(", Budget.LineCount");
192
                strSQL.Append(", Budget.ExecutionAmount");
193
                strSQL.Append(", Budget.AmountConfigRate");
194
                strSQL.Append(", ExpName.DisplayOrder");
173 195

  
174
                strSQL += string.Format(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
175
                strSQL += string.Format(" AND A.JOINFLG != {0}", (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren);
196
                strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
176 197

  
177
                strSQL += string.Format(" And ({0} <= A.ConstructionStatusFlg And A.ConstructionStatusFlg <= {1})", iCode1, iCode2);
178
                strSQL += " AND B1.PERSONCODE = A.CONSTRUCTIONPERSONCODE";
179
                strSQL += " AND C1.DEPARTMENTCODE = B1.DEPARTMENTCODE";
180
                strSQL += " AND E1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
181
                strSQL += string.Format(" AND E1.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
182
                if (DepartmantCode > 0) strSQL += string.Format(" AND C1.DEPARTMENTCODE = {0}", DepartmantCode);
183
                if (PersonCode > 0) strSQL += string.Format(" AND B1.PERSONCODE = {0}", PersonCode);
184
                strSQL += ")";
185
                strSQL += " ORDER BY 1, 12, 2";
198
                strSQL.Append(" LEFT JOIN constructionbudgetdetail AS Budget");
199
                strSQL.Append(" ON Budget.ConstructionCode = A.ConstructionCode");
200
                strSQL.AppendFormat(" And Budget.GroupCount = {0}", (int)FrmConstructionBudget.DataGroup.Expenses);
186 201

  
202
                strSQL.Append(" LEFT JOIN divisionmaster AS ExpName");
203
                strSQL.AppendFormat(" ON ExpName.DivisionCode = {0}", (int)DivisionMaster.DivisionMasterCodeDefine.ConstructionExpenses);
204
                strSQL.Append(" And ExpName.NameCode = Budget.ComponentCode");
205

  
206
                strSQL.Append(", PERSONINCHARGEMASTER B1");
207
                strSQL.Append(", DEPARTMENTMASTER C1");
208
                strSQL.AppendFormat(" LEFT JOIN DEPARTMENTEXPENSESMASTER D1 ON D1.DEPARTMENTCODE = C1.DEPARTMENTCODE AND D1.EXPENSESPERIOD = {0} AND D1.NameCode = 3", SelectPeriod);
209
                strSQL.AppendFormat(" LEFT JOIN DEPARTMENTEXPENSESMASTER D2 ON D2.DEPARTMENTCODE = C1.DEPARTMENTCODE AND D2.EXPENSESPERIOD = {0} AND D2.NameCode = 2", SelectPeriod);
210
                strSQL.AppendFormat(" LEFT JOIN DEPARTMENTEXPENSESMASTER D3 ON D3.DEPARTMENTCODE = C1.DEPARTMENTCODE AND D3.EXPENSESPERIOD = {0} AND D3.NameCode = 1", SelectPeriod);
211
                strSQL.Append(", CONSTRUCTIONBASEINFODETAIL E1");
212
                strSQL.Append(" WHERE NOT EXISTS (SELECT * FROM CONSTRUCTIONLEDGER A1 WHERE A1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
213
                strSQL.AppendFormat(" AND A.CONSTRUCTIONPERIOD = {0}", SelectPeriod);
214

  
215
                strSQL.AppendFormat(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
216
                strSQL.AppendFormat(" AND A.JOINFLG != {0}", (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren);
217

  
218
                strSQL.AppendFormat(" And ({0} <= A.ConstructionStatusFlg And A.ConstructionStatusFlg <= {1})", iCode1, iCode2);
219
                strSQL.Append(" AND B1.PERSONCODE = A.CONSTRUCTIONPERSONCODE");
220
                strSQL.Append(" AND C1.DEPARTMENTCODE = B1.DEPARTMENTCODE");
221
                strSQL.Append(" AND E1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
222
                strSQL.AppendFormat(" AND E1.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
223
                if (DepartmantCode > 0) strSQL.AppendFormat(" AND C1.DEPARTMENTCODE = {0}", DepartmantCode);
224
                if (PersonCode > 0) strSQL.AppendFormat(" AND B1.PERSONCODE = {0}", PersonCode);
225
                strSQL.Append(")");
226
                strSQL.Append(" ORDER BY 1, 12, 2, 18");
227

  
187 228
                ArrayList DatArList = new ArrayList();
188
                if (!BaseDB.ExecuteReader(strSQL, ref DatArList)) return;
229
                if (!BaseDB.ExecuteReader(strSQL.ToString(), ref DatArList)) return;
189 230
                if (DatArList.Count == 0) return;
190 231

  
191 232
                int ino = 1;
192 233
                bool FirstFlg = true;
193 234
                string BreakKey = string.Empty;
194
                foreach (object[] objGetArry in DatArList)
235
                string workDepName = string.Empty;
236
                int ConstrCode = 0;
237
                int ConstrStatus = 0;
238
                long OrdersDecisionPrice = 0;
239
                long[] ExpensesVal = new long[3];
240
                string [] strValue = new string[2];
241
                DateTime dtOrderDate = DateTime.Now;
242

  
243
                for (int nDataCount = 0; nDataCount < DatArList.Count; nDataCount++)
195 244
                {
196
                    int ConstrStatus = CommonMotions.cnvInt(objGetArry[(int)DetilData.ConstructionStatusFlg]);          // ?{?H???t???O
197
                    int OrdersDecisionPrice = CommonMotions.cnvInt(objGetArry[(int)DetilData.OrdersDecisionPrice]);     // ????z
198
                    double ExpensesRaito1 = CommonMotions.cnvDouble(objGetArry[(int)DetilData.ExpensesRaito1]) / 100.0; // ???o??
199
                    double ExpensesRaito2 = CommonMotions.cnvDouble(objGetArry[(int)DetilData.ExpensesRaito2]) / 100.0; // ?????o??
200
                    double ExpensesRaito3 = CommonMotions.cnvDouble(objGetArry[(int)DetilData.ExpensesRaito3]) / 100.0; // ?c??o??
245
                    object[] objGetArry = (object[])DatArList[nDataCount];
201 246

  
202
                    string workDepName = CommonMotions.cnvString(objGetArry[(int)DetilData.DepartmentString]);
247
                    // ?H???????
248
                    ConstrCode = CommonMotions.cnvInt(objGetArry[(int)DetilData.ConstructionCode]);
249
                    Array.Clear(ExpensesVal, 0, ExpensesVal.Length);
250

  
251
                    // ???f?[?^????
252
                    int DataCnt = DatArList.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[(int)DetilData.ConstructionCode]) == ConstrCode).Count();
253

  
254
                    if (DataCnt == 1)
255
                    {
256
                        SetNotCreatedOneceRow(objGetArry
257
                                                , ref ConstrStatus
258
                                                , ref OrdersDecisionPrice
259
                                                , ref ExpensesVal
260
                                                , ref workDepName
261
                                                , ref strValue
262
                                                , ref dtOrderDate);
263
                    }
264
                    else
265
                    {
266
                        SetNotCreatedMultiRow(DatArList
267
                                                , ConstrCode
268
                                                , ref ConstrStatus
269
                                                , ref OrdersDecisionPrice
270
                                                , ref ExpensesVal
271
                                                , ref workDepName
272
                                                , ref strValue
273
                                                , ref dtOrderDate
274
                                                , ref nDataCount);
275
                    }
276

  
203 277
                    if (!BreakKey.Equals(workDepName))
204 278
                    {
205 279
                        if (!FirstFlg) dgv.Rows.Add(1);
206 280
                        FirstFlg = false;
207 281
                        BreakKey = workDepName;
208 282
                    }
283
                    else
284
                    {
285
                        workDepName = string.Empty;
286
                    }
287

  
209 288
                    dgv.Rows.Add((ino++)
210
                                    , CommonMotions.cnvString(objGetArry[(int)DetilData.DepartmentString])      // ??????
211
                                    , CommonMotions.cnvString(objGetArry[(int)DetilData.PersonName])            // ?S?????
212
                                    , CommonMotions.cnvInt(objGetArry[(int)DetilData.ConstructionCode])         // ?H?????
213
                                    , CommonMotions.cnvString(objGetArry[(int)DetilData.ConstrName])            // ?H??????
214
                                    , CommonMotions.cnvDate(objGetArry[(int)DetilData.OrderDate]).ToShortDateString()   // ???
215
                                    , CommonDefine.ProjectsStatus[ConstrStatus]                                 // ?{?H???
216
                                    , OrdersDecisionPrice.ToString("#,0")                                       // ????z
217
                                    , (OrdersDecisionPrice * ExpensesRaito1).ToString("#,0")                    // ???o??
218
                                    , (OrdersDecisionPrice * ExpensesRaito2).ToString("#,0")                    // ?????o??
219
                                    , (OrdersDecisionPrice * ExpensesRaito3).ToString("#,0")                    // ?c??o??
289
                                    , workDepName                                   // ??????
290
                                    , strValue[0]                                   // ?S?????
291
                                    , ConstrCode                                    // ?H?????
292
                                    , strValue[1]                                   // ?H??????
293
                                    , dtOrderDate.ToShortDateString()               // ???
294
                                    , CommonDefine.ProjectsStatus[ConstrStatus]     // ?{?H???
295
                                    , OrdersDecisionPrice.ToString("#,0")           // ????z
296
                                    , ExpensesVal[0].ToString("#,0")                // ???o??
297
                                    , ExpensesVal[1].ToString("#,0")                // ?????o??
298
                                    , ExpensesVal[2].ToString("#,0")                // ?c??o??
220 299
                                );
221 300

  
222
                    CurTotalArea[(int)GridColumn.OrdersPrice] += OrdersDecisionPrice;                                  // ????z
223
                    CurTotalArea[(int)GridColumn.CompanyExpeses] += (int)(OrdersDecisionPrice * ExpensesRaito1);       // ???o??
224
                    CurTotalArea[(int)GridColumn.DepartmentExpeses] += (int)(OrdersDecisionPrice * ExpensesRaito2);    // ?????o??
225
                    CurTotalArea[(int)GridColumn.SaleseExpeses] += (int)(OrdersDecisionPrice * ExpensesRaito3);        // ?c??o??
301
                    CurTotalArea[(int)GridColumn.OrdersPrice] += OrdersDecisionPrice;                                   // ????z
302
                    CurTotalArea[(int)GridColumn.CompanyExpeses] += ExpensesVal[0];                                     // ???o??
303
                    CurTotalArea[(int)GridColumn.DepartmentExpeses] += ExpensesVal[1];                                  // ?????o??
304
                    CurTotalArea[(int)GridColumn.SaleseExpeses] += ExpensesVal[2];                                      // ?c??o??
226 305
                }
227 306

  
228 307
                m_TotalArea[(int)GridColumn.OrdersPrice] += CurTotalArea[(int)GridColumn.OrdersPrice];
......
244 323
        }
245 324
        #endregion
246 325

  
326
        #region ???????P?s????
327
        /// <summary>
328
        /// ???????P?s????
329
        /// </summary>
330
        private void SetNotCreatedOneceRow(object[] objGetArry
331
                                            , ref int ConstrStatus
332
                                            , ref long OrdersDecisionPrice
333
                                            , ref long[] ExpensesVal
334
                                            , ref string DepName
335
                                            , ref string[] strValue
336
                                            , ref DateTime dtOrderDate)
337
        {
338
            try
339
            {
340
                ConstrStatus = CommonMotions.cnvInt(objGetArry[(int)DetilData.ConstructionStatusFlg]);                  // ?{?H???t???O
341
                OrdersDecisionPrice = CommonMotions.cnvLong(objGetArry[(int)DetilData.OrdersDecisionPrice]);            // ????z
342
                double ExpensesRaito1 = CommonMotions.cnvDouble(objGetArry[(int)DetilData.ExpensesRaito1]) / 100.0;     // ???o??
343
                double ExpensesRaito2 = CommonMotions.cnvDouble(objGetArry[(int)DetilData.ExpensesRaito2]) / 100.0;     // ?????o??
344
                double ExpensesRaito3 = CommonMotions.cnvDouble(objGetArry[(int)DetilData.ExpensesRaito3]) / 100.0;     // ?c??o??
345
                ExpensesVal[0] = CommonMotions.cnvRound(OrdersDecisionPrice * ExpensesRaito1);
346
                ExpensesVal[1] = CommonMotions.cnvRound(OrdersDecisionPrice * ExpensesRaito2);
347
                ExpensesVal[2] = CommonMotions.cnvRound(OrdersDecisionPrice * ExpensesRaito3);
348

  
349
                DepName = CommonMotions.cnvString(objGetArry[(int)DetilData.DepartmentString]);                         // ????????
350

  
351
                strValue[0] = CommonMotions.cnvString(objGetArry[(int)DetilData.PersonName]);                           // ?S?????
352
                strValue[1] = CommonMotions.cnvString(objGetArry[(int)DetilData.ConstrName]);                           // ?H??????
353

  
354
                dtOrderDate = CommonMotions.cnvDate(objGetArry[(int)DetilData.OrderDate]);                              // ???
355
            }
356
            catch (System.Exception ex)
357
            {
358
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
359
            }
360
        }
361
        #endregion
362

  
363
        #region ???????????s????
364
        /// <summary>
365
        /// ???????????s????
366
        /// </summary>
367
        private void SetNotCreatedMultiRow(ArrayList DatArList
368
                                            , int ConstrCode
369
                                            , ref int ConstrStatus
370
                                            , ref long OrdersDecisionPrice
371
                                            , ref long[] ExpensesVal
372
                                            , ref string DepName
373
                                            , ref string[] strValue
374
                                            , ref DateTime dtOrderDate
375
                                            , ref int nDataCount)
376
        {
377
            try
378
            {
379
                object[] TargetData = DatArList.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[(int)DetilData.ConstructionCode]) == ConstrCode).ToArray();
380

  
381
                object[] FirstRec = (object[])TargetData[0];
382

  
383
                ConstrStatus = CommonMotions.cnvInt(FirstRec[(int)DetilData.ConstructionStatusFlg]);                    // ?{?H???t???O
384
                OrdersDecisionPrice = CommonMotions.cnvLong(FirstRec[(int)DetilData.OrdersDecisionPrice]);              // ????z
385
                DepName = CommonMotions.cnvString(FirstRec[(int)DetilData.DepartmentString]);                           // ????????
386
                strValue[0] = CommonMotions.cnvString(FirstRec[(int)DetilData.PersonName]);                             // ?S?????
387
                strValue[1] = CommonMotions.cnvString(FirstRec[(int)DetilData.ConstrName]);                             // ?H??????
388
                dtOrderDate = CommonMotions.cnvDate(FirstRec[(int)DetilData.OrderDate]);                                // ???
389

  
390
                for (int i = 0; i < TargetData.Length; i++)
391
                {
392
                    if (i < m_ExpensesMasterCount)
393
                    {
394
                        object[] objRec = (object[])TargetData[i];
395
                        switch (i)
396
                        {
397
                            case 0:
398
                                ExpensesVal[0] = CommonMotions.cnvLong(objRec[(int)DetilData.ExecutionAmount]);
399
                                break;
400
                            case 1:
401
                                ExpensesVal[2] = CommonMotions.cnvLong(objRec[(int)DetilData.ExecutionAmount]);
402
                                break;
403
                            case 2:
404
                                ExpensesVal[1] = CommonMotions.cnvLong(objRec[(int)DetilData.ExecutionAmount]);
405
                                break;
406
                        }
407
                        if (i != 0) nDataCount++;
408
                    }
409
                }
410
            }
411
            catch (System.Exception ex)
412
            {
413
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
414
            }
415
        }
416
        #endregion
417

  
247 418
        #region ???f?[?^?\??
248 419
        /// <summary>
249 420
        /// ???f?[?^?\??????
......
279 450

  
280 451
                // ???v?G???A??????
281 452
                int TotalColCnt = Enum.GetNames(typeof(GridColumn)).Length;
282
                int[] CurTotalArea = new int[TotalColCnt];
453
                long[] CurTotalArea = new long[TotalColCnt];
283 454
                Array.Clear(CurTotalArea, 0, CurTotalArea.Length);
284 455

  
285 456
                int CompFlg = -1;
......
342 513
        /// <summary>
343 514
        /// ???v??\??????
344 515
        /// </summary>
345
        private void DisplayTotalRow(int TitleNo, int[] TotalArea, bool AddBrankRow = true)
516
        private void DisplayTotalRow(int TitleNo, long[] TotalArea, bool AddBrankRow = true)
346 517
        {
347 518
            try
348 519
            {
......
373 544
        /// <summary>
374 545
        /// ?O????v??\??????
375 546
        /// </summary>
376
        private void InsertZeroTotalRow(int TitleNo, int[] TotalArea)
547
        private void InsertZeroTotalRow(int TitleNo, long[] TotalArea)
377 548
        {
378 549
            try
379 550
            {
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
32 32
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
33 33
// 既定値にすることができます:
34 34
// [assembly: AssemblyVersion("1.0.*")]
35
[assembly: AssemblyVersion("1.0.0.98")]
36
[assembly: AssemblyFileVersion("1.0.0.98")]
35
[assembly: AssemblyVersion("1.0.0.99")]
36
[assembly: AssemblyFileVersion("1.0.0.99")]
37 37
// Log4netを使用する
38 38
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]

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