private void InitializerCheckout() { this.DateTimePicker_AppointmentDate.MinDate = DateTime.Today; LoadInvoiceRoom(); LoadInvoiceService(); BS_Layer.BLInvoice bl = new BS_Layer.BLInvoice(); this.TextBox_RoomPrice.Text = bl.CalInvoiceRoomPrice(this.Room_ID).ToString(); this.TextBox_ServicePrice.Text = bl.CalInvoiceServicePrice(this.Room_ID).ToString(); }
private void LoadInvoiceRoom() { BS_Layer.BLInvoice bl = new BS_Layer.BLInvoice(); var Temp = bl.LoadCheckoutInvoiceRoomPrice(this.Room_ID); Checkout_Datagridview_Invoice.Rows[0].Cells[0].Value = Temp.ElementAt(0).InvoiceID; Checkout_Datagridview_Invoice.Rows[0].Cells[1].Value = Temp.ElementAt(0).CustomerName; Checkout_Datagridview_Invoice.Rows[0].Cells[2].Value = Temp.ElementAt(0).CheckInDate; Checkout_Datagridview_Invoice.Rows[0].Cells[3].Value = Temp.ElementAt(0).CheckOutDate; Checkout_Datagridview_Invoice.Rows[0].Cells[4].Value = Temp.ElementAt(0).Name; Checkout_Datagridview_Invoice.Rows[0].Cells[5].Value = Temp.ElementAt(0).Price; }
private void Checkout_Button_Confirm_Click(object sender, EventArgs e) { BS_Layer.BLInvoice bl = new BS_Layer.BLInvoice(); if (bl.Checkout(this.Room_ID) == true) { MessageBox.Show("Successfully"); this.Close(); } else { MessageBox.Show("Failed"); } }
private void Checkin_Button_Confirm_Click(object sender, EventArgs e) { BS_Layer.BLInvoice bl = new BS_Layer.BLInvoice(); if (bl.Checkin(Checkin_DataGridView_Detail.Rows[0].Cells[0].Value.ToString(), Checkin_DataGridView_Detail.Rows[0].Cells[2].Value.ToString(), this.EmployeeID.ToString()) == true) { MessageBox.Show(" Succesfully !"); this.Close(); } else { MessageBox.Show(" Failed "); } }