本文整理汇总了C#中System.Web.Script.Serialization.JavaScriptSerializer.GetCommaSeparatedTokens方法的典型用法代码示例。如果您正苦于以下问题:C# Script.Serialization.JavaScriptSerializer.GetCommaSeparatedTokens方法的具体用法?C# Script.Serialization.JavaScriptSerializer.GetCommaSeparatedTokens怎么用?C# Script.Serialization.JavaScriptSerializer.GetCommaSeparatedTokens使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Script.Serialization.JavaScriptSerializer
的用法示例。
在下文中一共展示了Script.Serialization.JavaScriptSerializer.GetCommaSeparatedTokens方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunAccountStatus
public ActionResult RunAccountStatus([DataSourceRequest] DataSourceRequest request, string outPut, bool saveOutPut, int status = -1)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "sp_report_msv_portfolio_AccountsByType", outPutDeserialized.GetCommaSeparatedTokens());
}
//SaveLastDateRangeInSession(startDate, endDate);
var agent = GetLoggedUserId();
var reportData = _virtualOfficeService.RunMerchantServicesPortfolioByAccountsType(agent, status);
var mappedResult = reportData.MapTo<IEnumerable<PortfolioAccountsByType>, IEnumerable<MsAccountStatusViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例2: RunComissionSummaryTotal
public ActionResult RunComissionSummaryTotal([DataSourceRequest] DataSourceRequest request, int? agentId, DateTime startDate, DateTime endDate, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "sp_report_msv_commission_details_by_totals", outPutDeserialized.GetCommaSeparatedTokens());
}
//SaveLastDateRangeInSession(startDate, endDate);
var agent = agentId.HasValue && agentId != 0 ? agentId.Value : GetLoggedUserId();
var reportData = _virtualOfficeService.RunMsComissionDetailsByTotals(agent, startDate, endDate).Distinct(new MsComissionSummaryByTotalsComparer());
var mappedResult = reportData.MapTo<IEnumerable<MsCommissionSummaryByTotals>, IEnumerable<MsCommissionSummaryByTotalsViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例3: RunUpdateCommission
public ActionResult RunUpdateCommission([DataSourceRequest] DataSourceRequest request, string selectedUsers, string outPut, bool saveOutPut, string code, string name)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "SP_Send_CommissionReport", outPutDeserialized.GetCommaSeparatedTokens());
}
if (selectedUsers == null)
return null;
var productsCommissions = new List<CommissionByProductViewModel>();
var users = new JavaScriptSerializer().Deserialize<List<string>>(selectedUsers);
var userLevel = GetUserLevel();
foreach (var userCode in users)
{
if (string.IsNullOrEmpty(userCode))
throw new Exception("User Id not valid");
var user = _virtualOfficeService.GetUser(userCode);
var reportData = _virtualOfficeService.ProductsCommission(user.userid, user.usertype == 0);
var mappedResult = reportData.Select(p =>
{
var commissions = new[] {p.mercomm, p.agentcomm, p.distcomm, p.isocomm};
return new CommissionByProductViewModel
{
UserId = userCode,
UserDescription = user.username,
Product = p.pro_description,
ProductCode = p.merproduct_sbt,
MyCommission = commissions[userLevel],
Actual = commissions[user.usertype],
OldCommission = commissions[user.usertype],
};
});
productsCommissions.AddRange(mappedResult.Where(p => p.ProductCode.StartsWith(code) && p.Product.ToLower().StartsWith(name.ToLower())));
}
var result = productsCommissions.ToDataSourceResult(request);
return Json(result);
}
catch (Exception)
{
return null;
}
}
示例4: RunAccountsInCollection
public ActionResult RunAccountsInCollection([DataSourceRequest] DataSourceRequest request, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "AccountsInCollection", outPutDeserialized.GetCommaSeparatedTokens());
}
var reportData = _virtualOfficeService.GetAccountsInCollection(GetLoggedUserId());
var mappedResult = reportData.MapTo<IEnumerable<AccountsInCollectionResult>, IEnumerable<PrepaidAccountsInCollectionViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例5: RunTodayTransactions
public ActionResult RunTodayTransactions([DataSourceRequest] DataSourceRequest request, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "Sp_get_Today_Transactions", outPutDeserialized.GetCommaSeparatedTokens());
}
var userLevel = GetUserLevel();
var agentId = userLevel != 0 ? GetLoggedUserId() : 0;
var merchantId = userLevel == 0 ? GetLoggedUserId() : 0;
var reportData = _virtualOfficeService.RunTodayTransactions(agentId, merchantId);
var mappedResult = reportData.MapTo<IEnumerable<PrepaidTodayTransactionsResult>, IEnumerable<PrepaidTodayTransactionsViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例6: RunTransactionsSummary
public ActionResult RunTransactionsSummary([DataSourceRequest] DataSourceRequest request, string startDate, string endDate, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "Sp_TransactionsSummary", outPutDeserialized.GetCommaSeparatedTokens());
}
//SaveLastDateRangeInSession(startDate, endDate);
var dateRange = GetDateRange(startDate, endDate);
var userIsMerchant = GetUserCategory() == Category.Merchant;
var reportData = _virtualOfficeService.GetTransactionsSummary(GetLoggedUserId(), userIsMerchant, dateRange.StartDate, dateRange.EndDate);
var mappedResult = reportData.MapTo<IEnumerable<TransactionSummaryResult>, IEnumerable<TransactionSummaryViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例7: RunPortfolioSummary
public ActionResult RunPortfolioSummary([DataSourceRequest] DataSourceRequest request, string outPut, bool saveOutPut, int? alertsMode, int status = -1)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "sp_report_portfolio_summary", outPutDeserialized.GetCommaSeparatedTokens());
}
var reportData = _virtualOfficeService.RunPrepaidPortfolioSummary(GetLoggedUserId());
switch (status)
{
case 1:
reportData = reportData.Where(c => c.UserStatus == UserStatus.Active);
break;
case 0:
reportData = reportData.Where(c => c.UserStatus == UserStatus.Suspended || c.UserStatus == UserStatus.Close);
break;
}
if (alertsMode.HasValue && alertsMode.Value != 0)//Filters just accounts with Alerts
{
reportData = reportData.Where( c => ((status == -1 || status == 2) && c.UserStatus == UserStatus.Suspended) ||
((status == -1 || status == 3) && (c.UserStatus == UserStatus.Close && decimal.Parse(c.Balance, NumberStyles.Currency) > 0)) ||
((status == -1 || status == 4) && c.compliance.HasValue && c.compliance.Value));
}
var mappedResult = reportData.MapTo<IEnumerable<PrepaidPortfolioResult>, IEnumerable<PrepaidPortfolioSummaryResultViewModel>>().ToList();
var result = mappedResult.ToDataSourceResult(request);
_virtualOfficeService.LogReportResult(GetLoggedUserId().ToString(), "Prepaid Portfolio Summary", mappedResult.Count(), Utils.MaximunReportCount);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例8: RunChildrenByAgentReport
public ActionResult RunChildrenByAgentReport([DataSourceRequest] DataSourceRequest request, string name, string code, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "SP_Send_CommissionReport", outPutDeserialized.GetCommaSeparatedTokens());
}
var reportData = _virtualOfficeService.GetChildrenByAgent(GetLoggedUserId());
reportData = reportData.Where(r => r.Code.StartsWith(code) && r.Name.ToLower().StartsWith(name.ToLower()));
var mappedResult = reportData.MapTo<IEnumerable<ChildrenByAgentReport>, IEnumerable<ChildrenByAgentViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception)
{
return null;
}
}
示例9: RunMerchantCreditLimits
public ActionResult RunMerchantCreditLimits([DataSourceRequest] DataSourceRequest request, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "GetMerchantCreditLimits", outPutDeserialized.GetCommaSeparatedTokens());
}
var userCategory = GetUserCategory();
var reportData = userCategory == Category.Merchant ? _virtualOfficeService.GetMerchantCreditLimits(null, GetLoggedUserId()) :
_virtualOfficeService.GetMerchantCreditLimits(GetLoggedUserId(), null);
var mappedResult = reportData.MapTo<IEnumerable<GetMerchantCreditLimitsResult>, IEnumerable<MerchantCreditLimitResultViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例10: RunMerchantStatements
public ActionResult RunMerchantStatements([DataSourceRequest] DataSourceRequest request, string startDate, string endDate, int merchantId, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "Sp_GetMerchantStatement", outPutDeserialized.GetCommaSeparatedTokens());
}
//SaveLastDateRangeInSession(startDate, endDate);
var reportData = _virtualOfficeService.GetMerchantStatements(merchantId, startDate, endDate);
var mappedResult = reportData.MapTo<IEnumerable<MerchantStatementResult>, IEnumerable<MerchantStatementResultViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例11: RunIppBrowser
public ActionResult RunIppBrowser([DataSourceRequest] DataSourceRequest request, DateTime startDate, DateTime endDate, string outPut, bool saveOutPut)
{
try
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "SP_ippBrowser", outPutDeserialized.GetCommaSeparatedTokens());
}
//SaveLastDateRangeInSession(startDate, endDate);
var userLevel = GetUserLevel();
var agentId = userLevel != 0 ? GetLoggedUserId() : 0;
var merchantId = userLevel == 0 ? GetLoggedUserId() : 0;
var reportData = _virtualOfficeService.RunIppBrowser(agentId, merchantId, startDate, endDate);
var mappedResult = reportData.MapTo<IEnumerable<IppBrowserResult>, IEnumerable<IppBrowserResultViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
catch (Exception exception)
{
return null;
}
}
示例12: RunFullcargaPrepaidSummary
public ActionResult RunFullcargaPrepaidSummary([DataSourceRequest] DataSourceRequest request, DateTime startDate, DateTime endDate, string outPut, bool saveOutPut)
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "SP_Fullcarga_PrepaidSalesSummary", outPutDeserialized.GetCommaSeparatedTokens());
}
//SaveLastDateRangeInSession(startDate, endDate);
var userIsMerchant = GetUserCategory() == Category.Merchant;
var reportData = _virtualOfficeService.GetFullcargaPrepaidSummary(GetLoggedUserId(), userIsMerchant, startDate, endDate);
var mappedResult = reportData.MapTo<IEnumerable<FullcargaPrepaidSummary>, IEnumerable<FullcargaPrepaidSummaryViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
示例13: RunFullcargaInvoiceDetails
public ActionResult RunFullcargaInvoiceDetails([DataSourceRequest] DataSourceRequest request, string outPut, bool saveOutPut, int invoiceId = 0)
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "SP_Fullcarga_DetailInvoice", outPutDeserialized.GetCommaSeparatedTokens());
}
var userLevel = GetUserLevel();
var userId = userLevel != 0 ? GetLoggedUserId() : 0;
var reportData = _virtualOfficeService.GetFullcargarInvoiceDetail(invoiceId, userId);
var mappedResult = reportData.MapTo<IEnumerable<FullcargaInvoiceDetail>, IEnumerable<FullcargaInvoiceDetailViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}
示例14: RunPortfolioSummary
public ActionResult RunPortfolioSummary([DataSourceRequest] DataSourceRequest request,string outPut, bool saveOutPut, int status = 1)
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "sp_report_msv_portfolio_summary", outPutDeserialized.GetCommaSeparatedTokens());
}
var userId = Roles.IsUserInRole(RolesEnum.Master.ToString())? 0: GetLoggedUserId();
var reportData = _virtualOfficeService.RunMsPortfolioSummary(userId).ToList();
var accounts = reportData.Where(r => r.Status != -1 && ((r.Status == 1 && status == 1) || (r.Status != 1 && status == 0)));
var mappedResult = accounts.MapTo<IEnumerable<MsPortfolioResult>, IEnumerable<MsPortfolioResultViewModel>>().ToList();
var result = mappedResult.ToDataSourceResult(request);
_virtualOfficeService.LogReportResult(GetLoggedUserId().ToString(), "MS Portfolio Summary", mappedResult.Count(), Utils.MaximunReportCount);
return Json(result);
}
示例15: RunSalesDetails
public ActionResult RunSalesDetails([DataSourceRequest] DataSourceRequest request, DateTime startDate, DateTime endDate, string outPut, bool saveOutPut, int merchantId = 0)
{
if (saveOutPut)
{
var outPutDeserialized = new JavaScriptSerializer().Deserialize<List<string>>(outPut);
_virtualOfficeService.UpdateUserReportOutPut(GetLoggedUserId(), "sp_report_sales_details", outPutDeserialized.GetCommaSeparatedTokens());
}
var reportData = _virtualOfficeService.RunPrepaidSalesDetails(merchantId, startDate, endDate);
var mappedResult = reportData.MapTo<IEnumerable<PrepaidSalesDetailsResult>, IEnumerable<PrepaidSalesDetailsResultViewModel>>();
var result = mappedResult.ToDataSourceResult(request);
return Json(result);
}