Exemplo n.º 1
0
        public static ObservableCollection <EventViewModel> dbLoad(string itemCode)
        {
            ObservableCollection <EventViewModel> eventVMList = new ObservableCollection <EventViewModel>();

            EVENT_INFO_Table_DAOManager daoManager = new EVENT_INFO_Table_DAOManager();

            daoManager.KeyColumn_ = itemCode;

            daoManager.select(DataBaseConnectManager.ConnectionFactory("myDB"));

            foreach (var item in daoManager.DAOList_)
            {
                EventViewModel evm = new SettlementEventViewModel();

                evm.setFromDAO(item);

                eventVMList.Add(evm);
            }

            return(eventVMList);
        }
Exemplo n.º 2
0
        public void dbLoad()
        {
            this.eventVMList_ = new ObservableCollection <EventViewModel>();

            EVENT_INFO_Table_DAOManager daoManager = new EVENT_INFO_Table_DAOManager();

            daoManager.KeyColumn_ = this.itemCode_;

            daoManager.select(DataBaseConnectManager.ConnectionFactory("myDB"));

            foreach (var item in daoManager.DAOList_)
            {
                EventViewModel evm = new SettlementEventViewModel();

                evm.setFromDAO(item);

                this.eventVMList_.Add(evm);
            }

            //((EventManagerView)this.view_).refereshDataContext();
        }
        // d : position 기준일
        public static void loadWholeEvent(DateTime d)
        {
            OTCApplicationEventViewModel.WholeEventViewModel_.Clear();
            OTCApplicationEventViewModel._eventViewModelMap_.Clear();

            EVENT_INFO_Table_DAOManager daoManager = new EVENT_INFO_Table_DAOManager();

            //daoManager.KeyColumn_ = d.ToString("yyyyMMdd");

            daoManager.selectAll(DataBaseConnectManager.ConnectionFactory("myDB"));

            foreach (var item in daoManager.DAOList_)
            {
                EventViewModel e_vm = new EventViewModel();

                e_vm.setFromDAO(item);

                OTCApplicationEventViewModel.WholeEventViewModel_.Add(e_vm);
                //OTCApplicationEventViewModel._eventViewModelMap_.Add(
                //    e_vm.Event_date_.ToString(StringFormat.DbDateFormat_), e_vm);
            }
        }
        // d : position 기준일
        public static void loadWholeEvent(DateTime d)
        {
            OTCApplicationEventViewModel.WholeEventViewModel_.Clear();
            OTCApplicationEventViewModel._eventViewModelMap_.Clear();

            EVENT_INFO_Table_DAOManager daoManager = new EVENT_INFO_Table_DAOManager();

            //daoManager.KeyColumn_ = d.ToString("yyyyMMdd");

            daoManager.selectAll(DataBaseConnectManager.ConnectionFactory("myDB"));

            foreach (var item in daoManager.DAOList_)
            {
                EventViewModel e_vm = new EventViewModel();

                e_vm.setFromDAO(item);

                OTCApplicationEventViewModel.WholeEventViewModel_.Add(e_vm);
                //OTCApplicationEventViewModel._eventViewModelMap_.Add(
                //    e_vm.Event_date_.ToString(StringFormat.DbDateFormat_), e_vm);

            }
        }
        public static ObservableCollection<EventViewModel> dbLoad(string itemCode)
        {
            ObservableCollection<EventViewModel> eventVMList = new ObservableCollection<EventViewModel>();

            EVENT_INFO_Table_DAOManager daoManager = new EVENT_INFO_Table_DAOManager();

            daoManager.KeyColumn_ = itemCode;

            daoManager.select(DataBaseConnectManager.ConnectionFactory("myDB"));

            foreach (var item in daoManager.DAOList_)
	        {
                EventViewModel evm = new SettlementEventViewModel();

                evm.setFromDAO(item);

                eventVMList.Add(evm);
	        }

            return eventVMList;
            
            
        }
        public void dbLoad()
        {
            this.eventVMList_ = new ObservableCollection<EventViewModel>();

            EVENT_INFO_Table_DAOManager daoManager = new EVENT_INFO_Table_DAOManager();

            daoManager.KeyColumn_ = this.itemCode_;

            daoManager.select(DataBaseConnectManager.ConnectionFactory("myDB"));

            foreach (var item in daoManager.DAOList_)
            {
                EventViewModel evm = new SettlementEventViewModel();

                evm.setFromDAO(item);

                this.eventVMList_.Add(evm);
            }

            //((EventManagerView)this.view_).refereshDataContext();

        }