public static FakeRecordService Get()
 {
     if (_staticInstance == null)
     {
         _staticInstance = new FakeRecordService();
     }
     return(_staticInstance);
 }
 public override FormMetadata GetFormMetadata(string recordType, IRecordService recordService = null)
 {
     if (recordType == FakeConstants.RecordType)
     {
         return(new FormMetadata(
                    new FormSection[]
         {
             FakeSection1, FakeSection2, FakeSection3
         }));
     }
     else
     {
         return(new FormMetadata(FakeRecordService.Get().GetFields(recordType)));
     }
 }
        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();
        }
 public FakeFormController()
     : base(FakeRecordService.Get(), new FakeFormService(), new FakeApplicationController())
 {
 }
Exemple #5
0
 public FakeColumnEditDialogViewModel()
     : base(FakeConstants.RecordType, new [] { new GridFieldMetadata(FakeConstants.StringField, 200) }, FakeRecordService.Get(), null, null, new FakeApplicationController())
 {
 }
Exemple #6
0
 public FakeQueryViewModel()
     : base(new[] { FakeConstants.RecordType }, FakeRecordService.Get(), new FakeApplicationController(), allowQuery: true, loadInitially: true)
 {
 }
Exemple #7
0
 public FakeColumnEditDialogViewModel()
     : base(FakeConstants.RecordType, new [] { new KeyValuePair <string, double>(FakeConstants.StringField, 200) }, FakeRecordService.Get(), null, null, new FakeApplicationController())
 {
 }