示例#1
0
        private void Okbtnn_Click(object sender, EventArgs e)
        {
            if (Insertrbtnn.Checked == true)
            {
                insertBooking();
                comboBox1.ResetText();
                comboBox2.ResetText();
                comboBox3.ResetText();
                comboBox4.ResetText();
            }

            else if (Viewrbtnn.Checked == true)
            {
                viewBookings();


                Receptionist_Menu rm = new Receptionist_Menu();
            }
            else if (Searchrbtnn.Checked == true)
            {
                searchBooking(userControl11.id);
            }
            else if (radioButton1.Checked == true)
            {
                viewExpBookings();
            }
        }
示例#2
0
        public void receptionLogin()
        {
            try
            {
                db.Myconnection();

                //  uname = "'" + (textBox1.Text) + "'";
                string query = "select password from reception where receptionID=" + textBox1.Text + " and first_name!='admin'";

                SqlCommand cmd = new SqlCommand(query, DB.con);

                cmd.ExecuteNonQuery();

                int pass = (int)cmd.ExecuteScalar();



                if (textBox2.Text == pass.ToString())
                {
                    Receptionist_Menu ad = new Receptionist_Menu(textBox1.Text);
                    ad.Show();
                    this.Hide();
                }
            }
            catch
            {
                MessageBox.Show("Error Try Again");
            }
        }
示例#3
0
        private void RbookingUC_Load(object sender, EventArgs e)
        {
            Receptionist_Menu ob = new Receptionist_Menu();

            // TODO: This line of code loads data into the 'zabHotelDataSet6.customer' table. You can move, or remove it, as needed.
            this.customerTableAdapter.Fill(this.zabHotelDataSet6.customer);

            textBox2.Text = ob.label2.Text;
        }