예제 #1
0
    private void BindAvailedBillService(int checkInID)
    {
        AvailedBillServices bill = new AvailedBillServices();

        bill.CheckIn_ID = checkInID;
        DataTable table = new DataTable();

        table = bill.SelectByCheckInID();

        if (table.Rows.Count > 0)
        {
            foreach (DataRow row in table.Rows)
            {
                totalBills += double.Parse(row["TotalCost"].ToString());
            }
            hidTotBills.Value = totalBills.ToString();
            gridB.DataSource  = table;
            gridB.DataBind();
        }
        else
        {
            gridB.DataSource = table;
            gridB.DataBind();
        }
    }
예제 #2
0
    private void BindCheckOut(int checkOutId)
    {
        CheckOut checkOut = new CheckOut();

        checkOut.CheckOut_ID = checkOutId;
        checkOut.SelectOne();
        try
        {
            CheckIn checkin = new CheckIn();
            checkin.CheckIn_ID = checkOut.CheckIn_ID;
            checkin.SelectOne();
            Bookings booking = new Bookings();
            booking.Booking_ID = checkin.Booking_ID;
            booking.SelectOne();
            AvailedBillServices availedBillServices = new AvailedBillServices();
            //availedBillServices.

            DateTime from = DateTime.Parse(checkin.CheckIn_Date.ToString());
            DateTime to   = DateTime.Parse(checkOut.CheckOut_Date.ToString());
            lblCheckIn.Text  = from.ToString("MM/dd/yyyy");
            lblCheckOut.Text = to.ToString("MM/dd/yyyy");
            double numberDays = to.Subtract(from).TotalDays + 1;
            numberDays         = Math.Round(numberDays, 0);
            lblDaysStayed.Text = numberDays.ToString();
            //  lblBoardingCost.Text = "KWD. " + checkOut.TotalBoarding_Amount.ToString();
            // lblTotalInvoice.Text = "KWD. " + checkOut.Additional_Invoice_Amount.ToString();
            // lblPaidAmount.Text = "KWD. " + checkOut.Paid_Amount.ToString();
            // lblSettlementAmount.Text = "KWD. " + checkOut.Settlement_Amount.ToString();
        }
        catch (Exception ex)
        {
        }
    }