/// <summary> /// 進捗データ取得 /// </summary> /// <param name="dpyno">伝票No</param> /// <param name="process">工程コード</param> /// <remarks> /// 作成者 : nakao /// 作成日 : 2019/09/01 /// </remarks> private void GetMgmt(string dpyno, string process) { DataSet dtSet = null; DataBase dataBase = null; try { dataBase = new DataBase(); List<object> paraList = new List<object>(); string sqlStr = QueryBuild.GetSeihanMgmt(dpyno, ref paraList); dataBase.ConnectDB(); dtSet = dataBase.GetDataSet(sqlStr, paraList.ToArray()); dataBase.DisconnectDB(); foreach (DataRow row in dtSet.Tables[0].Rows) { string cd = row["PROCESS_CD"].ToString(); bool disabled_flg = (cd != process); switch (cd) { case Constants.PROCESS_HANSHITA: Hanshita = new Register(row, disabled_flg); break; case Constants.PROCESS_HENSHU: switch (row["SUBPROCESS_CD"].ToString()) { case Constants.PROCESS_SUB1: Henshuh = new Register(row, disabled_flg); break; case Constants.PROCESS_SUB2: Henshuk = new Register(row, disabled_flg); break; default: Henshuh = new Register(row, disabled_flg); Henshuk = new Register(row, disabled_flg); break; } break; case Constants.PROCESS_KENSA: switch (row["SUBPROCESS_CD"].ToString()) { case Constants.PROCESS_SUB1: Kensa1 = new Register(row, disabled_flg); break; case Constants.PROCESS_SUB2: Kensa2 = new Register(row, disabled_flg); break; default: Kensa1 = new Register(row, disabled_flg); Kensa2 = new Register(row, disabled_flg); break; } break; case Constants.PROCESS_HKOSEI: Hkousei = new Register(row, disabled_flg); break; case Constants.PROCESS_KKOSEI: Kkousei = new Register(row, disabled_flg); break; case Constants.PROCESS_KOSEIKENSA: Kkensa = new Register(row, disabled_flg); break; case Constants.PROCESS_GYOUMU: Gyoumu = new Register(row, disabled_flg); break; } } } catch (Exception ex) { ErrorGetMgmtMessage = Resources.TextResource.ErrorGetMgmt; } finally { if (dataBase != null) { dataBase.DisconnectDB(); } if (dtSet != null) { dtSet.Dispose(); } } }