Exemplo n.º 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Frm_Hms_CheckIn chkin    = (Frm_Hms_CheckIn)_form;
            string          roomList = "";

            foreach (var items in chkAvailableRooms.CheckedItems)
            {
                if (roomList.Equals(string.Empty))
                {
                    roomList = roomList + items;
                }
                else
                {
                    roomList = roomList + "," + items;
                }
            }
            if (roomList.Equals(string.Empty))
            {
                chkin.chkMultipleRooms.Checked = false;
            }
            else
            {
                chkin.txtMultipleRooms.Text = roomList;
            }
            this.Close();
        }
Exemplo n.º 2
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            Frm_Hms_CheckIn chkin = (Frm_Hms_CheckIn)_form;

            if (chkin.txtMultipleRooms.Text == "")
            {
                chkin.chkMultipleRooms.Checked = false;
            }
            this.Dispose();
        }
Exemplo n.º 3
0
 private void checkInToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (sender.ToString().Equals("Check In"))
     {
         Frm_Hms_CheckIn _chkIn = new Frm_Hms_CheckIn();
         _chkIn.MdiParent = this;
         _chkIn.Dock      = DockStyle.Fill;
         _chkIn.Show();
     }
 }
Exemplo n.º 4
0
        private void GetAvailableRoom(CheckedListBox chkList)
        {
            var             dt    = new DataTable();
            Frm_Hms_CheckIn chkin = (Frm_Hms_CheckIn)_form;

            try
            {
                if (true)
                {
                    var ds = new DataSet();
                    ds = _commonServices.getComboDetails(_clsGlobalConstants.glvUserId, "AVIALABLE_ROOMS");
                    if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                    {
                        dt = ds.Tables[0];
                        foreach (DataRow row in dt.Rows)
                        {
                            if (chkin.chkModifyCheckIn.Checked)
                            {
                                chkList.Items.Add(row["Key"].ToString());
                            }
                            else
                            {
                                if (!chkin.cmbRoomNo.Text.Trim().Equals(row["Key"].ToString()))
                                {
                                    chkList.Items.Add(row["Key"].ToString());
                                }
                            }
                        }
                    }
                }
                else
                {
                    dt = _clsRestService.GetHttpRequestDataTable(_clsGlobalConstants.rooms);

                    foreach (DataRow row in dt.Rows)
                    {
                        chkList.Items.Add(row[_clsRooms.roomNumber].ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemplo n.º 5
0
 public Frm_AvailableRooms(Frm_Hms_CheckIn frmCheckIn)
 {
     _form = frmCheckIn;
     InitializeComponent();
 }