Convert a c# pricing calculation to typescript/javascript.

  • 状态 关闭的
  • 预算 $30 - $250 USD
  • 总竞标 14

项目描述

When you are accepted, will send you the whole c#, but posted below is the calculation that I want converted.

Included in this project is a simple html webpage with 2 text boxes, one that has the JSON input in it (where it can be edited) and a button to show the results in second text box.

public static PricingResponse CalculatePricing(PricingRequest request)

{

PricingResponse r = new PricingResponse();

int productionServerCount = 1;

int nonProductionServerCount = 0;

if ([url removed, login to view] != null)

{

[url removed, login to view] = new PricingReturn();

[url removed, login to view](new PricingDetail() { Description = "User Pricing", LicenseCost = [url removed, login to view] * USER_SUBSCRIPTION});

[url removed, login to view](new PricingDetail() { Description = "Designer User Pricing", LicenseCost = [url removed, login to view] * DESIGNER_USER_SUBSCRIPTION });

if ([url removed, login to view]!= 0)

[url removed, login to view](new PricingDetail() { Description = "API Endpoint/Scheduled Job", LicenseCost = [url removed, login to view] * API_INTERFACE__JOB });

if ([url removed, login to view] != 0)

[url removed, login to view](new PricingDetail() { Description = "Non Production Servers", LicenseCost = [url removed, login to view] * NON_PRODUCTION_SERVER });

if ([url removed, login to view] != 0)

[url removed, login to view](new PricingDetail() { Description = "Guest/Shared User", LicenseCost = [url removed, login to view] * GUEST_USER});

nonProductionServerCount = [url removed, login to view];

}

if ([url removed, login to view] != null)

{

[url removed, login to view] = new PricingReturn();

[url removed, login to view](new PricingDetail() { Description = "Production Servers", LicenseCost = [url removed, login to view] * PRODUCTION_SERVER / SUBSCRIPTION_PAYBACK});

var nonProdCost = [url removed, login to view] * PRODUCTION_SERVER / SUBSCRIPTION_PAYBACK;

[url removed, login to view](new PricingDetail() { Description = "Non Production Servers", LicenseCost = (nonProdCost > UNLIMITED_NON_PRODUCTION ? UNLIMITED_NON_PRODUCTION : nonProdCost)/ SUBSCRIPTION_PAYBACK });

if ([url removed, login to view])

{

if ([url removed, login to view] > 2)

{

[url removed, login to view](new PricingDetail() { Description = "Disaster Recovery", LicenseCost = UNLIMITED_DISASTER_RECOVERY / SUBSCRIPTION_PAYBACK });

}

else

{

[url removed, login to view](new PricingDetail() { Description = "Disaster Recovery", LicenseCost = [url removed, login to view] * NON_PRODUCTION_SERVER / SUBSCRIPTION_PAYBACK });

}

}

productionServerCount = [url removed, login to view];

nonProductionServerCount = [url removed, login to view];

}

AddCommonPricing([url removed, login to view], [url removed, login to view], productionServerCount, nonProductionServerCount, [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view]);

AddCommonPricing([url removed, login to view], [url removed, login to view], productionServerCount, nonProductionServerCount, [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view]);

return r;

}

获得类似项目的报价
授予:
要求的技能

想赚钱吗?

  • 设置你的预算和期限
  • 列出你的提案
  • 获得工资

雇用同样在该项目上竞标的威客

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online