Exemplo n.º 1
0
        private void LoadData(NZDateTime from, NZDateTime to, NZInt filterType)
        {
            if (dtPeriodBegin.NZValue.IsNull || dtPeriodEnd.NZValue.IsNull)
            {
                if (dtPeriodBegin.NZValue.IsNull && dtPeriodEnd.NZValue.IsNull)
                {
                    MessageDialog.ShowBusiness(this, Message.LoadMessage(TKPMessages.eValidate.VLM0105.ToString(), new object[] { "Period date begin and Delivery date end" }));
                }
                else if (dtPeriodBegin.NZValue.IsNull)
                {
                    MessageDialog.ShowBusiness(this, Message.LoadMessage(TKPMessages.eValidate.VLM0105.ToString(), new object[] { "Period date begin" }));
                }
                else
                {
                    MessageDialog.ShowBusiness(this, Message.LoadMessage(TKPMessages.eValidate.VLM0105.ToString(), new object[] { "Period date end" }));
                }
                return;
            }

            CustomerOrderBIZ biz = new CustomerOrderBIZ();
            DataTable        dt  = DTOUtility.ConvertListToDataTable <CustomerOrderViewDTO>(biz.LoadCustomerOrderList(from, to, filterType, false));

            shtCustomerOrderList.RowCount   = 0;
            shtCustomerOrderList.DataSource = null;
            m_dtAllData = dt;
            FindDataFromMemory();
            CalculateTotal();
            //List<InventoryTransactionViewDTO> list = m_controller.LoadReceivingList(from, to);
            ////DataTable dt = DTOUtility.ConvertListToDataTable(list);
            //m_dtAllData = DTOUtility.ConvertListToDataTable(list);
            //shtCustomerOrderList.RowCount = 0;
            //shtCustomerOrderList.DataSource = null;
            //FindDataFromMemory();
            //shtView.DataSource = m_dtAllData;

            // CtrlUtil.SpreadUpdateColumnSorting(shtView);
        }