private void btnEdit_Click(object sender, EventArgs e)
 {
     if (cvBar_Rent_CheckIn.GetFocusedRowCellValue("Id_Checkin") == null)
     {
         GoobizFrame.Windows.Forms.UserMessage.Show("SYS_EMPTY_COLLECTION", new string[] { "danh sách đặt phòng" });
         return;
     }
     //// xóa file tmp trong folder Default\AppForms để update label khi Loadform
     //string path_file = @"Resources\Default\AppForms\Ecm.Bar.Frmbar_Rent_Checkin_Info";
     //if (System.IO.File.Exists(path_file))
     //    System.IO.File.Delete(path_file);
     _Frmbar_Rent_Checkin_Info = new Frmbar_Rent_Checkin_Info();
     _Frmbar_Rent_Checkin_Info.barSystem.Visible = false;
     _Frmbar_Rent_Checkin_Info.Icon = GoobizFrame.Windows.MdiUtils.ThemeSettings.GetProductIcon();
     _Frmbar_Rent_Checkin_Info.Current_Id_Checkin = cvBar_Rent_CheckIn.GetFocusedRowCellValue("Id_Checkin");
     _Frmbar_Rent_Checkin_Info.PerformEdit();
     _Frmbar_Rent_Checkin_Info.PerformCancel();
     _Frmbar_Rent_Checkin_Info.btnAdd.Visible                 = false;
     _Frmbar_Rent_Checkin_Info.btnCancel.Visible              = false;
     _Frmbar_Rent_Checkin_Info.btnCheckout.Visible            = false;
     _Frmbar_Rent_Checkin_Info.btnEdit.Visible                = false;
     _Frmbar_Rent_Checkin_Info.btnReseved.Visible             = false;
     _Frmbar_Rent_Checkin_Info.btnSave.Visible                = false;
     _Frmbar_Rent_Checkin_Info.btnPrint.Visible               = false;
     _Frmbar_Rent_Checkin_Info.tableLayout_ButonOrder.Visible = false;
     _Frmbar_Rent_Checkin_Info.ShowDialog();
     DisplayInfo();
 }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     //// xóa file tmp trong folder Default\AppForms để update label khi Loadform
     //string path_file = @"Resources\Default\AppForms\Ecm.Bar.Frmbar_Rent_Checkin_Info";
     //if (System.IO.File.Exists(path_file))
     //    System.IO.File.Delete(path_file);
     _Frmbar_Rent_Checkin_Info = new Frmbar_Rent_Checkin_Info();
     _Frmbar_Rent_Checkin_Info.barSystem.Visible = false;
     _Frmbar_Rent_Checkin_Info.Icon = GoobizFrame.Windows.MdiUtils.ThemeSettings.GetProductIcon();
     //_Frmbar_Rent_Checkin_Info.ChangeFormState(GoobizFrame.Windows.Forms.FormState.Add);
     _Frmbar_Rent_Checkin_Info.PerformAdd();
     _Frmbar_Rent_Checkin_Info.ShowDialog();
     DisplayInfo();
 }
        private void btn_Checkout_Click(object sender, EventArgs e)
        {
            if (cvBar_Rent_CheckIn.GetFocusedRowCellValue("Id_Checkin") == null)
            {
                GoobizFrame.Windows.Forms.UserMessage.Show("SYS_EMPTY_COLLECTION", new string[] { "danh sách đặt phòng" });
                return;
            }
            if ("" + lookUpEdit_RentLevel.EditValue == "")
            {
                GoobizFrame.Windows.Forms.UserMessage.Show("SYS_EMPTY_COLLECTION", new string[] { labelControl19.Text });
                return;
            }
            DataSet dsCheckin_Table_Collection = objBarService.Get_All_Bar_Rent_Checkin_Table(cvBar_Rent_CheckIn.GetFocusedRowCellValue("Guid_Checkin")).ToDataSet();

            if (dsCheckin_Table_Collection.Tables[0].Rows.Count > 1) //check nếu có hơn 2 phòng thì hiển thị danh sách phòng --> check out từng phòng
            {
                if (GoobizFrame.Windows.Forms.UserMessage.Show("Msg00040", new string[] { }) == DialogResult.Yes)
                {
                    objBarService.Update_Bar_Rent_Check_Out(cvBar_Rent_CheckIn.GetFocusedRowCellValue("Id_Checkin"));
                }
                else
                {
                    _Frmbar_Rent_Checkin_Info = new Frmbar_Rent_Checkin_Info();
                    _Frmbar_Rent_Checkin_Info.barSystem.Visible = false;
                    _Frmbar_Rent_Checkin_Info.Icon = GoobizFrame.Windows.MdiUtils.ThemeSettings.GetProductIcon();
                    _Frmbar_Rent_Checkin_Info.Current_Id_Checkin = cvBar_Rent_CheckIn.GetFocusedRowCellValue("Id_Checkin");
                    _Frmbar_Rent_Checkin_Info.ChangeFormState(GoobizFrame.Windows.Forms.FormState.View);
                    _Frmbar_Rent_Checkin_Info.Check_Out();
                    _Frmbar_Rent_Checkin_Info.ShowDialog();
                }
            }
            else if (GoobizFrame.Windows.Forms.UserMessage.Show("Msg00038", new string[] { }) == DialogResult.Yes)
            {
                objBarService.Update_Bar_Rent_Check_Out(cvBar_Rent_CheckIn.GetFocusedRowCellValue("Id_Checkin"));
            }
            this.PerformPrintPreview();
            this.DisplayInfo();
            new System.Threading.Thread(new System.Threading.ThreadStart(this.Xuat_Nvl)).Start();
        }