private int deleteSouryoSelectSekiji(List <ClsStockSekiji> lstSelectStockSekiji, int setTbl, int setSeet) { List <ClsStockSekiji> lstRemainStockSekiji = new List <ClsStockSekiji>(); ClsStockSekiji clsStockSekiji; int smax, seet; int max, idx; Boolean bFlag; ClsSekiji clsSekiji; string sName; int nRType; int nHType; bFlag = false; smax = m_clsHaiseki.m_nSouryoCount; for (seet = 0; seet < smax; seet++) { clsSekiji = m_clsHaiseki.m_lstSouryo[seet]; clsStockSekiji = new ClsStockSekiji(); clsStockSekiji.m_sName = clsSekiji.m_sName; clsStockSekiji.m_nRyouriType = clsSekiji.m_nRyouriType; clsStockSekiji.m_nHikidemonoType = clsSekiji.m_nHikidemonoType; clsStockSekiji.m_nTable = -1; clsStockSekiji.m_nSeet = seet; if (clsSekiji.checkSelect() == true) { lstSelectStockSekiji.Add(clsStockSekiji); bFlag = true; } else { lstRemainStockSekiji.Add(clsStockSekiji); } } if (bFlag) { max = lstRemainStockSekiji.Count; for (seet = 0; seet < max; seet++) { clsSekiji = m_clsHaiseki.m_lstSouryo[seet]; sName = lstRemainStockSekiji[seet].m_sName; nRType = lstRemainStockSekiji[seet].m_nRyouriType; nHType = lstRemainStockSekiji[seet].m_nHikidemonoType; setSekijiElement(clsSekiji, sName, nRType, nHType); if (setTbl == lstRemainStockSekiji[seet].m_nTable && setSeet == lstRemainStockSekiji[seet].m_nSeet) { setSeet = seet; } } for (; seet < smax; seet++) { clsSekiji = m_clsHaiseki.m_lstSouryo[seet]; sName = ""; nRType = 0; nHType = 0; setSekijiElement(clsSekiji, sName, nRType, nHType); } } lstRemainStockSekiji.Clear(); return(setSeet); }
private void insertTableSelectSekiji(List <ClsStockSekiji> lstSelectStockSekiji, int setTbl, int setSeet) { List <ClsStockSekiji> lstRemainStockSekiji = new List <ClsStockSekiji>(); ClsStockSekiji clsStockSekiji; int smax, seet; int max, idx; ClsSekiji clsSekiji; string sName; int nRType; int nHType; smax = m_clsHaiseki.m_nSeetCount; for (seet = setSeet; seet < smax; seet++) { clsSekiji = m_clsHaiseki.m_lstTable[setTbl].m_lstSekiji[seet]; clsStockSekiji = new ClsStockSekiji(); clsStockSekiji.m_sName = clsSekiji.m_sName; clsStockSekiji.m_nRyouriType = clsSekiji.m_nRyouriType; clsStockSekiji.m_nHikidemonoType = clsSekiji.m_nHikidemonoType; clsStockSekiji.m_nTable = -1; clsStockSekiji.m_nSeet = seet; lstRemainStockSekiji.Add(clsStockSekiji); } max = lstSelectStockSekiji.Count; for (idx = 0, seet = setSeet; idx < max; idx++, seet++) { if (smax <= seet) { return; } clsSekiji = m_clsHaiseki.m_lstTable[setTbl].m_lstSekiji[seet]; sName = lstSelectStockSekiji[idx].m_sName; nRType = lstSelectStockSekiji[idx].m_nRyouriType; nHType = lstSelectStockSekiji[idx].m_nHikidemonoType; setSekijiElement(clsSekiji, sName, nRType, nHType); } max = lstRemainStockSekiji.Count; for (idx = 0; seet < smax; idx++, seet++) { if (max <= idx) { return; } clsSekiji = m_clsHaiseki.m_lstTable[setTbl].m_lstSekiji[seet]; sName = lstRemainStockSekiji[idx].m_sName; nRType = lstRemainStockSekiji[idx].m_nRyouriType; nHType = lstRemainStockSekiji[idx].m_nHikidemonoType; setSekijiElement(clsSekiji, sName, nRType, nHType); } for (; seet < smax; seet++) { clsSekiji = m_clsHaiseki.m_lstTable[setTbl].m_lstSekiji[seet]; sName = ""; nRType = 0; nHType = 0; setSekijiElement(clsSekiji, sName, nRType, nHType); } }