コード例 #1
0
        public FakeMaintainViewModel(FakeFormController formController)
            : base(formController)
        {
            var record = RecordService.GetFirst(FakeConstants.RecordType, FakeConstants.PrimaryField,
                                                FakeConstants.MainRecordName);

            RecordId     = record.Id;
            RecordIdName = FakeConstants.Id;
            RecordType   = record.Type;
            SetRecord(record);
        }
コード例 #2
0
        public FakeGridViewModel()
            : base(new FakeApplicationController())
        {
            PageSize       = 50;
            ViewType       = Record.Metadata.ViewType.MainApplicationView;
            RecordService  = FakeRecordService.Get();
            RecordType     = FakeConstants.RecordType;
            IsReadOnly     = true;
            FormController = new FakeFormController();
            GetGridRecords = (b) => { return(new GetGridRecordsResponse(RecordService.RetrieveAll(RecordType, null))); };
            MultiSelect    = true;
            GridLoaded     = false;
            //var customFunctions = new List<CustomGridFunction>()
            //{
            //    new CustomGridFunction("Dummy", () => { })
            //};

            //LoadGridButtons(customFunctions);

            ReloadGrid();
        }