Professional Documents
Culture Documents
Tinhtiencf
Tinhtiencf
Tinhtiencf
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace tinhtiencf
{
public partial class Form1 : Form
{
public float tongtien;
public int tongkhach;
public string mon;
public Form1()
{
InitializeComponent();
}
tongkhach++;
if (rdloai.Checked == true && cbsv.Checked == false)
{
tongtien += 20000;
mon = "1 cafe đá";
}
else if (rdloai.Checked == true && cbsv.Checked == true)
{
tongtien += 20000 * 80 / 100;
mon = "1 cafe đá";
}
else if (rdloai2.Checked == true && cbsv.Checked == false)
{
tongtien += 25000;
mon = "1 cafe sữa";
}
else if (rdloai2.Checked == true && cbsv.Checked == true)
{
tongtien += 25000 * 80 / 100;
mon = "1 cafe sữa";
}
else if (rdloai3.Checked == true && cbsv.Checked == false)
{
tongtien += 30000;
mon = "1 cafe sữa đá";
}
else if (rdloai3.Checked == true && cbsv.Checked == true)
{
tongtien += 30000 * 80 / 100;
mon = "1 cafe sữa đá";
}
else if (raloai4.Checked == true && cbsv.Checked == false)
{
tongtien += 25000;
mon = "1 cafe đá";
}
else if (raloai4.Checked == true && cbsv.Checked == true)
{
tongtien += 25000 * 80 / 100;
mon = "1 cafe đá";
}
else if (raloai5.Checked == true && cbsv.Checked == false)
{
tongtien += 30000;
mon = "1 cafe kem";
}
else
{
tongtien += 30000 * 80 / 100;
mon = "1 cafe kem";
}
MessageBox.Show("thêm: " + mon, "Hóa Đơn", MessageBoxButtons.OK);
btnthanhtoan.Enabled = true;
btnnhaplai.Enabled = true;
txtthanhtoan.Text = tongtien.ToString();
txttong.Text = tongkhach.ToString();
}