/// <summary> /// If the order is waiting type then collects the waiting number of the order. /// For this reason the function collects the maximum waiting number and increases by 1 to return the current id. /// </summary> /// <returns></returns> private void GetWaitingNumber() { DateTime currentDateTime = DateTime.Now; DateTime dateOnly = new DateTime(currentDateTime.Year, currentDateTime.Month, currentDateTime.Day, 0, 0, 0); COrderManager tempOrderManager = new COrderManager(); CResult objWaiting = tempOrderManager.GetWaitingNumber(dateOnly.Ticks,m_orderIndex); CTableInfo objTableInfo = (CTableInfo)objWaiting.Data; if (m_orderIndex == 3) { m_order_name = "Waiting" + (objTableInfo.WaitingNumber + 1).ToString("000"); } else if (m_orderIndex == 2) { m_order_name = "Collection" + (objTableInfo.WaitingNumber + 1).ToString("000");//Here waiting number is collection number. } }