本文整理汇总了C#中IH.ConsumerServices.Core.Data.ConvertServiceRequest类的典型用法代码示例。如果您正苦于以下问题:C# ConvertServiceRequest类的具体用法?C# ConvertServiceRequest怎么用?C# ConvertServiceRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConvertServiceRequest类属于IH.ConsumerServices.Core.Data命名空间,在下文中一共展示了ConvertServiceRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetModel
public string GetModel(ConvertServiceRequest request)
{
if (!string.IsNullOrEmpty(request.Data))
_viewModel = CommonUtils.JsonDeserialize<AdminListViewModel>(request.Data);
else
CreateInitialViewModel();
// Query the Database
var assetCollection = QueryData(request);
// Build the Records Model
_viewModel.TotalRecords = assetCollection.TotalAssetCount;
_viewModel.Records.Clear();
foreach (var asset in assetCollection.Assets)
{
_viewModel.Records.Add(new Record
{
Id = asset.Id,
Name = asset.Name,
Url = asset.Url,
IsFolder = asset.IsFolder,
FolderPath = asset.FolderPath,
Actions = CreateGridActions(asset)
});
}
return CommonUtils.JsonSerialize(_viewModel);
}
示例2: ProcessServiceRequest
public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request)
{
if (request.Parameters.ContainsKey(CommonParameters.EntityName))
{
switch (request.Parameters[CommonParameters.EntityName])
{
case "events":
return DoEventAndOccurrencesRouting(request);
case "eventTopics":
return DoEventTopicRouting(request);
case "eventTypes":
return DoEventTypeRouting(request);
case "dynamiccolumns":
return DoDynamicColumnsRouting(request);
case "settings":
return new AdminSettingsView(RequestProcessor).ProcessServiceRequest(request);
case "reports":
return new AdminReportsView(RequestProcessor).ProcessServiceRequest(request);
case "configurableText":
return DoConfigurableTextRouting(request);
case "registrantSearch":
return DoRegistrantSearchRouting(request);
case "registrationForm":
return DoRegistrationFormRouting(request);
case "api":
return new ApiHelper(RequestProcessor).ProcessServiceRequest(request);
}
}
return DoEventRouting(request);
}
示例3: GetModel
public string GetModel(ConvertServiceRequest request)
{
if (!string.IsNullOrEmpty(request.Data))
_viewModel = CommonUtils.JsonDeserialize<AdminListViewModel>(request.Data);
else
CreateInitialViewModel();
//Query the Database
var listResponse = QueryData();
//Build the Records Model
_viewModel.TotalRecords = listResponse.EventConfigurationText.Count();
_viewModel.Records.Clear();
foreach (var e in listResponse.EventConfigurationText)
{
_viewModel.Records.Add(new Record
{
Id = e.Id,
Title = e.Title,
Value = e.Value,
Actions = new GridActions()
{
ActionItems = CommonUtils.CreateGridActionItemList(true)
}
});
}
return CommonUtils.JsonSerialize(_viewModel);
}
示例4: GetModel
public string GetModel(ConvertServiceRequest request)
{
if (!string.IsNullOrEmpty(request.Data))
_viewModel = CommonUtils.JsonDeserialize<AdminListViewModel>(request.Data);
else
CreateInitialViewModel();
//Handle Deletes
if (request.Parameters.ContainsKey("Command"))
{
if (request.Parameters["Command"] == "DeleteRecords")
DeleteRecords();
}
var listResponse = QueryData();
_viewModel.TotalRecords = listResponse.TotalRecords;
_viewModel.Records.Clear();
foreach (var r in listResponse.Templates)
{
_viewModel.Records.Add(new Record
{
Id = r.Id,
TemplateName = r.Name,
Actions = new GridActions()
{
ActionItems = CommonUtils.CreateGridActionItemList(true)
}
});
}
return CommonUtils.JsonSerialize(_viewModel);
}
示例5: ProcessServiceRequest
public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request)
{
if (request.Parameters.ContainsKey(CommonParameters.EntityName))
{
switch (request.Parameters[CommonParameters.EntityName])
{
case "locations":
return DoLocationRouting(request);
case "insurances":
return DoInsurancesRouting(request);
case "locationTypes":
return DoLocationTypeRouting(request);
case "dynamiccolumns":
return DoDynamicColumnsRouting(request);
case "services":
return DoServicesRouting(request);
case "settings":
return new AdminSettingsView(RequestProcessor).ProcessServiceRequest(request);
case "api":
return new ApiHelper(RequestProcessor).ProcessServiceRequest(request);
}
}
return DoLocationRouting(request);
}
示例6: ProcessServiceRequest
public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request)
{
var configurationId = request.Parameters[CommonParameters.Entity2Id];
if (configurationId.ToUpperInvariant() != RecordActions.New.ToUpperInvariant())
{
int outConfigurationId;
if (int.TryParse(configurationId, out outConfigurationId))
{
_configurationId = outConfigurationId;
}
}
if (request.Parameters.ContainsKey(Constants.SystemParameters.Command))
{
var command = request.Parameters[Constants.SystemParameters.Command];
switch (command)
{
case Constants.SystemParameters.CommandValueTestPaymentSettings:
return TestPaymentSettings(request);
}
}
else
{
return new ConvertServiceResponse() { ResponseData = GetModel(request) };
}
return new ConvertServiceResponse() { ResponseData = string.Empty };
}
示例7: ProcessServiceRequest
public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request)
{
return new ConvertServiceResponse()
{
ResponseData = GetModel(request)
};
}
示例8: HandleDataTypeChanged
public static ConvertServiceResponse HandleDataTypeChanged(ConvertServiceRequest request)
{
var record = CommonUtils.JsonDeserialize<AdminDetailViewModel>(request.Data);
record.Fields = SetupFieldVisibility(record.Fields);
return new ConvertServiceResponse() { ResponseData = CommonUtils.JsonSerialize(record) };
}
示例9: DoHomeRouting
private ConvertServiceResponse DoHomeRouting(ConvertServiceRequest request)
{
switch (request.Parameters[CommonParameters.ViewName])
{
case "AdminDashboardView":
return new HomeAdminDashboardView(RequestProcessor).ProcessServiceRequest(request);
}
return null;
}
示例10: ProcessServiceRequest
public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request, ModuleUtilsBase moduleUtils)
{
_moduleUtils = moduleUtils;
_moduleName = request.Parameters[CommonParameters.ModuleName];
return new ConvertServiceResponse()
{
ResponseData = GetModel(request)
};
}
示例11: DoMetaRouting
private ConvertServiceResponse DoMetaRouting(ConvertServiceRequest request)
{
switch (request.Parameters[CommonParameters.ViewName])
{
case "ModuleInstanceView":
return new ModuleInstanceView(RequestProcessor).ProcessServiceRequest(request);
}
return null;
}
示例12: DoPaymentGatewayRouting
public ConvertServiceResponse DoPaymentGatewayRouting(ConvertServiceRequest request)
{
switch (request.Parameters[CommonParameters.ViewName])
{
case "AdminListView":
return new PaymentGatewayListView(RequestProcessor).ProcessServiceRequest(request);
case "AdminDetailView":
return DoPaymentGatewayDetailViewRouting(request);
}
return null;
}
示例13: DoServiceInstancesRouting
private ConvertServiceResponse DoServiceInstancesRouting(ConvertServiceRequest request)
{
switch (request.Parameters[CommonParameters.ViewName])
{
case "AdminListView":
return new ServiceInstanceAdminListView(RequestProcessor).ProcessServiceRequest(request, new GlobalAdminUtils());
case "AdminDetailView":
return new ServiceInstanceAdminDetailView(RequestProcessor).ProcessServiceRequest(request, new GlobalAdminUtils());
}
return null;
}
示例14: DoDynamicColumnsRouting
private ConvertServiceResponse DoDynamicColumnsRouting(ConvertServiceRequest request)
{
switch (request.Parameters[CommonParameters.ViewName])
{
case "AdminListView":
return new DynamicColumnsListView(RequestProcessor).ProcessServiceRequest(request, new EventUtils());
case "AdminDetailView":
return new DynamicColumnsAdminDetailView(RequestProcessor).ProcessServiceRequest(request, new EventUtils());
}
return null;
}
示例15: ProcessServiceRequest
public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request)
{
var entityId = request.Parameters[CommonParameters.EntityId];
if (entityId.ToUpperInvariant() != RecordActions.New.ToUpperInvariant())
_eventTypeId = int.Parse(entityId, CultureInfo.InvariantCulture);
return new ConvertServiceResponse()
{
ResponseData = GetModel(request)
};
}