リビジョン 367
郵便番号データ引込処理追加
データ検索セキュリティ:年度による部署変更に対処
台帳一覧:年度ごとの部署・担当者変更処理のバグ修正
branches/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs | ||
---|---|---|
72 | 72 |
|
73 | 73 |
#region 住所検索ファイルパス |
74 | 74 |
/// <summary> |
75 |
/// 住所ファイル |
|
75 |
/// 住所ファイル名称
|
|
76 | 76 |
/// </summary> |
77 |
public static string s_AddreddFileName= "KEN_ALL"; |
|
78 |
public static string s_FrozenFileExtension = ".ZIP"; |
|
79 |
public static string s_CSVFileExtension = ".CSV"; |
|
80 |
|
|
81 |
/// <summary> |
|
82 |
/// 住所ファイルパス |
|
83 |
/// </summary> |
|
77 | 84 |
public static string s_AddressFilePath = System.Environment.CurrentDirectory + @".\KEN_ALL.CSV"; |
78 |
public static string s_AddressWorkInput = System.Environment.CurrentDirectory + @".\KEN_ALL.CSV"; |
|
85 |
public static string s_AddressWorkInput = System.Environment.CurrentDirectory + @".\KEN_ALL_IN.CSV";
|
|
79 | 86 |
public static string s_AddressWorkOutput = System.Environment.CurrentDirectory + @".\KEN_ALL.CSV"; |
80 | 87 |
#endregion |
81 | 88 |
|
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 224;
|
|
17 |
public static int s_SystemVersion = 227;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
---|---|---|
131 | 131 |
SalesConfirm = 129, // 129:売上確認 |
132 | 132 |
BankBusinessDay = 130, // 130:銀行営業日マスタ |
133 | 133 |
BudgetCodeSum = 131, // 131:予算書集計コードマスタ |
134 |
AddressConvert = 132, // 132:郵便番号変換処理 |
|
134 | 135 |
} |
135 | 136 |
#endregion |
136 | 137 |
|
... | ... | |
245 | 246 |
{ (int)MaintenanceExecuteNo.SalesConfirm, "売上順一覧"}, // 129 |
246 | 247 |
{ (int)MaintenanceExecuteNo.BankBusinessDay, "銀行営業日登録"}, // 130 |
247 | 248 |
{ (int)MaintenanceExecuteNo.BudgetCodeSum, "予算書集計コード登録" }, // 131 |
248 |
|
|
249 |
{ (int)MaintenanceExecuteNo.AddressConvert, "住所データ変換処理" }, // 132 |
|
249 | 250 |
}; |
250 | 251 |
#endregion |
251 | 252 |
|
... | ... | |
790 | 791 |
case (int)MaintenanceExecuteNo.BudgetCodeSum: // 131:予算書集計コードマスタ |
791 | 792 |
MaintenanceExecuteNo_BudgetSumCode(m_ProcControlPara[NowPoint]); |
792 | 793 |
break; |
794 |
case (int)ClsExcute.MaintenanceExecuteNo.AddressConvert: |
|
795 |
MaintenanceExecuteNo_AddressConvert(m_ProcControlPara[NowPoint]); |
|
796 |
break; |
|
793 | 797 |
|
794 |
|
|
795 | 798 |
#endregion |
796 | 799 |
|
797 | 800 |
#region サブフォーム |
... | ... | |
3765 | 3768 |
try |
3766 | 3769 |
{ |
3767 | 3770 |
// 起動・編集フラグ |
3768 |
int ProcessNo = (int)MaintenanceExecuteNo.BankBusinessDay;
|
|
3771 |
int ProcessNo = (int)MaintenanceExecuteNo.BudgetCodeSum;
|
|
3769 | 3772 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
3770 | 3773 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
3771 | 3774 |
{ |
... | ... | |
3788 | 3791 |
} |
3789 | 3792 |
#endregion |
3790 | 3793 |
|
3794 |
#region 予算書集計コードマスタ |
|
3795 |
/// <summary> |
|
3796 |
/// 予算書集計コードマスタ |
|
3797 |
/// </summary> |
|
3798 |
public static void MaintenanceExecuteNo_AddressConvert(ProcessParameter CurrentPara) |
|
3799 |
{ |
|
3800 |
// |
|
3801 |
FrmAddressConvert frm = new FrmAddressConvert(); |
|
3802 |
try |
|
3803 |
{ |
|
3804 |
// 起動・編集フラグ |
|
3805 |
int ProcessNo = (int)MaintenanceExecuteNo.AddressConvert; |
|
3806 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
3807 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
3808 |
{ |
|
3809 |
BackProcess(); |
|
3810 |
return; |
|
3811 |
} |
|
3812 |
|
|
3813 |
frm.ShowDialog(); |
|
3814 |
} |
|
3815 |
catch (Exception ex) |
|
3816 |
{ |
|
3817 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3818 |
BackProcess(); |
|
3819 |
} |
|
3820 |
finally |
|
3821 |
{ |
|
3822 |
frm.Dispose(); frm = null; |
|
3823 |
} |
|
3824 |
} |
|
3791 | 3825 |
#endregion |
3792 | 3826 |
|
3827 |
#endregion |
|
3828 |
|
|
3793 | 3829 |
#region サブフォーム |
3794 | 3830 |
#region 掲示板メッセージ入力 |
3795 | 3831 |
/// <summary> |
branches/src/ProcessManagement/ProcessManagement/DataModel/ChgChargeDep.cs | ||
---|---|---|
70 | 70 |
#region メンバ変数 |
71 | 71 |
private int m_PersonCode = 0; // 担当者コード |
72 | 72 |
private DateTime m_StartDate = DateTime.MinValue; // 開始年月日 |
73 |
private DateTime m_CompDate = DateTime.MinValue; // 終了年月日
|
|
73 |
private DateTime m_CompDate = DateTime.MaxValue; // 終了年月日
|
|
74 | 74 |
|
75 | 75 |
private int m_DepartmentCode = 0; // 部署コード |
76 | 76 |
private string m_DepartmentName = string.Empty; // 部署名 |
branches/src/ProcessManagement/ProcessManagement/DataModel/ChgConstrCharge.cs | ||
---|---|---|
51 | 51 |
private int m_DepartmentCode = 0; // 部署コード |
52 | 52 |
private int m_PersonCode = 0; // 担当者コード |
53 | 53 |
private DateTime m_StartDate = DateTime.MinValue; // 担当開始年月日 |
54 |
private DateTime m_CompDate = DateTime.MinValue; // 担当終了年月日
|
|
54 |
private DateTime m_CompDate = DateTime.MaxValue; // 担当終了年月日
|
|
55 | 55 |
|
56 | 56 |
private int m_SourceCode = 0; // 元工事コード |
57 | 57 |
private int m_DeleteFlg = 0; // 削除フラグ |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs | ||
---|---|---|
581 | 581 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
582 | 582 |
int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key; |
583 | 583 |
|
584 |
strSQL.Append(" And (B.SalesPersonCode IN (Select B1.PersonCode From PersonInChargeMaster B1"); |
|
585 |
strSQL.AppendFormat(" Where B1.DepartmentCode IN (SELECT B2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B2 WHERE B2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
584 |
// ?????J?n?I???N???? |
|
585 |
int nTargetYear = (int)numUDConstPro.Value; |
|
586 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
587 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
586 | 588 |
|
589 |
StringBuilder strChgDep = new StringBuilder(); |
|
590 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
591 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
592 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
593 |
|
|
594 |
// strSQL.Append(" And (B.SalesPersonCode IN (Select B1.PersonCode From PersonInChargeMaster B1"); |
|
595 |
strSQL.AppendFormat(" And (B.SalesPersonCode IN (Select B1.PersonCode From {0} As B1", strChgDep.ToString()); |
|
596 |
strSQL.Append(" Where B1.DepartmentCode IN (SELECT B2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B2"); |
|
597 |
strSQL.AppendFormat(" WHERE B2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
598 |
|
|
587 | 599 |
strSQL.AppendFormat(" Or (B.ConstructionStatusFlg >= {0}", iStatus); |
588 | 600 |
|
589 |
strSQL.Append(" And (B.ConstructionPersonCode IN (Select B3.PersonCode From PersonInChargeMaster B3"); |
|
590 |
strSQL.AppendFormat(" Where B3.DepartmentCode IN (SELECT B4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B4 WHERE B4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
601 |
// strSQL.Append(" And (B.ConstructionPersonCode IN (Select B3.PersonCode From PersonInChargeMaster B3"); |
|
602 |
strSQL.AppendFormat(" And (B.ConstructionPersonCode IN (Select B3.PersonCode From {0} As B3", strChgDep.ToString()); |
|
603 |
strSQL.Append(" Where B3.DepartmentCode IN (SELECT B4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B4"); |
|
604 |
strSQL.AppendFormat(" WHERE B4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
591 | 605 |
|
592 |
strSQL.Append(" Or B.CONSTRSUBPERSONCODE IN (Select B5.PersonCode From PersonInChargeMaster B5"); |
|
593 |
strSQL.AppendFormat(" Where B5.DepartmentCode IN (SELECT B6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B6 WHERE B6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
606 |
// strSQL.Append(" Or B.CONSTRSUBPERSONCODE IN (Select B5.PersonCode From PersonInChargeMaster B5"); |
|
607 |
strSQL.AppendFormat(" OR B.CONSTRSUBPERSONCODE IN (Select B5.PersonCode From {0} As B5", strChgDep.ToString()); |
|
608 |
strSQL.Append(" Where B5.DepartmentCode IN (SELECT B6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B6"); |
|
609 |
strSQL.AppendFormat(" WHERE B6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
594 | 610 |
|
595 |
strSQL.Append(" Or B.ConstructionInstructor IN (Select B7.PersonCode From PersonInChargeMaster B7"); |
|
596 |
strSQL.AppendFormat(" Where B7.DepartmentCode IN (SELECT B8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B8 WHERE B8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
611 |
// strSQL.Append(" Or B.ConstructionInstructor IN (Select B7.PersonCode From PersonInChargeMaster B7"); |
|
612 |
strSQL.AppendFormat(" OR B.ConstructionInstructor IN (Select B7.PersonCode From {0} As B7", strChgDep.ToString()); |
|
613 |
strSQL.Append(" Where B7.DepartmentCode IN (SELECT B8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B8"); |
|
614 |
strSQL.AppendFormat(" WHERE B8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
597 | 615 |
|
598 | 616 |
strSQL.AppendFormat(" Or (B.ConstructionStatusFlg >= {0} And B.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
599 | 617 |
strSQL.AppendFormat(" Or (B.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmApprovalPersonAuxiliary.cs | ||
---|---|---|
1031 | 1031 |
|
1032 | 1032 |
strSQL.Append(" INNER JOIN personinchargemaster As F ON F.PersonCode = C.PersonCode"); |
1033 | 1033 |
|
1034 |
strSQL.Append(" Inner Join(Select"); |
|
1035 |
strSQL.Append(" H.PersonCode"); |
|
1036 |
strSQL.Append(" , H.StartDate"); |
|
1037 |
strSQL.Append(" , Case When DATE (H.CompDate) = DATE('0001/01/01')"); |
|
1038 |
strSQL.Append(" Then DATE ('9999/12/31')"); |
|
1039 |
strSQL.Append(" Else DATE(H.CompDate) End As CompDate"); |
|
1040 |
strSQL.Append(" , H.DepartmentCode"); |
|
1041 |
strSQL.Append(" , H.DepartmentName"); |
|
1042 |
strSQL.Append(" From ChgChargeDep As H) As ChgMan"); |
|
1034 |
strSQL.Append(" Inner Join (Select * From ChgChargeDep As H) As ChgMan"); |
|
1043 | 1035 |
strSQL.Append(" On ChgMan.PersonCode = P.PersonCode"); |
1044 | 1036 |
strSQL.Append(" And(DATE(ChgMan.StartDate) <= DATE(C.PetitionApprovalDate)"); |
1045 | 1037 |
strSQL.Append(" And DATE(C.PetitionApprovalDate) <= DATE(ChgMan.CompDate))"); |
... | ... | |
1193 | 1185 |
|
1194 | 1186 |
strSQL.Append(" LEFT JOIN personinchargemaster As PersonM ON PersonM.PersonCode = PersonApp.PersonCode"); |
1195 | 1187 |
|
1196 |
strSQL.Append(" Inner Join(Select"); |
|
1197 |
strSQL.Append(" H.PersonCode"); |
|
1198 |
strSQL.Append(" , H.StartDate"); |
|
1199 |
strSQL.Append(" , Case When DATE (H.CompDate) = DATE('0001/01/01')"); |
|
1200 |
strSQL.Append(" Then DATE ('9999/12/31')"); |
|
1201 |
strSQL.Append(" Else DATE(H.CompDate) End As CompDate"); |
|
1202 |
strSQL.Append(" , H.DepartmentCode"); |
|
1203 |
strSQL.Append(" , H.DepartmentName"); |
|
1204 |
strSQL.Append(" From ChgChargeDep As H) As ChgMan"); |
|
1188 |
strSQL.Append(" Inner Join(Select * From ChgChargeDep As H) As ChgMan"); |
|
1205 | 1189 |
strSQL.Append(" On ChgMan.PersonCode = P.PersonCode"); |
1206 | 1190 |
strSQL.Append(" And(DATE(ChgMan.StartDate) <= DATE(PersonApp.PetitionApprovalDate)"); |
1207 | 1191 |
strSQL.Append(" And DATE(PersonApp.PetitionApprovalDate) <= DATE(ChgMan.CompDate))"); |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs | ||
---|---|---|
255 | 255 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
256 | 256 |
int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key; |
257 | 257 |
|
258 |
strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
259 |
strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
258 |
// ?????J?n?I???N???? |
|
259 |
int nTargetYear = (int)numUDConstPro.Value; |
|
260 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
261 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
260 | 262 |
|
263 |
StringBuilder strChgDep = new StringBuilder(); |
|
264 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
265 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
266 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
267 |
|
|
268 |
// strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
269 |
strSQL.AppendFormat(" And (A.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
270 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
271 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
272 |
|
|
261 | 273 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
262 | 274 |
|
263 |
strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
264 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
275 |
// strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
276 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
277 |
strSQL.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
278 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
265 | 279 |
|
266 |
strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
267 |
strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
280 |
// strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
281 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
282 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
283 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
268 | 284 |
|
269 |
strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
270 |
strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
285 |
// strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
286 |
strSQL.AppendFormat(" Or A.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
287 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
288 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
271 | 289 |
|
272 | 290 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
273 | 291 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs | ||
---|---|---|
3640 | 3640 |
} |
3641 | 3641 |
#endregion |
3642 | 3642 |
|
3643 |
#region ?X?V?????????? |
|
3644 |
/// <summary> |
|
3645 |
/// ?X?V?????????? |
|
3646 |
/// </summary> |
|
3647 |
private List<int> m_DetailNoList = new List<int>(); |
|
3648 |
#endregion |
|
3649 |
|
|
3650 | 3643 |
#region ?H????{????o?^ |
3651 | 3644 |
/// <summary> |
3652 | 3645 |
/// ?H????{????o?^ |
... | ... | |
4378 | 4371 |
SetRec.PersonCode = nManCode; // ?S????R?[?h |
4379 | 4372 |
|
4380 | 4373 |
DateTime StartDate = DateTime.MinValue; |
4381 |
DateTime CompDate = DateTime.MinValue;
|
|
4374 |
DateTime CompDate = DateTime.MaxValue;
|
|
4382 | 4375 |
GetConstrStartAndEnd(ref StartDate, ref CompDate); |
4383 | 4376 |
|
4384 | 4377 |
// ?S???J?n?N???? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs | ||
---|---|---|
673 | 673 |
// ???N???A |
674 | 674 |
ClearDisplay(); |
675 | 675 |
|
676 |
// ?S????R???{?{?b?N?X?Z?b?g?????????Z?b?g????
|
|
677 |
if (!SetPerosonToDepartment()) return;
|
|
676 |
// ?????R???{?{?b?N?X??X
|
|
677 |
SetcmbDepartment();
|
|
678 | 678 |
|
679 |
// ?S????R???{?{?b?N?X??X |
|
680 |
SetcmbPersons(); |
|
681 |
|
|
679 | 682 |
// ?f?[?^?\?? |
680 | 683 |
DataDisplay(); |
681 | 684 |
|
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs | ||
---|---|---|
294 | 294 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
295 | 295 |
int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key; |
296 | 296 |
|
297 |
strSecurity.Append(" And (D.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
298 |
strSecurity.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
297 |
// ?????J?n?I???N???? |
|
298 |
int nTargetYear = (int)numUDConstPro.Value; |
|
299 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
300 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
299 | 301 |
|
302 |
StringBuilder strChgDep = new StringBuilder(); |
|
303 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
304 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
305 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
306 |
|
|
307 |
strSecurity.AppendFormat(" And (D.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
308 |
strSecurity.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
309 |
strSecurity.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
300 | 310 |
strSecurity.AppendFormat(" Or (D.ConstructionStatusFlg >= {0}", iStatus); |
301 | 311 |
|
302 |
strSecurity.Append(" And (D.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
303 |
strSecurity.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
312 |
strSecurity.AppendFormat(" And (D.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
313 |
strSecurity.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
314 |
strSecurity.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
304 | 315 |
|
305 |
strSecurity.Append(" Or D.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
306 |
strSecurity.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
316 |
strSecurity.AppendFormat(" Or D.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
317 |
strSecurity.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
318 |
strSecurity.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
307 | 319 |
|
308 |
strSecurity.Append(" Or D.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
309 |
strSecurity.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
320 |
strSecurity.AppendFormat(" Or D.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
321 |
strSecurity.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
322 |
strSecurity.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
310 | 323 |
|
311 | 324 |
strSecurity.AppendFormat(" Or (D.ConstructionStatusFlg >= {0} And D.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
312 | 325 |
strSecurity.AppendFormat(" Or (D.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
... | ... | |
1178 | 1191 |
|
1179 | 1192 |
int nTargetYear = (int)numUDConstPro.Value; |
1180 | 1193 |
// ?????J?n?I???N???? |
1181 |
DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true); |
|
1182 |
DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false); |
|
1183 |
// ???E????N???? |
|
1184 |
string strdtStart = dtDefaultStart.ToShortDateString(); |
|
1185 |
string strdtEnd = dtDefaultEnd.ToShortDateString(); |
|
1194 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
1195 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
1186 | 1196 |
|
1187 | 1197 |
// SQL??A?N?Z?X???????????? |
1188 | 1198 |
StringBuilder strSecurity = new StringBuilder(); |
... | ... | |
1224 | 1234 |
|
1225 | 1235 |
strSQL.Append(" LEFT JOIN constrledgerexpenses AS G"); |
1226 | 1236 |
strSQL.Append(" ON G.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"); |
1237 |
|
|
1227 | 1238 |
strSQL.Append(" LEFT JOIN divisionmaster AS H"); |
1228 | 1239 |
strSQL.AppendFormat(" ON H.DivisionCode = {0}",(int)DivisionMaster.DivisionMasterCodeDef.ConstructionExpenses); |
1229 | 1240 |
strSQL.Append(" And H.NameCode = G.NameCode"); |
... | ... | |
1242 | 1253 |
strSQL.Append(" ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE"); |
1243 | 1254 |
strSQL.AppendFormat(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName); |
1244 | 1255 |
|
1245 |
strSQL.Append(" Inner Join(Select H.PersonCode, H.StartDate"); |
|
1246 |
strSQL.AppendFormat(" , Case WHEN DATE(H.CompDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax); |
|
1247 |
strSQL.Append(" Else DATE(H.CompDate) End As CompDate"); |
|
1248 |
strSQL.Append(" , H.DepartmentCode, H.DepartmentName"); |
|
1249 |
strSQL.Append(" From chgchargedep As H) As I"); |
|
1256 |
strSQL.Append(" Inner Join chgchargedep As I"); |
|
1250 | 1257 |
strSQL.Append(" On I.PersonCode = D.ConstructionPersonCode"); |
1251 | 1258 |
strSQL.AppendFormat(" And(DATE(I.StartDate) <= DATE('{0}')", strdtEnd); |
1252 | 1259 |
strSQL.AppendFormat(" And DATE('{0}') <= DATE(I.CompDate))", strdtStart); |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs | ||
---|---|---|
205 | 205 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
206 | 206 |
int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key; |
207 | 207 |
|
208 |
strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
209 |
strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
208 |
// ?????J?n?I???N???? |
|
209 |
int nTargetYear = (int)numUDConstPro.Value; |
|
210 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
211 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
210 | 212 |
|
213 |
StringBuilder strChgDep = new StringBuilder(); |
|
214 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
215 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
216 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
217 |
|
|
218 |
// strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
219 |
strSQL.AppendFormat(" And (A.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
220 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
221 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
222 |
|
|
211 | 223 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
212 | 224 |
|
213 |
strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
214 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
225 |
// strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
226 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
227 |
strSQL.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
228 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
215 | 229 |
|
216 |
strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
217 |
strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
230 |
// strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
231 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
232 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
233 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
218 | 234 |
|
219 |
strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
220 |
strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
235 |
// strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
236 |
strSQL.AppendFormat(" Or A.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
237 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
238 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
221 | 239 |
|
222 | 240 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
223 | 241 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepartmentCostAux.cs | ||
---|---|---|
181 | 181 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
182 | 182 |
int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key; |
183 | 183 |
|
184 |
strSecurity.Append(" And (D.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
185 |
strSecurity.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
184 |
// ?????J?n?I???N???? |
|
185 |
int nTargetYear = (int)numUDConstPro.Value; |
|
186 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
187 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
186 | 188 |
|
189 |
StringBuilder strChgDep = new StringBuilder(); |
|
190 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
191 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
192 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
193 |
|
|
194 |
// strSecurity.Append(" And (D.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
195 |
strSecurity.AppendFormat(" And (D.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
196 |
strSecurity.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
197 |
strSecurity.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
198 |
|
|
187 | 199 |
strSecurity.AppendFormat(" Or (D.ConstructionStatusFlg >= {0}", iStatus); |
188 | 200 |
|
189 |
strSecurity.Append(" And (D.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
190 |
strSecurity.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
201 |
// strSecurity.Append(" And (D.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
202 |
strSecurity.AppendFormat(" And (D.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
203 |
strSecurity.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
204 |
strSecurity.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
191 | 205 |
|
192 |
strSecurity.Append(" Or D.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
193 |
strSecurity.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
206 |
// strSecurity.Append(" Or D.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
207 |
strSecurity.AppendFormat(" Or D.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
208 |
strSecurity.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
209 |
strSecurity.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
194 | 210 |
|
195 |
strSecurity.Append(" Or D.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
196 |
strSecurity.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
211 |
// strSecurity.Append(" Or D.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
212 |
strSecurity.AppendFormat(" Or D.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
213 |
strSecurity.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
214 |
strSecurity.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
197 | 215 |
|
198 | 216 |
strSecurity.AppendFormat(" Or (D.ConstructionStatusFlg >= {0} And D.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
199 | 217 |
strSecurity.AppendFormat(" Or (D.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs | ||
---|---|---|
190 | 190 |
// ???????L |
191 | 191 |
// ?@???????i?????????j |
192 | 192 |
|
193 |
strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
194 |
strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
193 |
// ?????J?n?I???N???? |
|
194 |
int nTargetYear = (int)numUDConstPro.Value; |
|
195 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
196 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
195 | 197 |
|
198 |
StringBuilder strChgDep = new StringBuilder(); |
|
199 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
200 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
201 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
202 |
|
|
203 |
// strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
204 |
strSQL.AppendFormat(" And (A.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
205 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
206 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
207 |
|
|
196 | 208 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
197 | 209 |
|
198 |
strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
199 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
210 |
// strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
211 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
212 |
strSQL.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
213 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
200 | 214 |
|
201 |
strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
202 |
strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
215 |
// strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
216 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
217 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
218 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
203 | 219 |
|
204 |
strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
205 |
strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
220 |
// strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
221 |
strSQL.AppendFormat(" Or A.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
222 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
223 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
206 | 224 |
|
207 | 225 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
208 | 226 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs | ||
---|---|---|
167 | 167 |
/// ????SQL??Z?L?????e?B?????????????? |
168 | 168 |
/// </summary> |
169 | 169 |
/// <param name="strSQL"></param> |
170 |
private void CreateSecuritySQL(ref string strSQL)
|
|
170 |
private void CreateSecuritySQL(ref StringBuilder strSQL)
|
|
171 | 171 |
{ |
172 | 172 |
try |
173 | 173 |
{ |
... | ... | |
191 | 191 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
192 | 192 |
int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("???????p")).Key; |
193 | 193 |
|
194 |
strSQL += " And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"; |
|
195 |
strSQL += string.Format(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
194 |
// ?????J?n?I???N???? |
|
195 |
int nTargetYear = (int)numUDConstPro.Value; |
|
196 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
197 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
196 | 198 |
|
197 |
strSQL += string.Format(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
|
199 |
StringBuilder strChgDep = new StringBuilder(); |
|
200 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
201 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
202 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
198 | 203 |
|
199 |
strSQL += " And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"; |
|
200 |
strSQL += string.Format(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
204 |
// strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
205 |
strSQL.AppendFormat(" And (A.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
206 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
207 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
201 | 208 |
|
202 |
strSQL += " Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"; |
|
203 |
strSQL += string.Format(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
209 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
|
204 | 210 |
|
205 |
strSQL += " Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"; |
|
206 |
strSQL += string.Format(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
211 |
// strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
212 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
213 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
214 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
207 | 215 |
|
208 |
strSQL += string.Format(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
|
209 |
strSQL += string.Format(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
|
210 |
strSQL += string.Format(" And A.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode); |
|
216 |
// strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
217 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
218 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
219 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
220 |
|
|
221 |
// strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
222 |
strSQL.AppendFormat(" Or A.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
223 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
224 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
225 |
|
|
226 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
|
227 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
|
228 |
strSQL.AppendFormat(" And A.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode); |
|
211 | 229 |
} |
212 | 230 |
else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key) |
213 | 231 |
{ |
214 | 232 |
// ???g?p?? |
215 | 233 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key; |
216 | 234 |
|
217 |
strSQL += string.Format(" And (A.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
|
|
235 |
strSQL.AppendFormat(" And (A.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
|
|
218 | 236 |
|
219 |
strSQL += string.Format(" Or (A.ConstructionStatusFlg > {0}", iStatus);
|
|
237 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg > {0}", iStatus);
|
|
220 | 238 |
|
221 |
strSQL += string.Format(" And (A.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
|
|
239 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
|
|
222 | 240 |
|
223 |
strSQL += string.Format(" Or A.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
|
|
241 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
|
|
224 | 242 |
|
225 |
strSQL += string.Format(" Or A.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
|
|
243 |
strSQL.AppendFormat(" Or A.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
|
|
226 | 244 |
} |
227 | 245 |
} |
228 | 246 |
catch (Exception ex) |
... | ... | |
341 | 359 |
/// <summary> |
342 | 360 |
/// ?\???p?f?[?^??SQL?? |
343 | 361 |
/// </summary> |
344 |
private void CreateInitSQL(ref string strSQL)
|
|
362 |
private void CreateInitSQL(ref StringBuilder strSQL)
|
|
345 | 363 |
{ |
346 | 364 |
try |
347 | 365 |
{ |
... | ... | |
349 | 367 |
int ApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals("?????????F")).Key; |
350 | 368 |
|
351 | 369 |
// ?Z?L?????e?B??????? |
352 |
string wrkBuff = string.Empty;
|
|
370 |
StringBuilder wrkBuff = new StringBuilder();
|
|
353 | 371 |
CreateSecuritySQL(ref wrkBuff); |
354 | 372 |
|
355 | 373 |
StringBuilder wrkFormat = new StringBuilder(); |
... | ... | |
421 | 439 |
wrkFormat.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE"); |
422 | 440 |
wrkFormat.Append(" AND B.DETAILNO = {1}"); |
423 | 441 |
|
424 |
strSQL = string.Format(wrkFormat.ToString(), numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
|
|
425 |
strSQL += " And (A.ConstructionCode = A1.ConstructionCode";
|
|
426 |
strSQL += string.Format(" And A1.ApprovalCode = {0}", ApprovalCode);
|
|
427 |
strSQL += string.Format(" And A1.SeqNo = 1 And A1.APPROVALSTATUS = {0})", (int)CommonDefine.ApprovalStatus.Approval);
|
|
428 |
strSQL += " AND (A.CONSTRUCTIONCODE = A2.CONSTRUCTIONCODE AND A2.SEQNO = A11.LinkCode)";
|
|
442 |
strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
|
|
443 |
strSQL.Append(" And (A.ConstructionCode = A1.ConstructionCode");
|
|
444 |
strSQL.AppendFormat(" And A1.ApprovalCode = {0}", ApprovalCode);
|
|
445 |
strSQL.AppendFormat(" And A1.SeqNo = 1 And A1.APPROVALSTATUS = {0})", (int)CommonDefine.ApprovalStatus.Approval);
|
|
446 |
strSQL.Append(" AND (A.CONSTRUCTIONCODE = A2.CONSTRUCTIONCODE AND A2.SEQNO = A11.LinkCode)");
|
|
429 | 447 |
|
430 | 448 |
// ???????I??????????? |
431 |
strSQL += GetDepartmentString();
|
|
449 |
strSQL.Append(GetDepartmentString());
|
|
432 | 450 |
|
433 | 451 |
// ?S??????I??????????? |
434 |
strSQL += GetPersonString();
|
|
452 |
strSQL.Append(GetPersonString());
|
|
435 | 453 |
|
436 | 454 |
// ?Z?L?????e?B??????Z?b?g |
437 |
strSQL += wrkBuff;
|
|
455 |
strSQL.Append(wrkBuff.ToString());
|
|
438 | 456 |
|
439 | 457 |
// GROUP BY ??? |
440 |
strSQL += " GROUP BY";
|
|
441 |
strSQL += " A.CONSTRUCTIONCODE";
|
|
442 |
strSQL += ", A1.ORDERNO";
|
|
458 |
strSQL.Append(" GROUP BY");
|
|
459 |
strSQL.Append(" A.CONSTRUCTIONCODE");
|
|
460 |
strSQL.Append(", A1.ORDERNO");
|
|
443 | 461 |
// ORDER BY ??? |
444 |
strSQL += string.Format(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} DESC, {4} DESC",
|
|
462 |
strSQL.AppendFormat(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} DESC, {4} DESC",
|
|
445 | 463 |
(int)GetData.CONSTRUCTIONSTATUSFLG + 1, |
446 | 464 |
(int)GetData.CONSTDEPDISPORDER + 1, |
447 | 465 |
(int)GetData.CONSTMANDISPORDER + 1, |
... | ... | |
600 | 618 |
{ |
601 | 619 |
foreach (DataGridViewColumn wrkCol in dgvMaster.Columns) wrkCol.SortMode = DataGridViewColumnSortMode.NotSortable; |
602 | 620 |
dgvMaster.Rows.Clear(); |
603 |
string strSQL = "";
|
|
621 |
StringBuilder strSQL = new StringBuilder();
|
|
604 | 622 |
// SQL?? |
605 | 623 |
CreateInitSQL(ref strSQL); |
606 | 624 |
ArrayList arData = new ArrayList(); |
607 | 625 |
// ?f?[?^?? |
608 |
if (cbiDB.ExecuteReader(strSQL, ref arData)) |
|
626 |
if (cbiDB.ExecuteReader(strSQL.ToString(), ref arData))
|
|
609 | 627 |
{ |
610 | 628 |
// ?O???b?h??Z?b?g????? |
611 | 629 |
SetToGridData(arData); |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs | ||
---|---|---|
306 | 306 |
// ?C?x???g?N???A |
307 | 307 |
SubControlEvent(); |
308 | 308 |
|
309 |
// ?S????R???{?{?b?N?X?Z?b?g?????????Z?b?g????
|
|
310 |
if (!SetPerosonToDepartment()) return;
|
|
309 |
// ?????R???{?{?b?N?X??X
|
|
310 |
SetcmbDepartment();
|
|
311 | 311 |
|
312 |
// ?S????R???{?{?b?N?X??X |
|
313 |
SetcmbPersons(); |
|
314 |
|
|
312 | 315 |
// ?f?[?^?\?? |
313 | 316 |
DataDisplay(); |
314 | 317 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs | ||
---|---|---|
182 | 182 |
{ |
183 | 183 |
// ???????L |
184 | 184 |
// ?@???????i?????????j |
185 |
strSQL.Append(" And (B.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
186 |
strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
187 | 185 |
|
186 |
// ?????J?n?I???N???? |
|
187 |
int nTargetYear = (int)numUDConstPro.Value; |
|
188 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
189 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
190 |
|
|
191 |
StringBuilder strChgDep = new StringBuilder(); |
|
192 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
193 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
194 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
195 |
|
|
196 |
// strSQL.Append(" And (B.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
197 |
strSQL.AppendFormat(" And (B.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
198 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
199 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
200 |
|
|
188 | 201 |
strSQL.AppendFormat(" Or (B.ConstructionStatusFlg >= {0}", iStatus); |
189 | 202 |
|
190 |
strSQL.Append(" And (B.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
191 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
203 |
// strSQL.Append(" And (B.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
204 |
strSQL.AppendFormat(" And (B.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
205 |
strSQL.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
206 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
192 | 207 |
|
193 |
strSQL.Append(" Or B.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
194 |
strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
208 |
// strSQL.Append(" Or B.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
209 |
strSQL.AppendFormat(" Or B.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
210 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
211 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
195 | 212 |
|
196 |
strSQL.Append(" Or B.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
197 |
strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
213 |
// strSQL.Append(" Or B.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
214 |
strSQL.AppendFormat(" Or B.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
215 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
216 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
198 | 217 |
|
199 | 218 |
strSQL.AppendFormat(" Or (B.ConstructionStatusFlg >= {0} And B.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
200 | 219 |
strSQL.AppendFormat(" Or (B.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs | ||
---|---|---|
192 | 192 |
// ???????L |
193 | 193 |
// ?@???????i?????????j |
194 | 194 |
|
195 |
strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
196 |
strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
195 |
// ?????J?n?I???N???? |
|
196 |
int nTargetYear = (int)numUDConstPro.Value; |
|
197 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
198 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
197 | 199 |
|
200 |
StringBuilder strChgDep = new StringBuilder(); |
|
201 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
202 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
203 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
204 |
|
|
205 |
// strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
206 |
strSQL.AppendFormat(" And (A.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
207 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
208 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
209 |
|
|
198 | 210 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
199 | 211 |
|
200 |
strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
201 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
212 |
// strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
213 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
214 |
strSQL.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
215 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
202 | 216 |
|
203 |
strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
204 |
strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
217 |
// strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
218 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
219 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
220 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
205 | 221 |
|
206 |
strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
207 |
strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
222 |
// strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
223 |
strSQL.AppendFormat(" Or A.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
224 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
225 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
208 | 226 |
|
209 | 227 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
210 | 228 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrintList/FrmReqPrintListAuxiliary.cs | ||
---|---|---|
287 | 287 |
// ???????L |
288 | 288 |
// ?@???????i?????????j |
289 | 289 |
|
290 |
strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
291 |
strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
290 |
// ?????J?n?I???N???? |
|
291 |
int nTargetYear = (int)numUDConstPro.Value; |
|
292 |
string strdtStart = CommonMotions.GetOpeningEndDate(nTargetYear, true).ToShortDateString(); |
|
293 |
string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString(); |
|
292 | 294 |
|
295 |
StringBuilder strChgDep = new StringBuilder(); |
|
296 |
strChgDep.Append(" (Select * From chgchargedep As H"); |
|
297 |
strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd); |
|
298 |
strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart); |
|
299 |
|
|
300 |
// strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1"); |
|
301 |
strSQL.AppendFormat(" And (A.SalesPersonCode IN (Select A1.PersonCode From {0} As A1", strChgDep.ToString()); |
|
302 |
strSQL.Append(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2"); |
|
303 |
strSQL.AppendFormat(" WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
304 |
|
|
293 | 305 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus); |
294 | 306 |
|
295 |
strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
296 |
strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
307 |
// strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3"); |
|
308 |
strSQL.AppendFormat(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From {0} As A3", strChgDep.ToString()); |
|
309 |
strSQL.Append(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4"); |
|
310 |
strSQL.AppendFormat(" WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
297 | 311 |
|
298 |
strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
299 |
strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
312 |
// strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5"); |
|
313 |
strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From {0} As A5", strChgDep.ToString()); |
|
314 |
strSQL.Append(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6"); |
|
315 |
strSQL.AppendFormat(" WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode); |
|
300 | 316 |
|
301 |
strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
302 |
strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
317 |
// strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7"); |
|
318 |
strSQL.AppendFormat(" Or A.ConstructionInstructor IN (Select A7.PersonCode From {0} As A7", strChgDep.ToString()); |
|
319 |
strSQL.Append(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8"); |
|
320 |
strSQL.AppendFormat(" WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode); |
|
303 | 321 |
|
304 | 322 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus); // ????????????o???H???S??????????????????\?? |
305 | 323 |
strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2); // ???????p??????p??????????????? |
branches/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurity.cs | ||
---|---|---|
175 | 175 |
new KeyValuePair<int, string>((int)ClsExcute.MaintenanceExecuteNo.SalesConfirm, string.Empty), // 売上確認 |
176 | 176 |
new KeyValuePair<int, string>((int)ClsExcute.MaintenanceExecuteNo.BankBusinessDay, string.Empty), // 銀行営業日登録 |
177 | 177 |
new KeyValuePair<int, string>((int)ClsExcute.MaintenanceExecuteNo.BudgetCodeSum, string.Empty), // 予算書集計コード登録 |
178 |
}; |
|
178 |
new KeyValuePair<int, string>((int)ClsExcute.MaintenanceExecuteNo.AddressConvert, string.Empty), // 郵便番号引込 |
|
179 |
}; |
|
179 | 180 |
#endregion |
180 | 181 |
#endregion |
181 | 182 |
|
branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmAddressConvert.Designer.cs | ||
---|---|---|
1 |
namespace ProcessManagement.Forms.SubForms |
|
2 |
{ |
|
3 |
partial class FrmAddressConvert |
|
4 |
{ |
|
5 |
/// <summary> |
|
6 |
/// Required designer variable. |
|
7 |
/// </summary> |
|
8 |
private System.ComponentModel.IContainer components = null; |
|
9 |
|
|
10 |
/// <summary> |
|
11 |
/// Clean up any resources being used. |
|
12 |
/// </summary> |
|
13 |
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> |
|
14 |
protected override void Dispose(bool disposing) |
|
15 |
{ |
|
16 |
if (disposing && (components != null)) |
|
17 |
{ |
|
18 |
components.Dispose(); |
|
19 |
} |
|
20 |
base.Dispose(disposing); |
|
21 |
} |
|
22 |
|
|
23 |
#region Windows Form Designer generated code |
|
24 |
|
|
25 |
/// <summary> |
|
26 |
/// Required method for Designer support - do not modify |
|
27 |
/// the contents of this method with the code editor. |
|
28 |
/// </summary> |
|
29 |
private void InitializeComponent() |
|
30 |
{ |
|
31 |
this.label1 = new System.Windows.Forms.Label(); |
|
32 |
this.label2 = new System.Windows.Forms.Label(); |
|
33 |
this.btnCancel = new System.Windows.Forms.Button(); |
|
34 |
this.btnOK = new System.Windows.Forms.Button(); |
|
35 |
this.label3 = new System.Windows.Forms.Label(); |
|
36 |
this.label4 = new System.Windows.Forms.Label(); |
|
37 |
this.lblInputPath = new System.Windows.Forms.Label(); |
|
38 |
this.label6 = new System.Windows.Forms.Label(); |
|
39 |
this.BtnSearch = new System.Windows.Forms.Button(); |
|
40 |
this.label5 = new System.Windows.Forms.Label(); |
|
41 |
this.ExecMessage = new System.Windows.Forms.Label(); |
|
42 |
this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx(); |
|
43 |
this.label7 = new System.Windows.Forms.Label(); |
|
44 |
this.groupBoxEx1.SuspendLayout(); |
|
45 |
this.SuspendLayout(); |
|
46 |
// |
|
47 |
// label1 |
|
48 |
// |
|
49 |
this.label1.BackColor = System.Drawing.Color.MintCream; |
|
50 |
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
51 |
this.label1.Font = new System.Drawing.Font("MS 明朝", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
52 |
this.label1.ForeColor = System.Drawing.Color.Black; |
|
53 |
this.label1.Location = new System.Drawing.Point(169, 240); |
|
54 |
this.label1.Name = "label1"; |
|
55 |
this.label1.Size = new System.Drawing.Size(360, 30); |
|
56 |
this.label1.TabIndex = 10; |
|
57 |
this.label1.Text = "工事管理システム住所データ"; |
|
58 |
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
59 |
// |
|
60 |
// label2 |
|
61 |
// |
|
62 |
this.label2.BackColor = System.Drawing.Color.MintCream; |
|
63 |
this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
64 |
this.label2.ForeColor = System.Drawing.Color.Black; |
|
65 |
this.label2.Location = new System.Drawing.Point(12, 240); |
|
66 |
this.label2.Name = "label2"; |
|
67 |
this.label2.Size = new System.Drawing.Size(149, 30); |
|
68 |
this.label2.TabIndex = 11; |
|
69 |
this.label2.Text = "出力ファイル"; |
|
70 |
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
71 |
// |
|
72 |
// btnCancel |
|
73 |
// |
|
74 |
this.btnCancel.BackColor = System.Drawing.Color.Blue; |
|
75 |
this.btnCancel.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
76 |
this.btnCancel.ForeColor = System.Drawing.Color.White; |
|
77 |
this.btnCancel.Location = new System.Drawing.Point(700, 286); |
|
78 |
this.btnCancel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
|
79 |
this.btnCancel.Name = "btnCancel"; |
|
80 |
this.btnCancel.Size = new System.Drawing.Size(128, 32); |
|
81 |
this.btnCancel.TabIndex = 13; |
|
82 |
this.btnCancel.Text = "キャンセル"; |
|
83 |
this.btnCancel.UseVisualStyleBackColor = false; |
|
84 |
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); |
|
85 |
// |
|
86 |
// btnOK |
|
87 |
// |
|
88 |
this.btnOK.BackColor = System.Drawing.Color.Green; |
|
89 |
this.btnOK.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
90 |
this.btnOK.ForeColor = System.Drawing.Color.White; |
|
91 |
this.btnOK.Location = new System.Drawing.Point(563, 286); |
|
92 |
this.btnOK.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
|
93 |
this.btnOK.Name = "btnOK"; |
|
94 |
this.btnOK.Size = new System.Drawing.Size(128, 32); |
|
95 |
this.btnOK.TabIndex = 12; |
|
96 |
this.btnOK.Text = "引込実行"; |
|
97 |
this.btnOK.UseVisualStyleBackColor = false; |
|
98 |
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); |
|
99 |
// |
|
100 |
// label3 |
|
101 |
// |
|
102 |
this.label3.BackColor = System.Drawing.Color.Linen; |
|
103 |
this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
104 |
this.label3.ForeColor = System.Drawing.Color.Navy; |
|
105 |
this.label3.Location = new System.Drawing.Point(12, 70); |
|
106 |
this.label3.Name = "label3"; |
|
107 |
this.label3.Size = new System.Drawing.Size(149, 30); |
|
108 |
this.label3.TabIndex = 11; |
|
109 |
this.label3.Text = "入力ファイル"; |
|
110 |
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
111 |
// |
|
112 |
// label4 |
|
113 |
// |
|
114 |
this.label4.BackColor = System.Drawing.Color.Linen; |
|
115 |
this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
116 |
this.label4.Font = new System.Drawing.Font("MS 明朝", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
117 |
this.label4.ForeColor = System.Drawing.Color.Navy; |
|
118 |
this.label4.Location = new System.Drawing.Point(169, 70); |
|
119 |
this.label4.Name = "label4"; |
|
120 |
this.label4.Size = new System.Drawing.Size(360, 30); |
|
121 |
this.label4.TabIndex = 10; |
|
122 |
this.label4.Text = "ダウンロード郵便番号データ"; |
|
123 |
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
124 |
// |
|
125 |
// lblInputPath |
|
126 |
// |
|
127 |
this.lblInputPath.BackColor = System.Drawing.Color.White; |
|
128 |
this.lblInputPath.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
129 |
this.lblInputPath.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
130 |
this.lblInputPath.ForeColor = System.Drawing.Color.Black; |
|
131 |
this.lblInputPath.Location = new System.Drawing.Point(169, 100); |
|
132 |
this.lblInputPath.Name = "lblInputPath"; |
|
133 |
this.lblInputPath.Size = new System.Drawing.Size(660, 30); |
|
134 |
this.lblInputPath.TabIndex = 10; |
|
135 |
this.lblInputPath.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
136 |
// |
|
137 |
// label6 |
|
138 |
// |
|
139 |
this.label6.BackColor = System.Drawing.Color.Linen; |
|
140 |
this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
141 |
this.label6.ForeColor = System.Drawing.Color.Navy; |
|
142 |
this.label6.Location = new System.Drawing.Point(12, 100); |
|
143 |
this.label6.Name = "label6"; |
|
144 |
this.label6.Size = new System.Drawing.Size(149, 30); |
|
145 |
this.label6.TabIndex = 11; |
|
146 |
this.label6.Text = "ファイルパス"; |
|
147 |
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
148 |
// |
|
149 |
// BtnSearch |
|
150 |
// |
|
151 |
this.BtnSearch.BackColor = System.Drawing.Color.DarkOrange; |
|
152 |
this.BtnSearch.Location = new System.Drawing.Point(700, 138); |
|
153 |
this.BtnSearch.Name = "BtnSearch"; |
|
154 |
this.BtnSearch.Size = new System.Drawing.Size(128, 32); |
|
155 |
this.BtnSearch.TabIndex = 14; |
|
156 |
this.BtnSearch.Text = "ファイル検索"; |
|
157 |
this.BtnSearch.UseVisualStyleBackColor = false; |
|
158 |
this.BtnSearch.Click += new System.EventHandler(this.BtnSearch_Click); |
|
159 |
// |
|
160 |
// label5 |
|
161 |
// |
|
162 |
this.label5.Anchor = System.Windows.Forms.AnchorStyles.Top; |
|
163 |
this.label5.BackColor = System.Drawing.Color.MintCream; |
|
164 |
this.label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
165 |
this.label5.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
166 |
this.label5.ForeColor = System.Drawing.Color.Black; |
|
167 |
this.label5.Location = new System.Drawing.Point(222, 20); |
|
168 |
this.label5.Name = "label5"; |
|
169 |
this.label5.Size = new System.Drawing.Size(400, 20); |
|
170 |
this.label5.TabIndex = 15; |
|
171 |
this.label5.Text = "住 所 デ ー タ 変 換 処 理"; |
|
172 |
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
173 |
// |
|
174 |
// ExecMessage |
|
175 |
// |
|
176 |
this.ExecMessage.BackColor = System.Drawing.Color.White; |
|
177 |
this.ExecMessage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
178 |
this.ExecMessage.Font = new System.Drawing.Font("MS ゴシック", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
179 |
this.ExecMessage.ForeColor = System.Drawing.Color.Red; |
|
180 |
this.ExecMessage.Location = new System.Drawing.Point(2, 282); |
|
181 |
this.ExecMessage.Name = "ExecMessage"; |
|
182 |
this.ExecMessage.Size = new System.Drawing.Size(840, 40); |
|
183 |
this.ExecMessage.TabIndex = 16; |
|
184 |
this.ExecMessage.Text = "変換処理中です、しばらくお待ちください。"; |
|
185 |
this.ExecMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
186 |
this.ExecMessage.Visible = false; |
|
187 |
// |
|
188 |
// groupBoxEx1 |
|
189 |
// |
|
190 |
this.groupBoxEx1.BackColor = System.Drawing.Color.Black; |
|
191 |
this.groupBoxEx1.BorderColor = System.Drawing.Color.Black; |
|
192 |
this.groupBoxEx1.Controls.Add(this.label7); |
|
193 |
this.groupBoxEx1.Location = new System.Drawing.Point(12, 138); |
|
194 |
this.groupBoxEx1.Name = "groupBoxEx1"; |
|
195 |
this.groupBoxEx1.Size = new System.Drawing.Size(680, 80); |
|
196 |
this.groupBoxEx1.TabIndex = 18; |
|
197 |
this.groupBoxEx1.TabStop = false; |
|
198 |
// |
|
199 |
// label7 |
|
200 |
// |
|
201 |
this.label7.BackColor = System.Drawing.Color.Transparent; |
|
202 |
this.label7.Font = new System.Drawing.Font("MS 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
203 |
this.label7.ForeColor = System.Drawing.Color.Red; |
|
204 |
this.label7.Location = new System.Drawing.Point(10, 10); |
|
205 |
this.label7.Name = "label7"; |
|
206 |
this.label7.Size = new System.Drawing.Size(660, 60); |
|
207 |
this.label7.TabIndex = 18; |
|
208 |
this.label7.Text = "※入力ファイルとなるダウンロード郵便番号データは\r\n 日本郵便の郵便番号データダウンロードより\r\n 該当する都道府県、または全国一括をダウンロードしてください。"; |
|
209 |
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; |
|
210 |
// |
|
211 |
// FrmAddressConvert |
|
212 |
// |
|
213 |
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 16F); |
|
214 |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|
215 |
this.BackColor = System.Drawing.Color.Cornsilk; |
|
216 |
this.ClientSize = new System.Drawing.Size(844, 331); |
|
217 |
this.Controls.Add(this.groupBoxEx1); |
|
218 |
this.Controls.Add(this.BtnSearch); |
|
219 |
this.Controls.Add(this.label5); |
|
220 |
this.Controls.Add(this.btnCancel); |
|
221 |
this.Controls.Add(this.btnOK); |
|
222 |
this.Controls.Add(this.label6); |
|
223 |
this.Controls.Add(this.label3); |
|
224 |
this.Controls.Add(this.label2); |
|
225 |
this.Controls.Add(this.lblInputPath); |
|
226 |
this.Controls.Add(this.label4); |
|
227 |
this.Controls.Add(this.label1); |
|
228 |
this.Controls.Add(this.ExecMessage); |
|
229 |
this.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
230 |
this.ForeColor = System.Drawing.Color.Black; |
|
231 |
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|
232 |
this.Margin = new System.Windows.Forms.Padding(4); |
|
233 |
this.MaximizeBox = false; |
|
234 |
this.MinimizeBox = false; |
|
235 |
this.Name = "FrmAddressConvert"; |
|
236 |
this.ShowIcon = false; |
|
237 |
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
|
238 |
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAddressConvert_FormClosing); |
|
239 |
this.groupBoxEx1.ResumeLayout(false); |
|
240 |
this.ResumeLayout(false); |
|
241 |
|
|
242 |
} |
|
243 |
|
|
244 |
#endregion |
|
245 |
private System.Windows.Forms.Label label1; |
|
246 |
private System.Windows.Forms.Label label2; |
|
247 |
private System.Windows.Forms.Button btnCancel; |
|
248 |
private System.Windows.Forms.Button btnOK; |
|
249 |
private System.Windows.Forms.Label label3; |
|
250 |
private System.Windows.Forms.Label label4; |
|
251 |
private System.Windows.Forms.Label lblInputPath; |
|
252 |
private System.Windows.Forms.Label label6; |
|
253 |
private System.Windows.Forms.Button BtnSearch; |
|
254 |
private System.Windows.Forms.Label label5; |
|
255 |
private System.Windows.Forms.Label ExecMessage; |
|
256 |
private CustomControls.GroupBoxEx groupBoxEx1; |
|
257 |
private System.Windows.Forms.Label label7; |
|
258 |
} |
|
259 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmAddressConvert.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 System.IO; |
|
11 |
using System.IO.Compression; |
|
12 |
using System.Diagnostics; |
|
13 |
using System.Text.RegularExpressions; |
|
14 |
using Microsoft.VisualBasic.FileIO; |
|
15 |
|
|
16 |
using ProcessManagement.Common; |
|
17 |
|
|
18 |
namespace ProcessManagement.Forms.SubForms |
|
19 |
{ |
|
20 |
public partial class FrmAddressConvert : Form |
|
21 |
{ |
|
22 |
#region 定義 |
|
23 |
// log4netログを使用する |
|
24 |
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
25 |
#endregion |
|
26 |
|
|
27 |
#region コンストラクタ |
|
28 |
/// <summary> |
|
29 |
/// コンストラクタ |
|
30 |
/// </summary> |
|
31 |
public FrmAddressConvert() |
|
32 |
{ |
|
33 |
InitializeComponent(); |
|
34 |
} |
|
35 |
#endregion |
|
36 |
|
|
37 |
#region 入力ファイル検索 |
|
38 |
/// <summary> |
|
39 |
/// 入力ファイル検索 |
|
40 |
/// </summary> |
|
41 |
/// <param name="sender"></param> |
|
42 |
/// <param name="e"></param> |
|
43 |
private void BtnSearch_Click(object sender, EventArgs e) |
|
44 |
{ |
|
45 |
// ファイル選択画面オープン |
|
46 |
GetInputPath(); |
|
47 |
} |
|
48 |
#endregion |
|
49 |
|
|
50 |
#region ファイル選択画面オープン |
|
51 |
/// <summary> |
|
52 |
/// ファイル選択画面オープン |
|
53 |
/// </summary> |
|
54 |
private void GetInputPath() |
|
55 |
{ |
|
56 |
try |
|
57 |
{ |
|
58 |
// OpenFileDialogクラスのインスタンスを作成 |
|
59 |
OpenFileDialog ofd = new OpenFileDialog(); |
|
60 |
|
|
61 |
// 「ファイル名」で表示される文字列を指定する |
|
62 |
ofd.FileName = "KEN_ALL.ZIP"; |
|
63 |
|
|
64 |
//はじめに表示されるフォルダを指定する |
|
65 |
ofd.InitialDirectory = @"C:\"; |
|
66 |
|
|
67 |
//[ファイルの種類]に表示される選択肢を指定する |
|
68 |
ofd.Filter = "ZIPファイル(*.zip)|*.zip|すべてのファイル(*.*)|*.*"; |
|
69 |
//[ファイルの種類]ではじめに選択されるものを指定する |
|
70 |
ofd.FilterIndex = 1; |
|
71 |
|
|
72 |
//タイトルを設定する |
|
73 |
ofd.Title = "開くファイルを選択してください"; |
|
74 |
|
|
75 |
//ダイアログボックスを閉じる前に現在のディレクトリを復元するようにする |
|
76 |
ofd.RestoreDirectory = true; |
|
77 |
|
|
78 |
//ダイアログを表示する |
|
79 |
if (ofd.ShowDialog() != DialogResult.OK) ofd.FileName = string.Empty; |
|
80 |
|
|
81 |
//OKボタンがクリックされたとき、選択されたファイル名を表示する |
|
82 |
lblInputPath.Text = ofd.FileName; |
|
83 |
} |
|
84 |
catch (Exception ex) |
|
85 |
{ |
|
86 |
logger.DebugFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
87 |
} |
|
88 |
} |
|
89 |
#endregion |
|
90 |
|
|
91 |
#region 変換実行ボタン押下 |
|
92 |
/// <summary> |
|
93 |
/// 変換実行ボタン押下 |
|
94 |
/// </summary> |
|
95 |
/// <param name="sender"></param> |
|
96 |
/// <param name="e"></param> |
|
97 |
private void btnOK_Click(object sender, EventArgs e) |
|
98 |
{ |
|
99 |
// ファイル選択無しは処理しない |
|
100 |
if (lblInputPath.Text.Length < 1) |
|
101 |
{ |
|
102 |
MessageBox.Show("解凍元ファイルを選択してください。", |
|
103 |
"ファイル選択エラー", |
|
104 |
MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
105 |
return; |
|
106 |
} |
|
107 |
|
|
108 |
string InputPath = string.Empty; |
|
109 |
|
|
110 |
// 郵便番号ファイル解凍処理 |
|
111 |
if (!ExpandZipFile(ref InputPath)) return; |
|
112 |
if (InputPath.Length < 1) return; |
|
113 |
|
|
114 |
// データ変換処理 |
|
115 |
ExecDataConvert(InputPath); |
|
116 |
|
|
117 |
} |
|
118 |
#endregion |
|
119 |
|
|
120 |
#region 郵便番号ファイル解凍処理 |
|
121 |
/// <summary> |
|
122 |
/// 郵便番号ファイル解凍処理 |
|
123 |
/// </summary> |
|
124 |
/// <returns></returns> |
|
125 |
private bool ExpandZipFile(ref string InputPath) |
|
126 |
{ |
|
127 |
try |
|
128 |
{ |
|
129 |
// 解凍元ファイルパス取得 |
|
130 |
string ZipFilePath = @lblInputPath.Text; |
|
131 |
|
|
132 |
// 添付パス取得 |
|
133 |
string tempPath = Path.GetTempPath(); |
|
134 |
|
|
135 |
// ----- 解凍先ファイルパス作成 |
|
136 |
InputPath = string.Format("{0}{1}", ZipFilePath.Substring(0, (ZipFilePath.Length - 4)) |
|
137 |
, CommonDefine.s_CSVFileExtension); |
|
138 |
// 末尾から検索し見つかった位置を取得する |
|
139 |
int nFind = InputPath.LastIndexOf('\\'); |
|
140 |
InputPath = string.Format("{0}{1}", tempPath, |
|
141 |
InputPath.Substring((nFind + 1))); |
|
142 |
|
|
143 |
// 解凍ファイルが存在すれば削除 |
|
144 |
if (File.Exists(InputPath)) File.Delete(InputPath); |
|
145 |
|
|
146 |
// ダウンロードした「現場監督秘書(本体)zip解凍 |
|
147 |
ZipFile.ExtractToDirectory(ZipFilePath, tempPath); |
|
148 |
|
|
149 |
return true; |
|
150 |
} |
|
151 |
catch (Exception ex) |
|
152 |
{ |
|
153 |
logger.DebugFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
154 |
MessageBox.Show("解凍元ファイルの解凍に失敗しました。", |
|
155 |
"解凍エラー", |
|
156 |
MessageBoxButtons.OK, |
|
157 |
MessageBoxIcon.Error); |
|
158 |
return false; |
|
159 |
} |
|
160 |
} |
|
161 |
#endregion |
|
162 |
|
|
163 |
#region データ変換処理 |
|
164 |
/// <summary> |
|
165 |
/// データ変換処理 |
|
166 |
/// </summary> |
|
167 |
private void ExecDataConvert(string InputPath) |
|
168 |
{ |
|
169 |
// 処理時間を計測する |
|
170 |
Stopwatch stw = new Stopwatch(); |
|
171 |
stw.Start(); |
|
172 |
|
|
173 |
try |
|
174 |
{ |
|
175 |
SetControlVisible(true); |
|
176 |
|
|
177 |
//ファイルの読み込み |
|
178 |
string[] InputString = File.ReadAllLines(InputPath, Encoding.Default); |
|
179 |
StringBuilder sb = new StringBuilder(); |
|
180 |
|
|
181 |
string OutPutPath = string.Format("{0}{1}{2}", System.Environment.CurrentDirectory, |
|
182 |
CommonDefine.s_AddreddFileName, |
|
183 |
CommonDefine.s_CSVFileExtension); |
|
184 |
using (StreamWriter OutPutFile |
|
185 |
= new StreamWriter(CommonDefine.s_AddressWorkOutput, |
|
186 |
false, |
|
187 |
Encoding.GetEncoding("shift_jis"))) |
|
188 |
{ |
|
189 |
foreach (string CurrentString in InputString) |
|
190 |
{ |
|
191 |
// カンマで区切られた文字列を取得 |
|
192 |
string[] sArray = CurrentString.Split(','); |
|
193 |
|
|
194 |
sb.Clear(); |
|
195 |
sb.AppendFormat(",,{0},,,,{1},{2},", sArray[2], sArray[6], sArray[7]); |
|
196 |
if (sArray[8].IndexOf("以下に掲載がない場合") < 0) |
|
197 |
{ |
|
198 |
sb.Append(sArray[8]); |
|
199 |
} |
|
200 |
sb.Replace(@"""", ""); |
|
201 |
OutPutFile.WriteLine(sb.ToString()); |
|
202 |
} |
|
203 |
} |
|
204 |
} |
|
205 |
catch (Exception ex) |
|
206 |
{ |
|
207 |
logger.DebugFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
208 |
MessageBox.Show("郵便番号ファイルの読込に失敗しました。", "変換エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
209 |
} |
|
210 |
finally |
|
211 |
{ |
|
212 |
SetControlVisible(false); |
|
213 |
stw.Stop(); |
|
214 |
string DspMsg = "住所データ変換処理を終了しました。\r\n"; |
|
215 |
DspMsg += "工事管理システムの住所データが変更されました。\r\n"; |
|
216 |
//DspMsg += string.Format("処理時間:{0}.{1}秒", stw.Elapsed.Seconds, stw.Elapsed.Milliseconds); |
|
217 |
MessageBox.Show(DspMsg, "処理終了", MessageBoxButtons.OK, MessageBoxIcon.Information); |
|
218 |
} |
|
219 |
} |
|
220 |
#endregion |
|
221 |
|
|
222 |
#region 実行コントロール表示・非表示 |
|
223 |
/// <summary> |
|
224 |
/// 実行コントロール表示・非表示 |
|
225 |
/// </summary> |
|
226 |
private void SetControlVisible(bool bvisible) |
|
227 |
{ |
|
228 |
try |
|
229 |
{ |
|
230 |
ExecMessage.Visible = bvisible; |
|
231 |
btnOK.Visible = !bvisible; |
|
232 |
btnCancel.Visible = !bvisible; |
|
233 |
this.Update(); |
|
234 |
} |
|
235 |
catch (Exception ex) |
|
236 |
{ |
|
237 |
logger.DebugFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
238 |
} |
|
239 |
} |
|
240 |
#endregion |
|
241 |
|
|
242 |
#region キャンセルボタン押下 |
|
243 |
/// <summary> |
|
244 |
/// キャンセルボタン押下 |
|
245 |
/// </summary> |
|
246 |
/// <param name="sender"></param> |
|
247 |
/// <param name="e"></param> |
|
248 |
private void btnCancel_Click(object sender, EventArgs e) |
|
249 |
{ |
|
250 |
this.Close(); |
|
251 |
} |
|
252 |
#endregion |
|
253 |
|
|
254 |
#region ×ボタン |
|
255 |
/// <summary> |
|
256 |
/// ×ボタン |
|
257 |
/// </summary> |
|
258 |
/// <param name="sender"></param> |
|
259 |
/// <param name="e"></param> |
|
260 |
private void FrmAddressConvert_FormClosing(object sender, FormClosingEventArgs e) |
|
261 |
{ |
|
262 |
// 前プロセスに戻る |
|
263 |
ClsExcute.BackProcess(); |
|
264 |
} |
|
265 |
#endregion |
|
266 |
} |
|
267 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmAddressConvert.resx | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<root> |
|
3 |
<!-- |
|
4 |
Microsoft ResX Schema |
|
5 |
|
|
6 |
Version 2.0 |
|
7 |
|
|
8 |
The primary goals of this format is to allow a simple XML format |
|
9 |
that is mostly human readable. The generation and parsing of the |
|
10 |
various data types are done through the TypeConverter classes |
|
11 |
associated with the data types. |
|
12 |
|
|
13 |
Example: |
|
14 |
|
|
15 |
... ado.net/XML headers & schema ... |
|
16 |
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|
17 |
<resheader name="version">2.0</resheader> |
|
18 |
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|
19 |
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|
20 |
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|
21 |
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|
22 |
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|
23 |
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|
24 |
</data> |
|
25 |
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
26 |
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|
27 |
<comment>This is a comment</comment> |
|
28 |
</data> |
|
29 |
|
|
30 |
There are any number of "resheader" rows that contain simple |
|
31 |
name/value pairs. |
|
32 |
|
|
33 |
Each data row contains a name, and value. The row also contains a |
|
34 |
type or mimetype. Type corresponds to a .NET class that support |
|
35 |
text/value conversion through the TypeConverter architecture. |
|
36 |
Classes that don't support this are serialized and stored with the |
|
37 |
mimetype set. |
|
38 |
|
|
39 |
The mimetype is used for serialized objects, and tells the |
|
40 |
ResXResourceReader how to depersist the object. This is currently not |
|
41 |
extensible. For a given mimetype the value must be set accordingly: |
|
42 |
|
|
43 |
Note - application/x-microsoft.net.object.binary.base64 is the format |
|
44 |
that the ResXResourceWriter will generate, however the reader can |
|
45 |
read any of the formats listed below. |
|
46 |
|
|
47 |
mimetype: application/x-microsoft.net.object.binary.base64 |
|
48 |
value : The object must be serialized with |
|
49 |
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|
50 |
: and then encoded with base64 encoding. |
|
51 |
|
|
52 |
mimetype: application/x-microsoft.net.object.soap.base64 |
|
53 |
value : The object must be serialized with |
他の形式にエクスポート: Unified diff