Esempio n. 1
0
        static LoadData()
        {
            //MessageBox.Show("Hello from MessageBox");
            try
            {
                mrzs05mMContxt = new mrzs05mMenuContext();
                mrzs05mMModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetMrzs05mMenuQuery());
                mrzs05mMModel.Completed += mrzs05mMModel_Completed;
                passwordCheckTypeModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetPasswordCheckTypesQuery());
                passwordCheckTypeModel.Completed += passwordCheckTypeModel_Completed;
                kindSignalDCModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetKindSignalDCsQuery());
                kindSignalDCModel.Completed += kindSignalDCModel_Completed;
                typeSignalDCModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetTypeSignalDCsQuery());
                typeSignalDCModel.Completed += typeSignalDCModel_Completed;
                typeFuncDCModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetTypeFuncDCsQuery());
                typeFuncDCModel.Completed += typeFuncDCModel_Completed;
                BooleanValModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetBooleanValsQuery());
                BooleanValModel.Completed += BooleanValModel_Completed;
                BooleanVal2Model = mrzs05mMContxt.Load(mrzs05mMContxt.GetBooleanVal2Query());
                BooleanVal2Model.Completed += BooleanVal2Model_Completed;
                BooleanVal3Model = mrzs05mMContxt.Load(mrzs05mMContxt.GetBooleanVal3Query());
                BooleanVal3Model.Completed += BooleanVal3Model_Completed;
                mtzValModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetMtzValsQuery());
                mtzValModel.Completed += mtzValModel_Completed;
                mrzsInOutOptModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetMrzsInOutOptionsQuery());
                mrzsInOutOptModel.Completed += mrzsInOutOptModel_Completed;

                TestAnswerContext TestAnswContxt = new TestAnswerContext();
                TestAnswerModel = TestAnswContxt.Load(TestAnswContxt.GetTestAnswersQuery());
                TestAnswerModel.Completed += TestAnswerModel_Completed;

                TestQuestionContext TestQuestContxt = new TestQuestionContext();
                TestQuestionModel = TestQuestContxt.Load(TestQuestContxt.GetTestQuestionsQuery());
                TestQuestionModel.Completed += TestQuestionModel_Completed;

                TestResultsContext TestResContxt = new TestResultsContext();
                TestResultModel = TestResContxt.Load(TestResContxt.GetTestResultsQuery());
                TestResultModel.Completed += TestResultModel_Completed;

                TestImagesContext TestImgContxt = new TestImagesContext();
                TestingImageModel = TestImgContxt.Load(TestImgContxt.GetTestingImagesQuery());
                TestingImageModel.Completed += TestingImageModel_Completed;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
        public Emulator_05M()
        {
            InitializeComponent();
            display.TextWrapping = TextWrapping.Wrap;
            display.FontFamily = new FontFamily("Arial");
            display.FontSize = 20.0;
            display.Padding = new Thickness(5.0);
            display.SelectionStart = display.Text.Length;

            //generated class by ria service (for client side)
            boolContext = new Web.Services.BooleanVal1();
            //using wcf service (DomainService) with my method to load entities
            LoadOperation<MRZS.Web.Models.BooleanVal> boolEntity = boolContext.Load(boolContext.GetBooleanValByIDQuery(1));

            myDataGrid.ItemsSource = boolEntity.Entities;
            IEnumerable<BooleanVal> list = boolEntity.Entities;
            boolEntity.Completed += boolEntity_Completed;

            mrzsInOutOptionsContext mrzsInOutOptConxt = new mrzsInOutOptionsContext();
            LoadOperation<mrzsInOutOption> mrzsInOutOptModel = mrzsInOutOptConxt.Load(mrzsInOutOptConxt.GetMrzsInOutOptionsQuery());
            mrzsInOutOptModel.Completed += mrzsInOutOptModel_Completed;

            mrzs05mMenuContext mrzs05mMContxt = new mrzs05mMenuContext();
            LoadOperation<mrzs05mMenu> mrzs05mMModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetMrzs05mMenuQuery());
            mrzs05mMModel.Completed += mrzs05mMModel_Completed;

            mrzsInOutOptionModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetMrzsInOutOptionsQuery());

            passwordCheckTypeModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetPasswordCheckTypesQuery());
            kindSignalDCModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetKindSignalDCsQuery());
            typeSignalDCModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetTypeSignalDCsQuery());
            typeFuncDCModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetTypeFuncDCsQuery());
            BooleanVal2Model = mrzs05mMContxt.Load(mrzs05mMContxt.GetBooleanVal2Query());
            BooleanVal3Model = mrzs05mMContxt.Load(mrzs05mMContxt.GetBooleanVal3Query());
            mtzValModel = mrzs05mMContxt.Load(mrzs05mMContxt.GetMtzValsQuery());
        }