Example #1
0
 private void ຈອງຫອງToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     //FormBooking fs = new FormBooking();
     //fs.StartPosition = FormStartPosition.CenterScreen;
     //fs.ShowDialog();
     SengkeoHotel.room_Service_controller.ReserveBooking.frmBookingReserveDetails f = new room_Service_controller.ReserveBooking.frmBookingReserveDetails();
     f.MdiParent = this;
     f.Text      = "" + childFormNumber++;
     f.Show();
     f.WindowState = FormWindowState.Maximized;
 }
Example #2
0
        private void btsave_Click(object sender, EventArgs e)
        {
            DialogResult dl = MessageBox.Show("", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dl == DialogResult.Yes)
            {
                if (txtname.Text == "")
                {
                    MessageBox.Show("ປ້ອນຊື່ລູກຄ້າ");
                    txtname.Focus();
                    return;
                }
                else if (txtlname.Text == "")
                {
                    MessageBox.Show("ປ້ອນນາມສະກຸນ");
                    txtlname.Focus();
                    return;
                }
                else if (txtaddress.Text == "")
                {
                    MessageBox.Show("ປ້ອນທີ່ຢູ່");
                    txtaddress.Focus();
                    return;
                }
                cn.AddNew_Customer(txtcusid.Text.Trim().ToUpper().Trim(), txtname.Text.Trim(), txtlname.Text.Trim(), txtaddress.Text.Trim(), txttel.Text.Trim(), txtemail.Text.Trim());
                ms.INSERT_Or_SAVE_Successfull();
                cn.CreateCustomerID(txtcusid);
                SengkeoHotel.room_Service_controller.ReserveBooking.frmBookingReserveDetails f = new frmBookingReserveDetails();
                frmBookingReserveDetails.cusname        = txtname.Text;
                frmBookingReserveDetails.custmeraddress = txtaddress.Text;
                frmBookingReserveDetails.customertel    = txttel.Text;
                frmBookingReserveDetails.cusemail       = txtemail.Text;
                this.Close();
            }
            else
            {
                return;
            }
        }