Exemplo n.º 1
0
        public static Excel_instrumentViewModel loadInstrumentVM(string itemCode)
        {
            MATSER_INFO_Table_DAO mt_dao = new MATSER_INFO_Table_DAO();

            mt_dao.ITEM_CODE_ = itemCode;

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

            Excel_instrumentViewModel e_ivm =
                CodeClassificationGenerator.CreateInstrument(mt_dao.ITEM_CODE_);

            e_ivm.MasterInformationViewModel_.setFromDAO(mt_dao);

            return(e_ivm);
        }
Exemplo n.º 2
0
        public static void loadWholeMasterPosition()
        {
            MasterInformationViewModel.WholeMasterPosition_.Clear();
            MasterInformationViewModel.masterPositionMap_.Clear();

            MATSER_INFO_Table_DAOManager mt_daoM = new MATSER_INFO_Table_DAOManager();

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

            foreach (var dao in mt_daoM.DAOList_)
            {
                Excel_instrumentViewModel e_ivm =
                    CodeClassificationGenerator.CreateInstrument(dao.ITEM_CODE_);

                e_ivm.MasterInformationViewModel_.setFromDAO(dao);

                MasterInformationViewModel.WholeMasterPosition_.Add(e_ivm);

                MasterInformationViewModel.masterPositionMap_.Add(e_ivm.MasterInformationViewModel_.Item_code_, e_ivm);
            }
        }