Convert a c# pricing calculation to typescript/javascript.

Ακυρώθηκε Αναρτήθηκε Πριν 7 χρόνια Πληρώθηκε κατά την παράδοση
Ακυρώθηκε Πληρώθηκε κατά την παράδοση

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 ([login to view URL] != null)

{

[login to view URL] = new PricingReturn();

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

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

if ([login to view URL]!= 0)

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

if ([login to view URL] != 0)

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

if ([login to view URL] != 0)

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

nonProductionServerCount = [login to view URL];

}

if ([login to view URL] != null)

{

[login to view URL] = new PricingReturn();

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

var nonProdCost = [login to view URL] * PRODUCTION_SERVER / SUBSCRIPTION_PAYBACK;

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

if ([login to view URL])

{

if ([login to view URL] > 2)

{

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

}

else

{

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

}

}

productionServerCount = [login to view URL];

nonProductionServerCount = [login to view URL];

}

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

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

return r;

}

I have attached the ACTUAL pricing logic as well as what a converter (duocode) produced in terms of the javascript.

the visual studio project has 3 key files.

Program.cs (this is the c# project that has testing logic built in - using XML not JSON)
ConvertedJS.txt (this is result of converter)
SourceForConverter (this is edited to allow the converter to work)

HTML JavaScript Typescript

Ταυτότητα Εργασίας: #12658467

Σχετικά με την εργασία

13 προτάσεις Απομακρυσμένη εργασία Ενεργό Πριν 7 χρόνια

Ανατέθηκε στον:

AntonBliznetc

Hi, I am interested in your project. Please send full code of c#. I open this source. Is not full source code c# I can use C# and Javascript. I am a full time programmer with 20 year exp in Russia. I have hi degr Περισσότερα

$50 USD σε 1 μέρα
(7 Αξιολογήσεις)
2.4

13 freelancers κάνουν προσφορές κατά μέσο όρο $157 για αυτή τη δουλειά

ArmiaWassefFayez

i am a lead .Net software engineer and responsible for creating web and desktop applications using different languages and technologies if u r interested just send me a message thank you and good luck

$200 USD σε 3 μέρες
(80 Αξιολογήσεις)
7.2
mobiletech1604

Dear there Thank you for posting this project. I could start immediately. I could finish within 2 days. Looking forward to hear from you Thanks & B/R

$200 USD σε 2 μέρες
(6 Αξιολογήσεις)
5.3
sheikDev

Hello, Im interested to work on this. I have worked on similar jobs already Please have a look on my profile. Im more than 8 years experience in .NET and hands on both C# and JS. Thanks for your reply. Re Περισσότερα

$138 USD σε 2 μέρες
(7 Αξιολογήσεις)
4.4
YogsPatil

it's my pleasure if you hire me for these project

$88 USD σε 2 μέρες
(0 Αξιολογήσεις)
0.5
jh3141

19 years' industry experience with substantial projects in both C# and Javascript. High quality code, including a redesign to make it easier to make modifications to your pricing calculation, and full documentation an Περισσότερα

$80 USD σε 3 μέρες
(0 Αξιολογήσεις)
2.4