リビジョン 275
出勤日報実装中
承認経路マスタ修正
車両マスタバグ修正
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
|---|---|---|
| 109 | 109 |
SubContractor = 109, // 109:協力会社マスタ |
| 110 | 110 |
Orderers = 110, // 110:発注者マスタ |
| 111 | 111 |
BusinessType = 111, // 111:法人格マスタ |
| 112 |
//Division = 112, // 112:区分マスタ
|
|
| 112 |
ApprovalRouteList = 112, // 112:承認経路一覧
|
|
| 113 | 113 |
//Expenses = 113, // 113:経費率マスタ |
| 114 | 114 |
SubContrItem = 114, // 114:協力会社工種マスタ |
| 115 | 115 |
Calender = 115, // 115:カレンダーマスタ |
| ... | ... | |
| 218 | 218 |
{ (int)MaintenanceExecuteNo.SubContractor, "協力会社登録"}, // 109
|
| 219 | 219 |
{ (int)MaintenanceExecuteNo.Orderers, "発注者登録"}, // 110
|
| 220 | 220 |
{ (int)MaintenanceExecuteNo.BusinessType, "法人格登録"}, // 111
|
| 221 |
//{ (int)MaintenanceExecuteNo.Division, "区分登録"}, // 112
|
|
| 221 |
{ (int)MaintenanceExecuteNo.ApprovalRouteList, "承認経路一覧"}, // 112
|
|
| 222 | 222 |
//{ (int)MaintenanceExecuteNo.Expenses, "経費率登録"}, // 113
|
| 223 |
{ (int)MaintenanceExecuteNo.SubContrItem, "協力会社工種登録"}, // 114
|
|
| 223 |
{ (int)MaintenanceExecuteNo.SubContrItem, "協力会社工種登録"}, // 114
|
|
| 224 | 224 |
{ (int)MaintenanceExecuteNo.Calender, "カレンダー登録"}, // 115
|
| 225 | 225 |
{ (int)MaintenanceExecuteNo.VehicleMaster, "車両登録"}, // 116
|
| 226 | 226 |
{ (int)MaintenanceExecuteNo.TermMaster, "期限登録"}, // 117
|
| ... | ... | |
| 229 | 229 |
{ (int)MaintenanceExecuteNo.ConstructionType, "工事種別登録"}, // 120
|
| 230 | 230 |
{ (int)MaintenanceExecuteNo.AlwaysEmployment, "常雇者登録"}, // 121
|
| 231 | 231 |
{ (int)MaintenanceExecuteNo.Suppliers, "仕入先登録"}, // 122
|
| 232 |
{ (int)MaintenanceExecuteNo.SubContrJobCat, "協力会社職種登録"}, // 123
|
|
| 232 |
{ (int)MaintenanceExecuteNo.SubContrJobCat, "協力会社職種登録"}, // 123
|
|
| 233 | 233 |
{ (int)MaintenanceExecuteNo.Security, "セキュリティ区分登録"}, // 124
|
| 234 | 234 |
{ (int)MaintenanceExecuteNo.OrderDivision, "発注者区分登録"}, // 125
|
| 235 |
{ (int)MaintenanceExecuteNo.ConstrExpenses, "施工経費区分登録"}, // 126
|
|
| 235 |
{ (int)MaintenanceExecuteNo.ConstrExpenses, "施工経費区分登録"}, // 126
|
|
| 236 | 236 |
{ (int)MaintenanceExecuteNo.MaterialKind, "資材種類登録"}, // 127
|
| 237 | 237 |
{ (int)MaintenanceExecuteNo.MaterialItem, "資材品目登録"}, // 128
|
| 238 | 238 |
{ (int)MaintenanceExecuteNo.SalesConfirm, "売上確認"}, // 129
|
| ... | ... | |
| 467 | 467 |
|
| 468 | 468 |
#endregion |
| 469 | 469 |
|
| 470 |
/// <summary> |
|
| 471 |
/// 編集フラグ |
|
| 472 |
/// </summary> |
|
| 473 |
static int m_EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 474 |
|
|
| 470 | 475 |
#region 起動処理 |
| 471 | 476 |
/// <summary> |
| 472 | 477 |
/// プロセス起動 |
| ... | ... | |
| 481 | 486 |
int NowPoint = GetNowProcessPoint(); |
| 482 | 487 |
|
| 483 | 488 |
// 起動チェック |
| 484 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 485 |
if (!ClsSecurityPermission.GetExecutePermission(m_ProcControlPara[NowPoint].ProcNo, ref EditFlg)) |
|
| 489 |
if (!ClsSecurityPermission.GetExecutePermission(m_ProcControlPara[NowPoint].ProcNo, ref m_EditFlg)) |
|
| 486 | 490 |
{
|
| 487 | 491 |
MessageBox.Show("選択された処理の起動権限が設定されていません。", "起動権限確認", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
| 488 | 492 |
BackProcess(); |
| ... | ... | |
| 720 | 724 |
case (int)MaintenanceExecuteNo.SaleSalesGraphData: // 117:売上グラフデータ入力 |
| 721 | 725 |
MaintenanceExecuteNo_SalesGraphData(m_ProcControlPara[NowPoint]); |
| 722 | 726 |
break; |
| 723 |
case (int)MaintenanceExecuteNo.ApprovalRoute: // 118:承認経路マスタ |
|
| 727 |
case (int)MaintenanceExecuteNo.ApprovalRouteList: // 118:承認経路マスタ
|
|
| 724 | 728 |
MaintenanceExecuteNo_ApprovalRoute(m_ProcControlPara[NowPoint]); |
| 725 | 729 |
break; |
| 726 | 730 |
case (int)MaintenanceExecuteNo.ConstructionType: // 119:工事種別マスタ |
| ... | ... | |
| 3151 | 3155 |
public static void MaintenanceExecuteNo_ApprovalRoute(ProcessParameter CurrentPara) |
| 3152 | 3156 |
{
|
| 3153 | 3157 |
// 承認経路マスタ |
| 3154 |
FrmApprovalRoute frm = new FrmApprovalRoute();
|
|
| 3158 |
FrmApprovalDisp frm = new FrmApprovalDisp();
|
|
| 3155 | 3159 |
try |
| 3156 | 3160 |
{
|
| 3157 | 3161 |
// 起動・編集フラグ |
| branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceDailyData.cs | ||
|---|---|---|
| 46 | 46 |
/// </summary> |
| 47 | 47 |
SeqNo, |
| 48 | 48 |
/// <summary> |
| 49 |
/// 工事コード |
|
| 50 |
/// </summary> |
|
| 51 |
ConstructionCode, |
|
| 52 |
/// <summary> |
|
| 49 | 53 |
/// 行動実績 |
| 50 | 54 |
/// </summary> |
| 51 | 55 |
ActionResult, |
| ... | ... | |
| 105 | 109 |
strcmd.Append(" ,DATE_FORMAT(AttendanceDate, '%Y/%m/%d')"); // 日報作成日
|
| 106 | 110 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
| 107 | 111 |
strcmd.Append(" ,ActionResult"); // 行動実績
|
| 112 |
strcmd.Append(" ,ConstructionCode"); // 工事コード
|
|
| 108 | 113 |
strcmd.Append(" ,DATE_FORMAT(StartTime, '%Y/%m/%d %H:%i:%s')"); // 開始時間
|
| 109 | 114 |
strcmd.Append(" ,DATE_FORMAT(CompTime, '%Y/%m/%d %H:%i:%s')"); // 終了時間
|
| 110 | 115 |
strcmd.Append(" ,DayTimes"); // 日稼働合計時間
|
| ... | ... | |
| 211 | 216 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
|
| 212 | 217 |
, work.AttendanceDate.ToShortDateString()); // 日報作成日 |
| 213 | 218 |
strcmd.AppendFormat(", {0}", work.SeqNo); // 明細行番号
|
| 219 |
strcmd.AppendFormat(", {0}", work.ConstructionCode); // 工事番号
|
|
| 214 | 220 |
strcmd.AppendFormat(",'{0}'", work.ActionResult); // 行動実績
|
| 215 | 221 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.StartTime); // 開始時間
|
| 216 | 222 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.CompTime); // 終了時間
|
| ... | ... | |
| 261 | 267 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
|
| 262 | 268 |
, work.AttendanceDate.ToShortDateString()); // 日報作成日 |
| 263 | 269 |
strcmd.AppendFormat(", {0}", work.SeqNo); // 明細行番号
|
| 270 |
strcmd.AppendFormat(", {0}", work.ConstructionCode); // 工事番号
|
|
| 264 | 271 |
strcmd.AppendFormat(",'{0}'", work.ActionResult); // 行動実績
|
| 265 | 272 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.StartTime); // 開始時間
|
| 266 | 273 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.CompTime); // 終了時間
|
| ... | ... | |
| 308 | 315 |
strcmd.AppendFormat(",AttendanceDate = STR_TO_DATE('{0}','%Y/%m/%d')"
|
| 309 | 316 |
, data.AttendanceDate.ToShortDateString()); // 日報作成日 |
| 310 | 317 |
strcmd.AppendFormat(",SeqNo = {0} ", data.SeqNo); // 明細行番号
|
| 318 |
strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode); // 工事番号
|
|
| 311 | 319 |
strcmd.AppendFormat(",ActionResult = '{0}'", data.ActionResult); // 行動実績
|
| 320 |
|
|
| 312 | 321 |
strcmd.AppendFormat(",StartTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
|
| 313 | 322 |
, data.StartTime); // 開始時間 |
| 314 | 323 |
strcmd.AppendFormat(",CompTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
|
| 315 | 324 |
, data.CompTime); // 終了時間 |
| 325 |
|
|
| 316 | 326 |
strcmd.AppendFormat(",DayTimes = {0}", data.DayTimes); // 日稼働合計時間
|
| 317 | 327 |
strcmd.AppendFormat(",WorkingComment = '{0}'", data.WorkingComment); // コメント
|
| 318 | 328 |
strcmd.AppendFormat(",NightFlg = {0}", data.NightFlg); // 夜間作業フラグ
|
| ... | ... | |
| 387 | 397 |
case (int)TableColumn.SeqNo: |
| 388 | 398 |
strcmd.AppendFormat(" SeqNo = {0}", (int)value);
|
| 389 | 399 |
break; |
| 400 |
case (int)TableColumn.ConstructionCode: |
|
| 401 |
strcmd.AppendFormat(" ConstructionCode = {0}", (int)value);
|
|
| 402 |
break; |
|
| 390 | 403 |
case (int)TableColumn.ActionResult: |
| 391 | 404 |
strcmd.AppendFormat(" ActionResult = '{0}'", value.ToString());
|
| 392 | 405 |
break; |
| ... | ... | |
| 436 | 449 |
wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString()); // 担当者コード |
| 437 | 450 |
wrk.AttendanceDate = DateTime.Parse(objwrk[(int)TableColumn.AttendanceDate].ToString()); // 日報作成日 |
| 438 | 451 |
wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString()); // 明細行番号 |
| 452 |
wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString()); // 工事番号 |
|
| 439 | 453 |
wrk.ActionResult = objwrk[(int)TableColumn.ActionResult].ToString(); // 行動実績 |
| 440 | 454 |
wrk.StartTime = DateTime.Parse(objwrk[(int)TableColumn.StartTime].ToString()); |
| 441 | 455 |
wrk.CompTime = DateTime.Parse(objwrk[(int)TableColumn.CompTime].ToString()); |
| branches/src/ProcessManagement/ProcessManagement/DataModel/AttendanceDailyData.cs | ||
|---|---|---|
| 41 | 41 |
/// </summary> |
| 42 | 42 |
private int m_SeqNo = 0; |
| 43 | 43 |
/// <summary> |
| 44 |
/// 工事コード |
|
| 45 |
/// </summary> |
|
| 46 |
private int m_ConstructionCode = 0; |
|
| 47 |
/// <summary> |
|
| 44 | 48 |
/// 行動実績 |
| 45 | 49 |
/// </summary> |
| 46 | 50 |
private string m_ActionResult = string.Empty; |
| ... | ... | |
| 100 | 104 |
set { m_SeqNo = value; }
|
| 101 | 105 |
} |
| 102 | 106 |
/// <summary> |
| 103 |
/// 工事番号
|
|
| 107 |
/// 工事コード
|
|
| 104 | 108 |
/// </summary> |
| 109 |
public int ConstructionCode |
|
| 110 |
{
|
|
| 111 |
get { return m_ConstructionCode; }
|
|
| 112 |
set { m_ConstructionCode = value; }
|
|
| 113 |
} |
|
| 114 |
/// <summary> |
|
| 115 |
/// 行動実績 |
|
| 116 |
/// </summary> |
|
| 105 | 117 |
public string ActionResult |
| 106 | 118 |
{
|
| 107 | 119 |
get { return m_ActionResult; }
|
| branches/src/ProcessManagement/ProcessManagement/Forms/Master/ApprovalRoute/FrmApprovalDisp.cs | ||
|---|---|---|
| 1 |
using System; |
|
| 2 |
using System.Collections.Generic; |
|
| 3 |
using System.ComponentModel; |
|
| 4 |
using System.Data; |
|
| 5 |
using System.Drawing; |
|
| 6 |
using System.Linq; |
|
| 7 |
using System.Text; |
|
| 8 |
using System.Windows.Forms; |
|
| 9 |
using System.Collections; |
|
| 10 |
using System.Diagnostics; |
|
| 11 |
using System.Threading; |
|
| 12 |
|
|
| 13 |
using log4net; |
|
| 14 |
using log4net.Appender; |
|
| 15 |
using log4net.Repository.Hierarchy; |
|
| 16 |
|
|
| 17 |
using ProcessManagement.Common; |
|
| 18 |
using ProcessManagement.DB.IOAccess; |
|
| 19 |
using ProcessManagement.DataModel; |
|
| 20 |
using ProcessManagement.DB.Core; |
|
| 21 |
using ProcessManagement.Forms.SubForms; |
|
| 22 |
using ProcessManagement.Forms.CustomControls; |
|
| 23 |
using ProcessManagement.Forms.ControlsAction; |
|
| 24 |
//*--------------------- 承認経路マスタ一覧画面 -------------------------------* |
|
| 25 |
// 2017/09/27 Ver1.0.0.0 Create Source |
|
| 26 |
// |
|
| 27 |
// |
|
| 28 |
// |
|
| 29 |
//*----------------------------------------------------------------------------* |
|
| 30 |
namespace ProcessManagement.Forms.Master |
|
| 31 |
{
|
|
| 32 |
public partial class FrmApprovalDisp : Form |
|
| 33 |
{
|
|
| 34 |
#region 使用定義 |
|
| 35 |
//log4netログを使用する |
|
| 36 |
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
| 37 |
#endregion |
|
| 38 |
|
|
| 39 |
#region 定数 |
|
| 40 |
#region グリッド固定カラム |
|
| 41 |
/// <summary> |
|
| 42 |
/// グリッド固定カラム |
|
| 43 |
/// </summary> |
|
| 44 |
private enum GridColumn |
|
| 45 |
{
|
|
| 46 |
No = 0, |
|
| 47 |
DepartmentCode, |
|
| 48 |
ApprovalCode, |
|
| 49 |
ApprovalName, |
|
| 50 |
} |
|
| 51 |
#endregion |
|
| 52 |
|
|
| 53 |
#region デフォルト色 |
|
| 54 |
/// <summary> |
|
| 55 |
/// デフォルト色 |
|
| 56 |
/// </summary> |
|
| 57 |
private static Color s_LastApproval = Color.LightSalmon; |
|
| 58 |
#endregion |
|
| 59 |
|
|
| 60 |
#endregion |
|
| 61 |
|
|
| 62 |
#region 参照フラグ |
|
| 63 |
/// <summary> |
|
| 64 |
/// 参照フラグ |
|
| 65 |
/// </summary> |
|
| 66 |
private bool m_EditLock = false; |
|
| 67 |
#endregion |
|
| 68 |
|
|
| 69 |
#region プロパティ |
|
| 70 |
|
|
| 71 |
/// <summary> |
|
| 72 |
/// 参照フラグ |
|
| 73 |
/// </summary> |
|
| 74 |
public bool EditLock |
|
| 75 |
{
|
|
| 76 |
get { return m_EditLock; }
|
|
| 77 |
set { m_EditLock = value; }
|
|
| 78 |
} |
|
| 79 |
#endregion |
|
| 80 |
|
|
| 81 |
#region コンストラクタ |
|
| 82 |
public FrmApprovalDisp() |
|
| 83 |
{
|
|
| 84 |
InitializeComponent(); |
|
| 85 |
} |
|
| 86 |
#endregion |
|
| 87 |
#region デストラクタ |
|
| 88 |
~FrmApprovalDisp() |
|
| 89 |
{
|
|
| 90 |
try |
|
| 91 |
{
|
|
| 92 |
GC.Collect(); |
|
| 93 |
} |
|
| 94 |
catch (Exception ex) |
|
| 95 |
{
|
|
| 96 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 97 |
} |
|
| 98 |
} |
|
| 99 |
#endregion |
|
| 100 |
|
|
| 101 |
#region フォームロード |
|
| 102 |
/// <summary> |
|
| 103 |
/// 初期フォームロード |
|
| 104 |
/// </summary> |
|
| 105 |
/// <param name="sender"></param> |
|
| 106 |
/// <param name="e"></param> |
|
| 107 |
private void FrmApprovalDisp_Load(object sender, EventArgs e) |
|
| 108 |
{
|
|
| 109 |
// 初期表示 |
|
| 110 |
InitDispGrid(); |
|
| 111 |
} |
|
| 112 |
#endregion |
|
| 113 |
|
|
| 114 |
#region ×ボタン押下 |
|
| 115 |
/// <summary> |
|
| 116 |
/// ×ボタン押下処理 |
|
| 117 |
/// </summary> |
|
| 118 |
/// <param name="sender"></param> |
|
| 119 |
/// <param name="e"></param> |
|
| 120 |
private void FrmApprovalDisp_FormClosing(object sender, FormClosingEventArgs e) |
|
| 121 |
{
|
|
| 122 |
// 前プロセスに戻る |
|
| 123 |
ClsExcute.BackProcess(); |
|
| 124 |
} |
|
| 125 |
#endregion |
|
| 126 |
|
|
| 127 |
#region 終了ボタン |
|
| 128 |
/// <summary> |
|
| 129 |
/// 終了ボタンクリック |
|
| 130 |
/// </summary> |
|
| 131 |
/// <param name="sender"></param> |
|
| 132 |
/// <param name="e"></param> |
|
| 133 |
private void btnEnd_Click(object sender, EventArgs e) |
|
| 134 |
{
|
|
| 135 |
this.Close(); |
|
| 136 |
} |
|
| 137 |
#endregion |
|
| 138 |
|
|
| 139 |
#region グリッドダブルクリック |
|
| 140 |
/// <summary> |
|
| 141 |
/// グリッドダブルクリック |
|
| 142 |
/// </summary> |
|
| 143 |
/// <param name="sender"></param> |
|
| 144 |
/// <param name="e"></param> |
|
| 145 |
private void dgvProcess_CellDoubleClick(object sender, DataGridViewCellEventArgs e) |
|
| 146 |
{
|
|
| 147 |
EntryDisp(); |
|
| 148 |
} |
|
| 149 |
#endregion |
|
| 150 |
} |
|
| 151 |
} |
|
| branches/src/ProcessManagement/ProcessManagement/Forms/Master/ApprovalRoute/FrmApprovalDisp.designer.cs | ||
|---|---|---|
| 1 |
using ProcessManagement.Forms.CustomControls; |
|
| 2 |
namespace ProcessManagement.Forms.Master |
|
| 3 |
{
|
|
| 4 |
partial class FrmApprovalDisp |
|
| 5 |
{
|
|
| 6 |
/// <summary> |
|
| 7 |
/// 必要なデザイナ変数です。 |
|
| 8 |
/// </summary> |
|
| 9 |
private System.ComponentModel.IContainer components = null; |
|
| 10 |
|
|
| 11 |
/// <summary> |
|
| 12 |
/// 使用中のリソースをすべてクリーンアップします。 |
|
| 13 |
/// </summary> |
|
| 14 |
/// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param> |
|
| 15 |
protected override void Dispose(bool disposing) |
|
| 16 |
{
|
|
| 17 |
if (disposing && (components != null)) |
|
| 18 |
{
|
|
| 19 |
components.Dispose(); |
|
| 20 |
} |
|
| 21 |
base.Dispose(disposing); |
|
| 22 |
} |
|
| 23 |
|
|
| 24 |
#region Windows フォーム デザイナで生成されたコード |
|
| 25 |
|
|
| 26 |
/// <summary> |
|
| 27 |
/// デザイナ サポートに必要なメソッドです。このメソッドの内容を |
|
| 28 |
/// コード エディタで変更しないでください。 |
|
| 29 |
/// </summary> |
|
| 30 |
private void InitializeComponent() |
|
| 31 |
{
|
|
| 32 |
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); |
|
| 33 |
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); |
|
| 34 |
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); |
|
| 35 |
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); |
|
| 36 |
this.btnEnd = new System.Windows.Forms.Button(); |
|
| 37 |
this.label1 = new System.Windows.Forms.Label(); |
|
| 38 |
this.dgvProcess = new ProcessManagement.Forms.CustomControls.DataGridViewEX(); |
|
| 39 |
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
|
| 40 |
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
|
| 41 |
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
|
| 42 |
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
|
| 43 |
this.lblLastAppColor = new System.Windows.Forms.Label(); |
|
| 44 |
this.label3 = new System.Windows.Forms.Label(); |
|
| 45 |
((System.ComponentModel.ISupportInitialize)(this.dgvProcess)).BeginInit(); |
|
| 46 |
this.SuspendLayout(); |
|
| 47 |
// |
|
| 48 |
// btnEnd |
|
| 49 |
// |
|
| 50 |
this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
|
| 51 |
this.btnEnd.BackColor = System.Drawing.Color.Blue; |
|
| 52 |
this.btnEnd.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
|
| 53 |
this.btnEnd.ForeColor = System.Drawing.Color.White; |
|
| 54 |
this.btnEnd.Location = new System.Drawing.Point(1128, 655); |
|
| 55 |
this.btnEnd.Name = "btnEnd"; |
|
| 56 |
this.btnEnd.Size = new System.Drawing.Size(120, 30); |
|
| 57 |
this.btnEnd.TabIndex = 6; |
|
| 58 |
this.btnEnd.Text = "終 了"; |
|
| 59 |
this.btnEnd.UseVisualStyleBackColor = false; |
|
| 60 |
this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click); |
|
| 61 |
// |
|
| 62 |
// label1 |
|
| 63 |
// |
|
| 64 |
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top; |
|
| 65 |
this.label1.BackColor = System.Drawing.Color.Gold; |
|
| 66 |
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
| 67 |
this.label1.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
|
| 68 |
this.label1.ForeColor = System.Drawing.Color.Black; |
|
| 69 |
this.label1.Location = new System.Drawing.Point(380, 10); |
|
| 70 |
this.label1.Name = "label1"; |
|
| 71 |
this.label1.Size = new System.Drawing.Size(500, 20); |
|
| 72 |
this.label1.TabIndex = 5; |
|
| 73 |
this.label1.Text = "承 認 経 路 一 覧"; |
|
| 74 |
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
|
| 75 |
// |
|
| 76 |
// dgvProcess |
|
| 77 |
// |
|
| 78 |
this.dgvProcess.AllowUserToAddRows = false; |
|
| 79 |
this.dgvProcess.AllowUserToDeleteRows = false; |
|
| 80 |
this.dgvProcess.AllowUserToResizeColumns = false; |
|
| 81 |
this.dgvProcess.AllowUserToResizeRows = false; |
|
| 82 |
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); |
|
| 83 |
this.dgvProcess.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; |
|
| 84 |
this.dgvProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
|
| 85 |
| System.Windows.Forms.AnchorStyles.Left) |
|
| 86 |
| System.Windows.Forms.AnchorStyles.Right))); |
|
| 87 |
this.dgvProcess.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; |
|
| 88 |
this.dgvProcess.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); |
|
| 89 |
this.dgvProcess.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
| 90 |
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.BottomCenter; |
|
| 91 |
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; |
|
| 92 |
dataGridViewCellStyle2.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
|
| 93 |
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; |
|
| 94 |
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
|
| 95 |
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
|
| 96 |
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
|
| 97 |
this.dgvProcess.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; |
|
| 98 |
this.dgvProcess.ColumnHeadersHeight = 24; |
|
| 99 |
this.dgvProcess.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; |
|
| 100 |
this.dgvProcess.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
|
| 101 |
this.Column1, |
|
| 102 |
this.Column4, |
|
| 103 |
this.Column2, |
|
| 104 |
this.Column3}); |
|
| 105 |
this.dgvProcess.ImeMode = System.Windows.Forms.ImeMode.Disable; |
|
| 106 |
this.dgvProcess.Location = new System.Drawing.Point(10, 40); |
|
| 107 |
this.dgvProcess.Name = "dgvProcess"; |
|
| 108 |
this.dgvProcess.RowHeadersVisible = false; |
|
| 109 |
this.dgvProcess.RowHeadersWidth = 20; |
|
| 110 |
this.dgvProcess.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; |
|
| 111 |
this.dgvProcess.RowTemplate.Height = 20; |
|
| 112 |
this.dgvProcess.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; |
|
| 113 |
this.dgvProcess.Size = new System.Drawing.Size(1240, 606); |
|
| 114 |
this.dgvProcess.TabIndex = 28; |
|
| 115 |
this.dgvProcess.TabStop = false; |
|
| 116 |
this.dgvProcess.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProcess_CellDoubleClick); |
|
| 117 |
// |
|
| 118 |
// Column1 |
|
| 119 |
// |
|
| 120 |
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |
|
| 121 |
dataGridViewCellStyle3.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
| 122 |
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black; |
|
| 123 |
this.Column1.DefaultCellStyle = dataGridViewCellStyle3; |
|
| 124 |
this.Column1.Frozen = true; |
|
| 125 |
this.Column1.HeaderText = "№"; |
|
| 126 |
this.Column1.Name = "Column1"; |
|
| 127 |
this.Column1.ReadOnly = true; |
|
| 128 |
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
|
| 129 |
this.Column1.Width = 60; |
|
| 130 |
// |
|
| 131 |
// Column4 |
|
| 132 |
// |
|
| 133 |
this.Column4.Frozen = true; |
|
| 134 |
this.Column4.HeaderText = "部署コード"; |
|
| 135 |
this.Column4.Name = "Column4"; |
|
| 136 |
this.Column4.ReadOnly = true; |
|
| 137 |
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
|
| 138 |
this.Column4.Visible = false; |
|
| 139 |
// |
|
| 140 |
// Column2 |
|
| 141 |
// |
|
| 142 |
this.Column2.Frozen = true; |
|
| 143 |
this.Column2.HeaderText = "承認コード"; |
|
| 144 |
this.Column2.Name = "Column2"; |
|
| 145 |
this.Column2.ReadOnly = true; |
|
| 146 |
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
|
| 147 |
this.Column2.Visible = false; |
|
| 148 |
this.Column2.Width = 60; |
|
| 149 |
// |
|
| 150 |
// Column3 |
|
| 151 |
// |
|
| 152 |
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
|
| 153 |
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black; |
|
| 154 |
this.Column3.DefaultCellStyle = dataGridViewCellStyle4; |
|
| 155 |
this.Column3.Frozen = true; |
|
| 156 |
this.Column3.HeaderText = "承 認 名 称"; |
|
| 157 |
this.Column3.MaxInputLength = 50; |
|
| 158 |
this.Column3.Name = "Column3"; |
|
| 159 |
this.Column3.ReadOnly = true; |
|
| 160 |
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
|
| 161 |
this.Column3.Width = 560; |
|
| 162 |
// |
|
| 163 |
// lblLastAppColor |
|
| 164 |
// |
|
| 165 |
this.lblLastAppColor.BackColor = System.Drawing.Color.White; |
|
| 166 |
this.lblLastAppColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
|
| 167 |
this.lblLastAppColor.Location = new System.Drawing.Point(10, 658); |
|
| 168 |
this.lblLastAppColor.Name = "lblLastAppColor"; |
|
| 169 |
this.lblLastAppColor.Size = new System.Drawing.Size(100, 20); |
|
| 170 |
this.lblLastAppColor.TabIndex = 32; |
|
| 171 |
// |
|
| 172 |
// label3 |
|
| 173 |
// |
|
| 174 |
this.label3.Location = new System.Drawing.Point(110, 660); |
|
| 175 |
this.label3.Name = "label3"; |
|
| 176 |
this.label3.Size = new System.Drawing.Size(100, 20); |
|
| 177 |
this.label3.TabIndex = 33; |
|
| 178 |
this.label3.Text = "最終承認者"; |
|
| 179 |
// |
|
| 180 |
// FrmApprovalDisp |
|
| 181 |
// |
|
| 182 |
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|
| 183 |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|
| 184 |
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; |
|
| 185 |
this.BackColor = System.Drawing.Color.Black; |
|
| 186 |
this.ClientSize = new System.Drawing.Size(1260, 692); |
|
| 187 |
this.Controls.Add(this.lblLastAppColor); |
|
| 188 |
this.Controls.Add(this.label3); |
|
| 189 |
this.Controls.Add(this.dgvProcess); |
|
| 190 |
this.Controls.Add(this.label1); |
|
| 191 |
this.Controls.Add(this.btnEnd); |
|
| 192 |
this.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
|
| 193 |
this.ForeColor = System.Drawing.Color.White; |
|
| 194 |
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; |
|
| 195 |
this.KeyPreview = true; |
|
| 196 |
this.MaximizeBox = false; |
|
| 197 |
this.MinimizeBox = false; |
|
| 198 |
this.Name = "FrmApprovalDisp"; |
|
| 199 |
this.ShowIcon = false; |
|
| 200 |
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
|
| 201 |
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmApprovalDisp_FormClosing); |
|
| 202 |
this.Load += new System.EventHandler(this.FrmApprovalDisp_Load); |
|
| 203 |
((System.ComponentModel.ISupportInitialize)(this.dgvProcess)).EndInit(); |
|
| 204 |
this.ResumeLayout(false); |
|
| 205 |
|
|
| 206 |
} |
|
| 207 |
|
|
| 208 |
#endregion |
|
| 209 |
|
|
| 210 |
private System.Windows.Forms.Button btnEnd; |
|
| 211 |
private System.Windows.Forms.Label label1; |
|
| 212 |
private DataGridViewEX dgvProcess; |
|
| 213 |
private System.Windows.Forms.DataGridViewTextBoxColumn Column1; |
|
| 214 |
private System.Windows.Forms.DataGridViewTextBoxColumn Column4; |
|
| 215 |
private System.Windows.Forms.DataGridViewTextBoxColumn Column2; |
|
| 216 |
private System.Windows.Forms.DataGridViewTextBoxColumn Column3; |
|
| 217 |
private System.Windows.Forms.Label lblLastAppColor; |
|
| 218 |
private System.Windows.Forms.Label label3; |
|
| 219 |
} |
|
| 220 |
} |
|
| branches/src/ProcessManagement/ProcessManagement/Forms/Master/ApprovalRoute/FrmApprovalDisp.resx | ||
|---|---|---|
| 1 |
<?xml version="1.0" encoding="utf-8"?> |
|
| 2 |
<root> |
|
| 3 |
<!-- |
|
| 4 |
Microsoft ResX Schema |
|
| 5 |
|
|
| 6 |
Version 2.0 |
|
| 7 |
|
|
| 8 |
The primary goals of this format is to allow a simple XML format |
|
| 9 |
that is mostly human readable. The generation and parsing of the |
|
| 10 |
various data types are done through the TypeConverter classes |
|
| 11 |
associated with the data types. |
|
| 12 |
|
|
| 13 |
Example: |
|
| 14 |
|
|
| 15 |
... ado.net/XML headers & schema ... |
|
| 16 |
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|
| 17 |
<resheader name="version">2.0</resheader> |
|
| 18 |
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|
| 19 |
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|
| 20 |
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|
| 21 |
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|
| 22 |
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|
| 23 |
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|
| 24 |
</data> |
|
| 25 |
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
| 26 |
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|
| 27 |
<comment>This is a comment</comment> |
|
| 28 |
</data> |
|
| 29 |
|
|
| 30 |
There are any number of "resheader" rows that contain simple |
|
| 31 |
name/value pairs. |
|
| 32 |
|
|
| 33 |
Each data row contains a name, and value. The row also contains a |
|
| 34 |
type or mimetype. Type corresponds to a .NET class that support |
|
| 35 |
text/value conversion through the TypeConverter architecture. |
|
| 36 |
Classes that don't support this are serialized and stored with the |
|
| 37 |
mimetype set. |
|
| 38 |
|
|
| 39 |
The mimetype is used for serialized objects, and tells the |
|
| 40 |
ResXResourceReader how to depersist the object. This is currently not |
|
| 41 |
extensible. For a given mimetype the value must be set accordingly: |
|
| 42 |
|
|
| 43 |
Note - application/x-microsoft.net.object.binary.base64 is the format |
|
| 44 |
that the ResXResourceWriter will generate, however the reader can |
|
| 45 |
read any of the formats listed below. |
|
| 46 |
|
|
| 47 |
mimetype: application/x-microsoft.net.object.binary.base64 |
|
| 48 |
value : The object must be serialized with |
|
| 49 |
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|
| 50 |
: and then encoded with base64 encoding. |
|
| 51 |
|
|
| 52 |
mimetype: application/x-microsoft.net.object.soap.base64 |
|
| 53 |
value : The object must be serialized with |
|
| 54 |
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|
| 55 |
: and then encoded with base64 encoding. |
|
| 56 |
|
|
| 57 |
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|
| 58 |
value : The object must be serialized into a byte array |
|
| 59 |
: using a System.ComponentModel.TypeConverter |
|
| 60 |
: and then encoded with base64 encoding. |
|
| 61 |
--> |
|
| 62 |
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|
| 63 |
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|
| 64 |
<xsd:element name="root" msdata:IsDataSet="true"> |
|
| 65 |
<xsd:complexType> |
|
| 66 |
<xsd:choice maxOccurs="unbounded"> |
|
| 67 |
<xsd:element name="metadata"> |
|
| 68 |
<xsd:complexType> |
|
| 69 |
<xsd:sequence> |
|
| 70 |
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|
| 71 |
</xsd:sequence> |
|
| 72 |
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|
| 73 |
<xsd:attribute name="type" type="xsd:string" /> |
|
| 74 |
<xsd:attribute name="mimetype" type="xsd:string" /> |
|
| 75 |
<xsd:attribute ref="xml:space" /> |
|
| 76 |
</xsd:complexType> |
|
| 77 |
</xsd:element> |
|
| 78 |
<xsd:element name="assembly"> |
|
| 79 |
<xsd:complexType> |
|
| 80 |
<xsd:attribute name="alias" type="xsd:string" /> |
|
| 81 |
<xsd:attribute name="name" type="xsd:string" /> |
|
| 82 |
</xsd:complexType> |
|
| 83 |
</xsd:element> |
|
| 84 |
<xsd:element name="data"> |
|
| 85 |
<xsd:complexType> |
|
| 86 |
<xsd:sequence> |
|
| 87 |
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|
| 88 |
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|
| 89 |
</xsd:sequence> |
|
| 90 |
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|
| 91 |
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|
| 92 |
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|
| 93 |
<xsd:attribute ref="xml:space" /> |
|
| 94 |
</xsd:complexType> |
|
| 95 |
</xsd:element> |
|
| 96 |
<xsd:element name="resheader"> |
|
| 97 |
<xsd:complexType> |
|
| 98 |
<xsd:sequence> |
|
| 99 |
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|
| 100 |
</xsd:sequence> |
|
| 101 |
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|
| 102 |
</xsd:complexType> |
|
| 103 |
</xsd:element> |
|
| 104 |
</xsd:choice> |
|
| 105 |
</xsd:complexType> |
|
| 106 |
</xsd:element> |
|
| 107 |
</xsd:schema> |
|
| 108 |
<resheader name="resmimetype"> |
|
| 109 |
<value>text/microsoft-resx</value> |
|
| 110 |
</resheader> |
|
| 111 |
<resheader name="version"> |
|
| 112 |
<value>2.0</value> |
|
| 113 |
</resheader> |
|
| 114 |
<resheader name="reader"> |
|
| 115 |
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|
| 116 |
</resheader> |
|
| 117 |
<resheader name="writer"> |
|
| 118 |
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|
| 119 |
</resheader> |
|
| 120 |
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|
| 121 |
<value>True</value> |
|
| 122 |
</metadata> |
|
| 123 |
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|
| 124 |
<value>True</value> |
|
| 125 |
</metadata> |
|
| 126 |
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|
| 127 |
<value>True</value> |
|
| 128 |
</metadata> |
|
| 129 |
</root> |
|
| branches/src/ProcessManagement/ProcessManagement/Forms/Master/ApprovalRoute/FrmApprovalDispAux.cs | ||
|---|---|---|
| 1 |
using System; |
|
| 2 |
using System.Collections.Generic; |
|
| 3 |
using System.ComponentModel; |
|
| 4 |
using System.Data; |
|
| 5 |
using System.Drawing; |
|
| 6 |
using System.Linq; |
|
| 7 |
using System.Text; |
|
| 8 |
using System.Windows.Forms; |
|
| 9 |
using System.Collections; |
|
| 10 |
using System.Diagnostics; |
|
| 11 |
using System.Threading; |
|
| 12 |
|
|
| 13 |
using log4net; |
|
| 14 |
using log4net.Appender; |
|
| 15 |
using log4net.Repository.Hierarchy; |
|
| 16 |
|
|
| 17 |
using ProcessManagement.Common; |
|
| 18 |
using ProcessManagement.DB.IOAccess; |
|
| 19 |
using ProcessManagement.DataModel; |
|
| 20 |
using ProcessManagement.DB.Core; |
|
| 21 |
using ProcessManagement.Forms.SubForms; |
|
| 22 |
using ProcessManagement.Forms.CustomControls; |
|
| 23 |
using ProcessManagement.Forms.ControlsAction; |
|
| 24 |
|
|
| 25 |
namespace ProcessManagement.Forms.Master |
|
| 26 |
{
|
|
| 27 |
public partial class FrmApprovalDisp |
|
| 28 |
{
|
|
| 29 |
#region 取得テーブルデータ並び |
|
| 30 |
/// <summary> |
|
| 31 |
/// 取得テーブルデータ並び |
|
| 32 |
/// </summary> |
|
| 33 |
private enum DispRecCol |
|
| 34 |
{
|
|
| 35 |
DepartmentCode, |
|
| 36 |
DepartmentString, |
|
| 37 |
DepDispOrder, |
|
| 38 |
ApprovalCode, |
|
| 39 |
ApprovalName, |
|
| 40 |
ApprovalPerson, |
|
| 41 |
ApprovalAuthority, |
|
| 42 |
AppDispOrder, |
|
| 43 |
PersonCode, |
|
| 44 |
PersonName, |
|
| 45 |
} |
|
| 46 |
#endregion |
|
| 47 |
|
|
| 48 |
#region 初期時データ取得 |
|
| 49 |
/// <summary> |
|
| 50 |
/// 初期時データ取得 |
|
| 51 |
/// </summary> |
|
| 52 |
private bool InitDispGrid() |
|
| 53 |
{
|
|
| 54 |
DataGridView dgv = dgvProcess; |
|
| 55 |
IOMApproval AppDB = new IOMApproval(); |
|
| 56 |
try |
|
| 57 |
{
|
|
| 58 |
lblLastAppColor.BackColor = s_LastApproval; |
|
| 59 |
|
|
| 60 |
// グリッドの行を0に戻す |
|
| 61 |
dgv.Rows.Clear(); |
|
| 62 |
|
|
| 63 |
// データ取得 |
|
| 64 |
StringBuilder strcmd = new StringBuilder(); |
|
| 65 |
strcmd.Append("Select");
|
|
| 66 |
strcmd.Append(" A.DepartmentCode,");
|
|
| 67 |
strcmd.Append(" A.DepartmentString,");
|
|
| 68 |
strcmd.Append(" A.DisplayOrder,");
|
|
| 69 |
strcmd.Append(" B.ApprovalCode,");
|
|
| 70 |
strcmd.Append(" '',");
|
|
| 71 |
strcmd.Append(" B.ApprovalPerson,");
|
|
| 72 |
strcmd.Append(" B.ApprovalAuthority,");
|
|
| 73 |
strcmd.Append(" B.DisplayOrder,");
|
|
| 74 |
strcmd.Append(" C.PersonCode,");
|
|
| 75 |
strcmd.Append(" C.PersonName");
|
|
| 76 |
strcmd.Append(" From");
|
|
| 77 |
strcmd.Append(" departmentmaster AS A");
|
|
| 78 |
strcmd.Append(" Left Join approvalmaster AS B");
|
|
| 79 |
strcmd.Append(" ON B.DepartmentCode = A.DepartmentCode");
|
|
| 80 |
strcmd.Append(" Left Join personinchargemaster AS C");
|
|
| 81 |
strcmd.Append(" ON C.PersonCode= B.ApprovalPerson");
|
|
| 82 |
strcmd.Append(" Order by");
|
|
| 83 |
strcmd.Append(" A.DisplayOrder,");
|
|
| 84 |
strcmd.Append(" B.ApprovalCode,");
|
|
| 85 |
strcmd.Append(" B.DisplayOrder desc");
|
|
| 86 |
ArrayList ReadList = new ArrayList(); |
|
| 87 |
if (!AppDB.ExecuteReader(strcmd.ToString(), ref ReadList)) return false; |
|
| 88 |
|
|
| 89 |
// 取得データを表示配列へセット |
|
| 90 |
ArrayList DispList = new ArrayList(); |
|
| 91 |
CreateDispArray(ReadList, ref DispList); |
|
| 92 |
|
|
| 93 |
// 最初に承認者を6人分追加する |
|
| 94 |
CreateColumn(6); |
|
| 95 |
|
|
| 96 |
// データ表示 |
|
| 97 |
int nDepCode = 0; |
|
| 98 |
int nAppCode = 0; |
|
| 99 |
ArrayList AppRowList = new ArrayList(); |
|
| 100 |
foreach (object[] objwrk in DispList) |
|
| 101 |
{
|
|
| 102 |
// 部署が違えば部署名表示 |
|
| 103 |
if (nDepCode != CommonMotions.cnvInt(objwrk[(int)DispRecCol.DepartmentCode])) |
|
| 104 |
{
|
|
| 105 |
if (nAppCode != 0) SetGridRowData(ref AppRowList); |
|
| 106 |
SetGridDepTitile(objwrk); |
|
| 107 |
nDepCode = CommonMotions.cnvInt(objwrk[0]); |
|
| 108 |
m_nDataNo = 0; |
|
| 109 |
nAppCode = 0; |
|
| 110 |
} |
|
| 111 |
if (nAppCode != CommonMotions.cnvInt(objwrk[(int)DispRecCol.ApprovalCode])) |
|
| 112 |
{
|
|
| 113 |
if (nAppCode != 0) SetGridRowData(ref AppRowList); |
|
| 114 |
nAppCode = CommonMotions.cnvInt(objwrk[(int)DispRecCol.ApprovalCode]); |
|
| 115 |
} |
|
| 116 |
|
|
| 117 |
AppRowList.Add(objwrk); |
|
| 118 |
} |
|
| 119 |
|
|
| 120 |
// タイトル行の色セット |
|
| 121 |
GridDepTitileColor(); |
|
| 122 |
|
|
| 123 |
// 行を選択しない |
|
| 124 |
dgv.ClearSelection(); |
|
| 125 |
|
|
| 126 |
return true; |
|
| 127 |
} |
|
| 128 |
catch (Exception ex) |
|
| 129 |
{
|
|
| 130 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 131 |
return false; |
|
| 132 |
} |
|
| 133 |
finally |
|
| 134 |
{
|
|
| 135 |
AppDB.close(); AppDB = null; |
|
| 136 |
|
|
| 137 |
int AddRowCnt1 = CommonDefine.s_MaxInitLineCountMastamente - dgv.Rows.Count; |
|
| 138 |
if (AddRowCnt1 > 0) dgv.Rows.Add(AddRowCnt1); |
|
| 139 |
} |
|
| 140 |
} |
|
| 141 |
#endregion |
|
| 142 |
|
|
| 143 |
#region 表示データ配列作成 |
|
| 144 |
/// <summary> |
|
| 145 |
/// 表示データ配列作成 |
|
| 146 |
/// </summary> |
|
| 147 |
/// <param name="ReadList"></param> |
|
| 148 |
/// <param name="DispList"></param> |
|
| 149 |
private void CreateDispArray(ArrayList ReadList, ref ArrayList DispList) |
|
| 150 |
{
|
|
| 151 |
IOMDepartment DepDB = new IOMDepartment(); |
|
| 152 |
try |
|
| 153 |
{
|
|
| 154 |
StringBuilder strSQL = new StringBuilder(); |
|
| 155 |
strSQL.Append(" Where DeleteFlg = 0");
|
|
| 156 |
strSQL.Append(" Order by DisplayOrder");
|
|
| 157 |
List<DepartmentMaster> DepList = new List<DepartmentMaster>(); |
|
| 158 |
if (!DepDB.SelectAction(strSQL.ToString(), ref DepList)) return; |
|
| 159 |
|
|
| 160 |
int depCode = 0; |
|
| 161 |
int appCode = 0; |
|
| 162 |
int AddCnt = 0; |
|
| 163 |
foreach (DepartmentMaster DepRec in DepList) |
|
| 164 |
{
|
|
| 165 |
foreach (KeyValuePair<int, string> AppList in ClsExcute.AppovalList) |
|
| 166 |
{
|
|
| 167 |
AddCnt = 0; |
|
| 168 |
foreach (object[] objRec in ReadList) |
|
| 169 |
{
|
|
| 170 |
depCode = CommonMotions.cnvInt(objRec[(int)DispRecCol.DepartmentCode]); |
|
| 171 |
appCode = CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalCode]); |
|
| 172 |
// 部署が違う場合は処理しない |
|
| 173 |
if (DepRec.DepartmentCode != depCode) continue; |
|
| 174 |
// 承認コードが違う場合は処理しない |
|
| 175 |
if (AppList.Key != appCode) continue; |
|
| 176 |
|
|
| 177 |
DispList.Add(new object[] { CommonMotions.cnvInt(objRec[(int)DispRecCol.DepartmentCode]),
|
|
| 178 |
CommonMotions.cnvString(objRec[(int)DispRecCol.DepartmentString]), |
|
| 179 |
CommonMotions.cnvInt(objRec[(int)DispRecCol.DepDispOrder]), |
|
| 180 |
CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalCode]), |
|
| 181 |
AppList.Value, |
|
| 182 |
CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalPerson]), |
|
| 183 |
CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalAuthority]), |
|
| 184 |
CommonMotions.cnvInt(objRec[(int)DispRecCol.AppDispOrder]), |
|
| 185 |
CommonMotions.cnvInt(objRec[(int)DispRecCol.PersonCode]), |
|
| 186 |
CommonMotions.cnvString(objRec[(int)DispRecCol.PersonName]) }); |
|
| 187 |
|
|
| 188 |
AddCnt++; |
|
| 189 |
} |
|
| 190 |
// データがない場合は承認のみ追加 |
|
| 191 |
if (AddCnt == 0) |
|
| 192 |
{
|
|
| 193 |
DispList.Add(new object[] { DepRec.DepartmentCode,
|
|
| 194 |
DepRec.DepartmentString, |
|
| 195 |
0, |
|
| 196 |
AppList.Key, |
|
| 197 |
AppList.Value, |
|
| 198 |
0, |
|
| 199 |
0, |
|
| 200 |
0, |
|
| 201 |
0, |
|
| 202 |
string.Empty }); |
|
| 203 |
} |
|
| 204 |
} |
|
| 205 |
} |
|
| 206 |
} |
|
| 207 |
catch (Exception ex) |
|
| 208 |
{
|
|
| 209 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 210 |
} |
|
| 211 |
finally |
|
| 212 |
{
|
|
| 213 |
DepDB.close(); DepDB = null; |
|
| 214 |
} |
|
| 215 |
} |
|
| 216 |
#endregion |
|
| 217 |
|
|
| 218 |
#region グリッド部署タイトルセット |
|
| 219 |
/// <summary> |
|
| 220 |
/// グリッド部署タイトルセット |
|
| 221 |
/// </summary> |
|
| 222 |
/// <param name="objrec"></param> |
|
| 223 |
private void SetGridDepTitile(object[] objrec) |
|
| 224 |
{
|
|
| 225 |
try |
|
| 226 |
{
|
|
| 227 |
DataGridView dgv = dgvProcess; |
|
| 228 |
|
|
| 229 |
int RowCnt = dgv.Rows.Add(string.Empty |
|
| 230 |
, CommonMotions.cnvInt(objrec[(int)DispRecCol.DepartmentCode]) |
|
| 231 |
, string.Empty |
|
| 232 |
, string.Format(" {0}", CommonMotions.cnvString(objrec[(int)DispRecCol.DepartmentString]))
|
|
| 233 |
); |
|
| 234 |
} |
|
| 235 |
catch (Exception ex) |
|
| 236 |
{
|
|
| 237 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 238 |
} |
|
| 239 |
} |
|
| 240 |
#endregion |
|
| 241 |
|
|
| 242 |
#region 部署タイトル行の色を変える |
|
| 243 |
/// <summary> |
|
| 244 |
/// 部署タイトル行の色を変える |
|
| 245 |
/// </summary> |
|
| 246 |
private void GridDepTitileColor() |
|
| 247 |
{
|
|
| 248 |
try |
|
| 249 |
{
|
|
| 250 |
DataGridView dgv = dgvProcess; |
|
| 251 |
|
|
| 252 |
foreach (DataGridViewRow CurRow in dgv.Rows) |
|
| 253 |
{
|
|
| 254 |
if (CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.ApprovalCode].Value) != 0) continue; |
|
| 255 |
// タイトル行を対象にする |
|
| 256 |
// 行の色を変える |
|
| 257 |
for (int i = 0; i < dgv.ColumnCount; i++) |
|
| 258 |
{
|
|
| 259 |
CurRow.Cells[i].Style.BackColor = Color.Black; |
|
| 260 |
CurRow.Cells[i].Style.ForeColor = Color.White; |
|
| 261 |
} |
|
| 262 |
|
|
| 263 |
// 表示した行を書込み禁止にする |
|
| 264 |
CurRow.ReadOnly = true; |
|
| 265 |
} |
|
| 266 |
} |
|
| 267 |
catch (Exception ex) |
|
| 268 |
{
|
|
| 269 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 270 |
} |
|
| 271 |
} |
|
| 272 |
#endregion |
|
| 273 |
|
|
| 274 |
private int m_nDataNo = 0; |
|
| 275 |
#region グリッドデータセット |
|
| 276 |
/// <summary> |
|
| 277 |
/// グリッドデータセット |
|
| 278 |
/// </summary> |
|
| 279 |
/// <param name="objrec"></param> |
|
| 280 |
private void SetGridRowData(ref ArrayList AppRowList) |
|
| 281 |
{
|
|
| 282 |
try |
|
| 283 |
{
|
|
| 284 |
DataGridView dgv = dgvProcess; |
|
| 285 |
int nRowCnt = 0; |
|
| 286 |
int nDataCnt = AppRowList.Count; |
|
| 287 |
int nColCnt = dgv.ColumnCount; |
|
| 288 |
int nColFixCnt = Enum.GetNames(typeof(GridColumn)).Length; |
|
| 289 |
|
|
| 290 |
// 承認者数が現在カラムを越えていれば先に増やしておく |
|
| 291 |
if (nColCnt < (nColFixCnt + nDataCnt)) |
|
| 292 |
{
|
|
| 293 |
CreateColumn(nDataCnt); |
|
| 294 |
} |
|
| 295 |
// 行カウントアップ |
|
| 296 |
m_nDataNo++; |
|
| 297 |
// 承認者先頭列取得 |
|
| 298 |
int ApprovalCnt=nColFixCnt; |
|
| 299 |
|
|
| 300 |
int nDepCode = 0; |
|
| 301 |
string DepartmentName = string.Empty; |
|
| 302 |
int nAppCode = 0; |
|
| 303 |
string ApprovalName = string.Empty; |
|
| 304 |
int AppPersonCode = 0; |
|
| 305 |
int ApprAuthority = -1; |
|
| 306 |
string PersonName = string.Empty; |
|
| 307 |
foreach (object[] objRec in AppRowList) |
|
| 308 |
{
|
|
| 309 |
nDepCode = CommonMotions.cnvInt(objRec[(int)DispRecCol.DepartmentCode]); |
|
| 310 |
DepartmentName = string.Format(" {0}",CommonMotions.cnvString(objRec[(int)DispRecCol.DepartmentString]));
|
|
| 311 |
nAppCode = CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalCode]); |
|
| 312 |
ApprovalName = string.Format(" {0}",CommonMotions.cnvString(objRec[(int)DispRecCol.ApprovalName]));
|
|
| 313 |
AppPersonCode = CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalPerson]); |
|
| 314 |
ApprAuthority = CommonMotions.cnvInt(objRec[(int)DispRecCol.ApprovalAuthority]); |
|
| 315 |
PersonName = CommonMotions.cnvString(objRec[(int)DispRecCol.PersonName]); |
|
| 316 |
|
|
| 317 |
// 1回目は行追加 |
|
| 318 |
if (nRowCnt < 1) |
|
| 319 |
{
|
|
| 320 |
nRowCnt = dgv.Rows.Add(m_nDataNo |
|
| 321 |
, nDepCode |
|
| 322 |
, nAppCode |
|
| 323 |
, ApprovalName |
|
| 324 |
); |
|
| 325 |
} |
|
| 326 |
// 承認者セット |
|
| 327 |
dgv.Rows[nRowCnt].Cells[ApprovalCnt].Value = PersonName; |
|
| 328 |
// 最終承認者セット |
|
| 329 |
if (ApprAuthority != 0) dgv.Rows[nRowCnt].Cells[ApprovalCnt].Style.BackColor = s_LastApproval; |
|
| 330 |
|
|
| 331 |
ApprovalCnt++; |
|
| 332 |
} |
|
| 333 |
AppRowList.Clear(); |
|
| 334 |
} |
|
| 335 |
catch (Exception ex) |
|
| 336 |
{
|
|
| 337 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 338 |
} |
|
| 339 |
} |
|
| 340 |
#endregion |
|
| 341 |
|
|
| 342 |
#region 列カラム作成 |
|
| 343 |
/// <summary> |
|
| 344 |
/// 列カラム作成 |
|
| 345 |
/// </summary> |
|
| 346 |
private void CreateColumn(int NewCnt) |
|
| 347 |
{
|
|
| 348 |
try |
|
| 349 |
{
|
|
| 350 |
DataGridView dgv = dgvProcess; |
|
| 351 |
int GridFixCnt =Enum.GetNames(typeof(GridColumn)).Length; |
|
| 352 |
int startcnt = 1; |
|
| 353 |
if (GridFixCnt < dgv.ColumnCount) |
|
| 354 |
{
|
|
| 355 |
startcnt = CommonMotions.cnvInt((dgv.Columns[(dgv.ColumnCount - 1)].HeaderText.Replace("承認者", ""))) + 1;
|
|
| 356 |
} |
|
| 357 |
int LoopEnd = NewCnt - (dgv.ColumnCount - GridFixCnt); |
|
| 358 |
for (int i = 0; i < LoopEnd; i++) |
|
| 359 |
{
|
|
| 360 |
// 列を作成する |
|
| 361 |
DataGridViewTextBoxColumn NewColumn = new DataGridViewTextBoxColumn(); |
|
| 362 |
DataGridViewCellStyle NewCellStyle = new DataGridViewCellStyle(); |
|
| 363 |
|
|
| 364 |
NewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |
|
| 365 |
NewCellStyle.ForeColor = Color.Black; |
|
| 366 |
NewColumn.DefaultCellStyle = NewCellStyle; |
|
| 367 |
NewColumn.Name = string.Format("ApprovalPerson{0}", startcnt);
|
|
| 368 |
NewColumn.HeaderText = string.Format("承認者{0}", startcnt++);
|
|
| 369 |
NewColumn.HeaderCell.Style.Font = new System.Drawing.Font("MS 明朝", 9.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
|
| 370 |
NewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False; |
|
| 371 |
NewColumn.ReadOnly = true; |
|
| 372 |
NewColumn.SortMode = DataGridViewColumnSortMode.NotSortable; |
|
| 373 |
NewColumn.Width = 100; |
|
| 374 |
|
|
| 375 |
// 列を追加する |
|
| 376 |
dgv.Columns.Add(NewColumn); |
|
| 377 |
} |
|
| 378 |
|
|
| 379 |
} |
|
| 380 |
catch (Exception ex) |
|
| 381 |
{
|
|
| 382 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 383 |
} |
|
| 384 |
} |
|
| 385 |
#endregion |
|
| 386 |
|
|
| 387 |
#region 登録画面表示 |
|
| 388 |
/// <summary> |
|
| 389 |
/// 登録画面表示 |
|
| 390 |
/// </summary> |
|
| 391 |
private void EntryDisp() |
|
| 392 |
{
|
|
| 393 |
FrmApprovalRoute frm = new FrmApprovalRoute(); |
|
| 394 |
try |
|
| 395 |
{
|
|
| 396 |
this.Hide(); |
|
| 397 |
|
|
| 398 |
DataGridView dgv = dgvProcess; |
|
| 399 |
DataGridViewRow CurRow = dgv.CurrentRow; |
|
| 400 |
|
|
| 401 |
int nAppCode = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.ApprovalCode].Value); |
|
| 402 |
int nDepCode = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.DepartmentCode].Value); |
|
| 403 |
|
|
| 404 |
frm.ApprovalNo = nAppCode; |
|
| 405 |
frm.DepartmentCode = nDepCode; |
|
| 406 |
|
|
| 407 |
frm.ShowDialog(); |
|
| 408 |
|
|
| 409 |
if (frm.ResultRet == DialogResult.Cancel) return; |
|
| 410 |
|
|
| 411 |
InitDispGrid(); |
|
| 412 |
} |
|
| 413 |
catch (Exception ex) |
|
| 414 |
{
|
|
| 415 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 416 |
} |
|
| 417 |
finally |
|
| 418 |
{
|
|
| 419 |
this.Show(); |
|
| 420 |
frm.Dispose(); frm = null; |
|
| 421 |
} |
|
| 422 |
} |
|
| 423 |
#endregion |
|
| 424 |
} |
|
| 425 |
} |
|
| branches/src/ProcessManagement/ProcessManagement/Forms/Master/ApprovalRoute/FrmApprovalRoute.cs | ||
|---|---|---|
| 84 | 84 |
/// 参照フラグ |
| 85 | 85 |
/// </summary> |
| 86 | 86 |
private bool m_EditLock = false; |
| 87 |
|
|
| 88 |
/// <summary> |
|
| 89 |
/// 部署番号 |
|
| 90 |
/// </summary> |
|
| 91 |
private int m_DepartmentCode = 0; |
|
| 92 |
|
|
| 93 |
/// <summary> |
|
| 94 |
/// 承認番号 |
|
| 95 |
/// </summary> |
|
| 96 |
private int m_ApprovalNo = 0; |
|
| 97 |
|
|
| 98 |
/// <summary> |
|
| 99 |
/// 終了状態 |
|
| 100 |
/// </summary> |
|
| 101 |
private DialogResult m_ResultRet = DialogResult.OK; |
|
| 87 | 102 |
#endregion |
| 88 | 103 |
|
| 89 | 104 |
#region プロパティ |
| ... | ... | |
| 96 | 111 |
get { return m_EditLock; }
|
| 97 | 112 |
set { m_EditLock = value; }
|
| 98 | 113 |
} |
| 114 |
|
|
| 115 |
/// <summary> |
|
| 116 |
/// 部署番号 |
|
| 117 |
/// </summary> |
|
| 118 |
public int DepartmentCode |
|
| 119 |
{
|
|
| 120 |
get { return m_DepartmentCode; }
|
|
| 121 |
set { m_DepartmentCode = value; }
|
|
| 122 |
} |
|
| 123 |
|
|
| 124 |
/// <summary> |
|
| 125 |
/// 承認番号 |
|
| 126 |
/// </summary> |
|
| 127 |
public int ApprovalNo |
|
| 128 |
{
|
|
| 129 |
get { return m_ApprovalNo; }
|
|
| 130 |
set { m_ApprovalNo = value; }
|
|
| 131 |
} |
|
| 132 |
|
|
| 133 |
/// <summary> |
|
| 134 |
/// 終了状態 |
|
| 135 |
/// </summary> |
|
| 136 |
public DialogResult ResultRet |
|
| 137 |
{
|
|
| 138 |
get { return m_ResultRet; }
|
|
| 139 |
set { m_ResultRet = value; }
|
|
| 140 |
} |
|
| 99 | 141 |
#endregion |
| 100 | 142 |
|
| 101 | 143 |
#region コンストラクタ |
| ... | ... | |
| 149 | 191 |
/// <param name="e"></param> |
| 150 | 192 |
private void btnEnd_Click(object sender, EventArgs e) |
| 151 | 193 |
{
|
| 194 |
m_ResultRet = DialogResult.Cancel; |
|
| 152 | 195 |
this.Close(); |
| 153 | 196 |
} |
| 154 | 197 |
#endregion |
| ... | ... | |
| 164 | 207 |
// フォームサイズ固定 |
| 165 | 208 |
this.MaximizedBounds = new Rectangle(this.Left, this.Top, this.Width, this.Height); |
| 166 | 209 |
|
| 167 |
// コンボボックス初期化 |
|
| 168 |
SetcmbApprovalListCombBox(); |
|
| 169 |
SetDepartmentCombBox(); |
|
| 210 |
// ヘッダーセット |
|
| 211 |
SetHeaderData(); |
|
| 170 | 212 |
|
| 171 |
// 初期表示 |
|
| 213 |
// データ表示 |
|
| 214 |
DispMentenanceData(); |
|
| 215 |
|
|
| 216 |
// 担当者一覧表示 |
|
| 172 | 217 |
InitDispGrid(); |
| 173 | 218 |
|
| 174 |
cmbApprovalList.Focus(); |
|
| 175 |
|
|
| 176 | 219 |
// 参照時はデータ変更させない |
| 177 | 220 |
if (m_EditLock) |
| 178 | 221 |
{
|
| ... | ... | |
| 216 | 259 |
|
| 217 | 260 |
CommonMotions.EntryEndMessage("承認経路データ");
|
| 218 | 261 |
|
| 219 |
// 表示行退避 |
|
| 220 |
int iIndex = dgvGridData.FirstDisplayedScrollingRowIndex; |
|
| 221 |
|
|
| 222 |
// データ一覧再表示 |
|
| 223 |
InitDispGrid(); |
|
| 224 |
|
|
| 225 |
// 表示行復元 |
|
| 226 |
dgvGridData.FirstDisplayedScrollingRowIndex = iIndex; |
|
| 227 |
|
|
| 228 |
cmbApprovalList.Focus(); |
|
| 229 |
|
|
| 230 |
// クリア |
|
| 231 |
cmbApprovalList.SelectedIndex = -1; |
|
| 232 |
cmbDepartment.SelectedIndex = -1; |
|
| 233 |
|
|
| 234 |
dgvGridData.Rows.Clear(); |
|
| 235 |
dgvGridData.Rows.Add(CommonDefine.s_MaxInitLineCountMastamente); |
|
| 236 |
|
|
| 237 | 262 |
// 変更フラグクリア |
| 238 | 263 |
m_bChengeAns = false; |
| 264 |
|
|
| 265 |
this.Close(); |
|
| 239 | 266 |
} |
| 240 | 267 |
catch (System.Exception ex) |
| 241 | 268 |
{
|
| ... | ... | |
| 255 | 282 |
IOMApproval AppDB = new IOMApproval(); |
| 256 | 283 |
try |
| 257 | 284 |
{
|
| 258 |
// 承認リストコンボボックス |
|
| 259 |
if (cmbApprovalList.Text.Length == 0) return; |
|
| 260 |
// 部署コンボボックス |
|
| 261 |
if (cmbDepartment.Text.Length == 0) return; |
|
| 262 |
|
|
| 263 | 285 |
if (MessageBox.Show("表示中のデータを削除します。", "削除確認"
|
| 264 | 286 |
, MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes) return; |
| 265 | 287 |
|
| 266 | 288 |
// データ削除 |
| 267 |
int iApprovalCode = CommonMotions.cnvInt(cmbApprovalList.SelectedValue.ToString()); |
|
| 268 |
int iDepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue.ToString()); |
|
| 269 |
string strDel = AppDB.CreatePrimarykeyString(iApprovalCode, iDepartmentCode); |
|
| 289 |
string strDel = AppDB.CreatePrimarykeyString(m_ApprovalNo, m_DepartmentCode); |
|
| 270 | 290 |
if (!AppDB.DeleteAction(strDel)) return; |
| 271 | 291 |
|
| 272 | 292 |
CommonMotions.RemoveEndMessage("承認経路データ");
|
| 273 | 293 |
|
| 274 |
// クリア |
|
| 275 |
cmbApprovalList.SelectedIndex = -1; |
|
| 276 |
cmbDepartment.SelectedIndex = -1; |
|
| 277 |
|
|
| 278 |
dgvGridData.Rows.Clear(); |
|
| 279 |
dgvGridData.Rows.Add(CommonDefine.s_MaxInitLineCountMastamente); |
|
| 280 |
|
|
| 281 | 294 |
// 変更フラグクリア |
| 282 | 295 |
m_bChengeAns = false; |
| 283 | 296 |
} |
| ... | ... | |
| 288 | 301 |
finally |
| 289 | 302 |
{
|
| 290 | 303 |
AppDB.close(); AppDB = null; |
| 304 |
this.Close(); |
|
| 291 | 305 |
} |
| 292 | 306 |
} |
| 293 | 307 |
#endregion |
| ... | ... | |
| 339 | 353 |
} |
| 340 | 354 |
#endregion |
| 341 | 355 |
|
| 342 |
#region 承認コンボボックス変化時 |
|
| 343 |
/// <summary> |
|
| 344 |
/// 承認コンボボックス変化時 |
|
| 345 |
/// </summary> |
|
| 346 |
/// <param name="sender"></param> |
|
| 347 |
/// <param name="e"></param> |
|
| 348 |
private void cmbApprovalList_SelectedIndexChanged(object sender, EventArgs e) |
|
| 349 |
{
|
|
| 350 |
if (m_bInitFlg) return; |
|
| 351 |
DispMentenanceData(); |
|
| 352 |
} |
|
| 353 |
#endregion |
|
| 354 |
|
|
| 355 |
#region 部署コンボボックス変化時 |
|
| 356 |
/// <summary> |
|
| 357 |
/// 部署コンボボックス変化時 |
|
| 358 |
/// </summary> |
|
| 359 |
/// <param name="sender"></param> |
|
| 360 |
/// <param name="e"></param> |
|
| 361 |
private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e) |
|
| 362 |
{
|
|
| 363 |
if (m_bInitFlg) return; |
|
| 364 |
DispMentenanceData(); |
|
| 365 |
} |
|
| 366 |
#endregion |
|
| 367 |
|
|
| 368 | 356 |
#region アップキー押下 |
| 369 | 357 |
/// <summary> |
| 370 | 358 |
/// アップキー押下 |
| ... | ... | |
| 425 | 413 |
} |
| 426 | 414 |
#endregion |
| 427 | 415 |
|
| 416 |
#region データグリッド値変更 |
|
| 417 |
/// <summary> |
|
| 418 |
/// データグリッド値変更 |
|
| 419 |
/// </summary> |
|
| 420 |
/// <param name="sender"></param> |
|
| 421 |
/// <param name="e"></param> |
|
| 422 |
private void dgvGridData_CellValueChanged(object sender, DataGridViewCellEventArgs e) |
|
| 423 |
{
|
|
| 424 |
m_bChengeAns = true; |
|
| 425 |
} |
|
| 426 |
#endregion |
|
| 427 |
|
|
| 428 | 428 |
#region マスターグリッドダブルクリック |
| 429 | 429 |
/// <summary> |
| 430 | 430 |
/// マスターグリッドダブルクリック |
| ... | ... | |
| 447 | 447 |
try |
| 448 | 448 |
{
|
| 449 | 449 |
bool bRet = true; |
| 450 |
// 承認リストコンボボックス |
|
| 451 |
bRet &= CommonMotions.DispFieldIndispensable(cmbApprovalList); |
|
| 452 |
// 部署コンボボックス |
|
| 453 |
bRet &= CommonMotions.DispFieldIndispensable(cmbDepartment); |
|
| 450 |
|
|
| 454 | 451 |
// 選択データ |
| 455 | 452 |
int iDataCnt = 0; |
| 456 | 453 |
for (int i = 0; i < dgvGridData.Rows.Count; i++) |
| ... | ... | |
| 493 | 490 |
AppMDB.connect(); |
| 494 | 491 |
AppMDB.beginTran(); |
| 495 | 492 |
|
| 496 |
int iApprovalCode = CommonMotions.cnvInt(cmbApprovalList.SelectedValue.ToString()); |
|
| 497 |
int iDepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue.ToString()); |
|
| 498 |
|
|
| 499 | 493 |
// まず削除する |
| 500 |
string strDelete = AppMDB.CreatePrimarykeyString(iApprovalCode, iDepartmentCode);
|
|
| 494 |
string strDelete = AppMDB.CreatePrimarykeyString(m_ApprovalNo, m_DepartmentCode);
|
|
| 501 | 495 |
AppMDB.DeleteAction(strDelete, false); |
| 502 | 496 |
|
| 503 | 497 |
int iDataCnt = 0; |
| ... | ... | |
| 507 | 501 |
|
| 508 | 502 |
// データセット |
| 509 | 503 |
ApprovalMaster AppRec = new ApprovalMaster(); |
| 510 |
AppRec.ApprovalCode = iApprovalCode;
|
|
| 511 |
AppRec.DepartmentCode = iDepartmentCode;
|
|
| 504 |
AppRec.ApprovalCode = m_ApprovalNo;
|
|
| 505 |
AppRec.DepartmentCode = m_DepartmentCode;
|
|
| 512 | 506 |
AppRec.SeqNo = ++iDataCnt; |
| 513 | 507 |
AppRec.DisplayOrder = iDataCnt; |
| 514 | 508 |
AppRec.ApprovalPerson = CommonMotions.cnvInt(dgvGridData[(int)DispGridApproval.PersonCode, i].Value); |
| ... | ... | |
| 535 | 529 |
} |
| 536 | 530 |
#endregion |
| 537 | 531 |
|
| 538 |
#region 初期時データ取得
|
|
| 532 |
#region ヘッダーデータセット
|
|
| 539 | 533 |
/// <summary> |
| 540 |
/// 初期時データ取得
|
|
| 534 |
/// ヘッダーデータセット
|
|
| 541 | 535 |
/// </summary> |
| 536 |
private void SetHeaderData() |
|
| 537 |
{
|
|
| 538 |
IOMDepartment dmDB = new IOMDepartment(); |
|
| 539 |
try |
|
| 540 |
{
|
|
| 541 |
// 承認名称セット |
|
| 542 |
lblApprovalName.Text = ClsExcute.AppovalList[m_ApprovalNo]; |
|
| 543 |
|
|
| 544 |
// 部署名セット |
|
| 545 |
StringBuilder strSQL = new StringBuilder(); |
|
| 546 |
strSQL.Append(dmDB.CreatePrimarykeyString(m_DepartmentCode)); |
|
| 547 |
DepartmentMaster dmRec = new DepartmentMaster(); |
|
| 548 |
if (!dmDB.SelectAction(strSQL.ToString(), ref dmRec)) return; |
|
| 549 |
|
|
| 550 |
lblDepartmentName.Text = dmRec.DepartmentString; |
|
| 551 |
} |
|
| 552 |
catch (Exception ex) |
|
| 553 |
{
|
|
| 554 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 555 |
} |
|
| 556 |
finally |
|
| 557 |
{
|
|
| 558 |
dmDB.close(); dmDB = null; |
|
| 559 |
} |
|
| 560 |
} |
|
| 561 |
#endregion |
|
| 562 |
|
|
| 563 |
#region 担当者データ取得 |
|
| 564 |
/// <summary> |
|
| 565 |
/// 担当者データ取得 |
|
| 566 |
/// </summary> |
|
| 542 | 567 |
private bool InitDispGrid() |
| 543 | 568 |
{
|
| 544 | 569 |
IOMPersonInCharge perDB = new IOMPersonInCharge(); // 担当者マスタ |
| 545 |
IOMDepartment dmDB = new IOMDepartment(); // 部署マスタ |
|
| 546 | 570 |
try |
| 547 | 571 |
{
|
| 548 | 572 |
// グリッドの行を0に戻す |
| ... | ... | |
| 586 | 610 |
finally |
| 587 | 611 |
{
|
| 588 | 612 |
perDB.close(); perDB = null; |
| 589 |
dmDB.close(); dmDB = null; |
|
| 590 | 613 |
|
| 591 | 614 |
int AddRowCnt1 = CommonDefine.s_MaxInitLineCountMastamente - dgvGridData.Rows.Count; |
| 592 | 615 |
if (AddRowCnt1 > 0) dgvGridData.Rows.Add(AddRowCnt1); |
| ... | ... | |
| 603 | 626 |
private void DispMentenanceData() |
| 604 | 627 |
{
|
| 605 | 628 |
IOMApproval AppMDB = new IOMApproval(); // 承認経路マスタクラス |
| 606 |
IOMDepartment dmDB = new IOMDepartment(); // 部署マスタ |
|
| 607 |
IOMPersonInCharge perDB = new IOMPersonInCharge(); // 担当者マスタ |
|
| 608 | 629 |
try |
| 609 | 630 |
{
|
| 610 |
// コンボボックスの選択無は処理しない |
|
| 611 |
if (cmbApprovalList.Text.Length == 0) return; |
|
| 612 |
if (cmbDepartment.Text.Length == 0) return; |
|
| 613 |
|
|
| 614 | 631 |
// グリッドの行を0に戻す |
| 615 | 632 |
dgvGridData.Rows.Clear(); |
| 616 | 633 |
|
| 617 |
string strSQL = AppMDB.CreatePrimarykeyString(CommonMotions.cnvInt(cmbApprovalList.SelectedValue.ToString()), |
|
| 618 |
CommonMotions.cnvInt(cmbDepartment.SelectedValue.ToString())); |
|
| 634 |
StringBuilder strSQL = new StringBuilder(); |
|
| 635 |
strSQL.Append("Select");
|
|
| 636 |
strSQL.Append(" A.ApprovalPerson,");
|
|
| 637 |
strSQL.Append(" B.DepartmentString,");
|
|
| 638 |
strSQL.Append(" C.PersonName,");
|
|
| 639 |
strSQL.Append(" C.DisplayString,");
|
|
| 640 |
strSQL.Append(" A.ApprovalAuthority");
|
|
| 641 |
strSQL.Append(" From");
|
|
| 642 |
strSQL.Append(" approvalmaster AS A");
|
|
| 643 |
strSQL.Append(" Left Join departmentmaster AS B");
|
|
| 644 |
strSQL.Append(" ON B.DepartmentCode = A.DepartmentCode");
|
|
| 645 |
strSQL.Append(" Left Join personinchargemaster AS C");
|
|
| 646 |
strSQL.Append(" ON C.PersonCode = A.ApprovalPerson");
|
|
| 647 |
strSQL.AppendFormat(" Where A.ApprovalCode = {0}", m_ApprovalNo);
|
|
| 648 |
strSQL.AppendFormat(" And A.DepartmentCode = {0}", m_DepartmentCode);
|
|
| 619 | 649 |
// 部署名取得 |
| 620 |
strSQL += " Order By DisplayOrder Asc";
|
|
| 621 |
List<ApprovalMaster> DataList = new List<ApprovalMaster>();
|
|
| 622 |
if (!AppMDB.SelectAction(strSQL, ref DataList)) return;
|
|
| 650 |
strSQL.Append(" Order By A.DisplayOrder Asc");
|
|
| 651 |
ArrayList DataList = new ArrayList();
|
|
| 652 |
if (!AppMDB.ExecuteReader(strSQL.ToString(), ref DataList)) return;
|
|
| 623 | 653 |
if (DataList.Count == 0) |
| 624 | 654 |
{
|
| 625 | 655 |
dgvGridData.Rows.Add(CommonDefine.s_MaxInitLineCountMastamente); |
| 626 | 656 |
return; |
| 627 | 657 |
} |
| 628 | 658 |
|
| 629 |
|
|
| 630 | 659 |
int ino = 1; |
| 631 |
foreach (ApprovalMaster wrkRec in DataList) |
|
| 660 |
int PersonCode = 0; |
|
| 661 |
string PersonName = string.Empty; |
|
| 662 |
string PossionName = string.Empty; |
|
| 663 |
string DepName = string.Empty; |
|
| 664 |
int Authority = 0; |
|
| 665 |
bool bCheck = false; |
|
| 666 |
foreach (object[] wrkRec in DataList) |
|
| 632 | 667 |
{
|
| 633 |
// 承認者名取得 |
|
| 634 |
string PersonName = string.Empty; |
|
| 635 |
string PossionName = string.Empty; |
|
| 636 |
strSQL = perDB.CreatePrimarykeyString(wrkRec.ApprovalPerson); |
|
| 637 |
List<PersonInChargeMaster> perList = new List<PersonInChargeMaster>(); |
|
| 638 |
if (perDB.SelectAction(strSQL, ref perList)) |
|
| 639 |
{
|
|
| 640 |
if (perList.Count != 0) |
|
| 641 |
{
|
|
| 642 |
PersonName = perList[0].PersonName; |
|
| 643 |
PossionName = perList[0].DisplayString; |
|
他の形式にエクスポート: Unified diff