0% found this document useful (0 votes)
10 views3 pages

Billing System for Warnet Management

This document contains code for a billing application for an internet cafe (warnet) in C# that: 1. Uses a timer to track the elapsed time in hours, minutes, seconds and milliseconds that a customer uses the internet connection. 2. Stops the timer and calculates the billing tariff based on the elapsed time, with rates of Rp 2,000 for less than 15 seconds, Rp 3,000 for 15-30 seconds, and Rp 5,000 for more than 30 seconds or involving minutes/hours. 3. Was created by students Muhamad Ridho, Maihendra Panca Putra, and Reza Mardawa for their final project at STI

Uploaded by

Reza Mardawa 2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Billing System for Warnet Management

This document contains code for a billing application for an internet cafe (warnet) in C# that: 1. Uses a timer to track the elapsed time in hours, minutes, seconds and milliseconds that a customer uses the internet connection. 2. Stops the timer and calculates the billing tariff based on the elapsed time, with rates of Rp 2,000 for less than 15 seconds, Rp 3,000 for 15-30 seconds, and Rp 5,000 for more than 30 seconds or involving minutes/hours. 3. Was created by students Muhamad Ridho, Maihendra Panca Putra, and Reza Mardawa for their final project at STI

Uploaded by

Reza Mardawa 2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ALGORITMA DAN PEMROGRAMAN

CODING BILLING WARNET

Di Susun Oleh :
Muhamad Ridho
Maihendra Panca Putra
Reza Mardawa

STIKOM DINAMIKA BANGSA


JAMBI
2018
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

namespace biling
{
public partial class Form1 : Form
{
int jam = 0;
int menit = 0;
int detik = 0;
int milidetik = 0;
int tarif = 0;

public Form1()
{
InitializeComponent();
}

private void timer1_Tick(object sender, EventArgs e)


{
milidetik = milidetik + 1;

if (milidetik >= 10)


{
milidetik = 0;
detik = detik + 1;
}

if (detik >=60)
{
detik=0;
menit = menit + 1;
}

if (menit >= 60)


{
menit = 0;
jam = jam + 1;
}

if (jam >= 24)


{
jam = 0;
}

[Link] = jam + " : " + menit + " : " + detik + " : " + milidetik;
}

private void button1_Click(object sender, EventArgs e)


{
jam = 0;
menit = 0;
detik = 0;
milidetik = 0;
[Link] = "";
[Link] = true;
[Link]();
[Link] = true;
[Link] = true;
}

private void button2_Click(object sender, EventArgs e)


{
[Link]();
[Link] = false;

if (detik < 15 && menit <= 0 && jam <= 0)


{
tarif = 2000;
}
else if (detik >= 15 && detik <= 30 && menit <= 0 && jam <= 0)
{
tarif = 3000;
}
else if (detik > 30 || menit >= 0 || jam >= 0)
{
tarif = 5000;
}

[Link] = " Rp. " + [Link]();


}
//Button3(Tentang) Optional. Kalo disertakan berarti bikin form baru//
private void button3_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
[Link]();
}
}
}

You might also like