Beispiel #1
0
        public Payment(int bookingID, string CustomerID, string RoomNo, DateTime CheckInDay, DateTime CheckOutDay, float TotalPay, float PrePay)
        {
            RoomAccess data = new RoomAccess();

            InitializeComponent();
            txtPayBookintID.Text = bookingID.ToString();
            txtPayCustNo.Text    = data.getCusName(CustomerID);
            txtPayRoomNo.Text    = RoomNo;
            txtPayCheckin.Text   = CheckInDay.ToShortDateString();
            txtPayCheckOut.Text  = CheckOutDay.ToShortDateString();
            TimeSpan ngayo = CheckOutDay.Subtract(CheckInDay);

            txtNgayO.Text    = (ngayo.Days + 1).ToString();
            txtPayTotal.Text = TotalPay.ToString();
            txtPayPre.Text   = PrePay.ToString();
            txtConLai.Text   = (TotalPay - PrePay).ToString();

            bookingIDaa  = bookingID;
            customerIDaa = CustomerID;
            roomNoaa     = RoomNo;
            totaldayaa   = ngayo.Days + 1;
            totalaa      = TotalPay;
        }