예제 #1
0
        private void LoadData()
        {
            List <InventoryMovementInqUIDM> listModel = null;

            //if (m_lotNo.StrongValue == Common.LOT_NO_GROUPBY)
            if (m_QueryType == 1)//Query Type = 1 แปลว่า Group ตาม Item
            {
                // Load all movement.
                listModel = m_inventoryMovementInqController.LoadDataInventoryMovementInquiry(YearMonth, PeriodBeginDate, PeriodEndDate, ItemCode, WareHouseCode, m_lotNo);
            }
            else
            {
                // Load movement only LotNo.
                listModel = m_inventoryMovementInqController.LoadDataInventorymovementInquiryByLotNo(YearMonth, PeriodBeginDate, PeriodEndDate, ItemCode, WareHouseCode, m_lotNo, m_packNo);
            }

            DataTable dataTable = DTOUtility.ConvertListToDataTable(listModel);

            shtView.DataSource = dataTable;

            if (dataTable.Rows.Count > 0)
            {
                shtView.Cells[0, (int)eColView.TRANS_INFO].CellType = new FarPoint.Win.Spread.CellType.TextCellType();
                txtOnHandQty.Text = CtrlUtil.GetCompleteNumberFormatValue(txtOnHandQty.MaxDecimalPlaces, listModel[listModel.Count - 1].BALANCE);// listModel[listModel.Count - 1].BALANCE.StrongValue.ToString();
            }
            else
            {
                txtOnHandQty.PathValue = 0;
            }

            CtrlUtil.SpreadUpdateColumnSorting(shtView);
        }