/// <summary> /// 進捗データ取得 /// </summary> /// <param name="dpyno">伝票No</param> /// <param name="process">工程コード</param> /// <param name="customer">得意先コード</param> /// <remarks> /// 作成者 : sesaki /// 作成日 : 2019/11/21 /// </remarks> private void GetMgmt(string dpyno, string process, string customer) { DataSet dtSet = null; DataBase dataBase = null; try { dataBase = new DataBase(); List <object> paraList = new List <object>(); string sqlStr; if (GurabiaCustomer.IsTokan(customer)) { sqlStr = QueryBuild.GetGurabiaMgmtTokan(dpyno, ref paraList); } else { sqlStr = QueryBuild.GetGurabiaMgmtToyo(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_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(); } } }