Example #1
0
        private void loadData()
        {
            try
            {
                DeliveryController     m_Controller = new DeliveryController();
                List <DeliveryViewDTO> listDTO      = new List <DeliveryViewDTO>();
                listDTO          = m_Controller.Load_OrderMaintenance(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue, m_Customer, m_Currency, m_SlipNo);
                shtView.RowCount = 0;

                for (int i = 0; i < ShtPreviousOrder.RowCount; i++)
                {
                    for (int j = listDTO.Count - 1; j >= 0; j--)
                    {
                        if (listDTO[j].RETURN_QTY.StrongValue > 0)
                        {
                            listDTO.RemoveAt(j);
                            continue;
                        }
                        if (Convert.ToString(ShtPreviousOrder.GetValue(i, (int)eColCustomerOrder.ITEM_CD)) == listDTO[j].ITEM_CD.StrongValue &&
                            Convert.ToString(ShtPreviousOrder.GetValue(i, (int)eColCustomerOrder.ORDER_DETAIL_NO)) == listDTO[j].ORDER_DETAIL_NO.StrongValue)
                        {
                            listDTO.RemoveAt(j);
                        }
                    }
                }

                shtView.DataSource = DTOUtility.ConvertListToDataTable <DeliveryViewDTO>(listDTO);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowBusiness(this, ex.Message);
            }
        }