using System;
using System.Windows.Forms;

namespace Cheongbuk_MegaPark_Key_Management
{
    public partial class ReturnKeyInfo : Form
    {
        public ProfitData ProfitDataInfo;

        public ReturnKeyInfo()
        {
            InitializeComponent();
        }

        private void Button_Close_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void ReturnKeyInfo_Load(object sender, EventArgs e)
        {
            label_KeyCode.Text = ProfitDataInfo.KeyCode.ToString();
            label_Category.Text = Setting.CategoryDictionary[ProfitDataInfo.Category].CategoryName;
            label_People.Text = ProfitDataInfo.People.ToPeople();

            label_StartDateTime.Text = ProfitDataInfo.StartDateTime.ToString("yyyy/MM/dd HH:mm:ss");
            label_EndDateTime.Text = ProfitDataInfo.EndDateTime.ToString("yyyy/MM/dd HH:mm:ss");
            int useTimeH = ProfitDataInfo.UseTime / 60;
            int useTimeM = ProfitDataInfo.UseTime % 60;
            label_UseTime.Text = useTimeH.ToThousand() + "시간 " + useTimeM.ToThousand() + "분";

            label_Price.Text = ProfitDataInfo.ProfitAdd.ToMoney();
            label_PriceDiscount.Text = ProfitDataInfo.ProfitDiscount.ToMoney();
            label_PriceFinal.Text = (ProfitDataInfo.ProfitAdd - ProfitDataInfo.ProfitDiscount).ToMoney();
        }
    }
}