//Promotion Data private void PromotionMapData() { try { EclipsePOS.WPF.SystemManager.Data.promotionMapDataSet promotionMapDataSet = new promotionMapDataSet(); EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter promotionMapTableAdapter = new EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter(); promotionMapTableAdapter.Fill(promotionMapDataSet.promotion_map); promotionMapDataSet.WriteXml(View.OutputFolderPath() + "\\PromotionMap.xml", XmlWriteMode.WriteSchema); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); } }
//PromotionMap private void PromotionMapData() { try { EclipsePOS.WPF.SystemManager.Data.promotionMapDataSet dataSetXml = new promotionMapDataSet(); dataSetXml.ReadXml(View.InputFolderPath() + "\\PromotionMap.xml", XmlReadMode.ReadSchema); EclipsePOS.WPF.SystemManager.Data.promotionMapDataSet dataSetRDB = new promotionMapDataSet(); EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter tableAdapter = new EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter(); tableAdapter.Fill(dataSetRDB.promotion_map); dataSetRDB.Merge(dataSetXml); tableAdapter.Update(dataSetRDB); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); return; } }
public void OnShowPromoMapView() { //Item itemData = new EclipsePOS.WPF.SystemManager.Data.ItemsDataSet(); EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter taItem = new EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter(); taItem.Fill(itemData.item); View.SetItemsDataContext(itemData.item); _itemColView = CollectionViewSource.GetDefaultView(itemData.item) as CollectionView; this.FilterItemByOrganizationNo(View.Organization); //PromotionsMap promotionMapData = new EclipsePOS.WPF.SystemManager.Data.promotionMapDataSet(); EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter promotionMapTa = new EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter(); promotionMapTa.Fill(promotionMapData.promotion_map); View.SetPromoMapDataContext(promotionMapData.promotion_map); _promotionMapColView = CollectionViewSource.GetDefaultView(promotionMapData.promotion_map) as CollectionView; taManager.promotion_mapTableAdapter = promotionMapTa; this.FilterPromotionMapByOrganizationNo(View.Organization); View.SetMoveToFirstBtnDataContext(MoveToFirstCommand); View.SetMoveToPreviousBtnDataContext(MoveToPreviousCommand); View.SetMoveToNextBtnDataContext(MoveToNextCommand); View.SetMoveToLastBtnDataContext(MoveToLastCommand); View.SetDeleteBtnDataContext(DeleteCommand); View.SetSelectBtnDataContext(AddCommand); View.SetRevertBtnDataContext(RevertCommand); View.SetSaveBtnDataContext(SaveCommand); View.SetSelectAllBtnDataContext(SelectAllCommand); // View.SetFilterBtnDataContext(FilterCommand); View.SetCancelBtnDataContext(CancelCommand); }