private void LoadData(NZDateTime dtDateFrom, NZDateTime dtDateTo, string keyFilter) { try { //== Start to search data. SalesSummaryController ctlInvent = new SalesSummaryController(); //== 20091203 Add by Teerayt S. //NZString yearMonth = GetLatestYearMonthInInvOnhand(); //== 20091203 End Add by Teerayt S. //List<InventorySummaryViewDTO> dtoView = ctlInvent.LoadInventorySummary(yearMonth); //m_dtAllData = DTOUtility.ConvertListToDataTable(dtoView); m_dtAllData = ctlInvent.LoadSalesSummary(dtDateBegin.NZValue, dtDateEnd.NZValue); FindDataFromMemory(keyFilter); } catch (Exception ex) { MessageDialog.ShowBusiness(this, ex.Message); } }
private void LoadData(NZDateTime dtDateFrom, string keyFilter) { try { if (dtDateFrom.IsNull) { shtInventorySummary.RowCount = 0; MessageDialog.ShowBusiness(this, EVOFramework.Message.LoadMessage(TKPMessages.eValidate.VLM0224.ToString())); return; } //== Start to search data. SalesSummaryController ctlInvent = new SalesSummaryController(); //== 20091203 Add by Teerayt S. //NZString yearMonth = GetLatestYearMonthInInvOnhand(); //== 20091203 End Add by Teerayt S. //List<InventorySummaryViewDTO> dtoView = ctlInvent.LoadInventorySummary(yearMonth); //m_dtAllData = DTOUtility.ConvertListToDataTable(dtoView); m_dtAllData = ctlInvent.LoadSalesSummary(dtDateBegin.NZValue); FindDataFromMemory(keyFilter); } catch (Exception ex) { MessageDialog.ShowBusiness(this, ex.Message); } }