public CheckInLog(string IdCard)
 {
     InitializeComponent();
     dataGridView1.AutoGenerateColumns = false;
     HotelManagementBLL.CheckIn CI = new HotelManagementBLL.CheckIn(dataGridView1);
     CI.ShowAllCheckInLogByID(IdCard);
 }
 private void button1_Click(object sender, EventArgs e)
 {
     if (CheckInput())
     {
         HotelManagementBLL.CheckIn obj = new HotelManagementBLL.CheckIn();
         obj.DealCheckOut(this.textBoxIDCard.Text.Trim(), this.textBoxRoomName.Text.Trim(), radioButtonIDCard.Checked);
     }
 }
Пример #3
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     if (CheckInput())
     {
         int          days = (int)dateTimePicker1.Value.Date.Subtract(System.DateTime.Now.Date).TotalDays;
         decimal      pay  = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["RoomPrice"].Value);
         DialogResult rs   = MessageBox.Show("共入住" + days + "天\n" + "应付押金" + (days * pay + 100) + "元", "是否确认缴纳押金", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
         if (rs == DialogResult.OK)
         {
             HotelManagementBLL.CheckIn obj = new HotelManagementBLL.CheckIn(dataGridView1);
             obj.DealCheckIn(textBoxIDCard.Text.Trim(), dateTimePicker1.Value);
         }
         dataGridView1.DataSource = null;
     }
 }