Exemplo n.º 1
0
        private void btnRegisterOrUpdate_Click(object sender, EventArgs e)
        {
            var val = guestInfoCtrl.Validation();

            if (val)
            {
                var para   = guestInfoCtrl.Information;
                var thread = new EgoDevil.Utilities.BkWorker.BackgroundThread(Register);
                thread.RunWorkerCompleted += Thread_RunWorkerCompleted;
                thread.Start(para);
            }
            SetAttendInformation();
        }
Exemplo n.º 2
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            var val = Validation();

            if (val)
            {
                var info = new GuestInfo()
                {
                    Id        = txtNamePinyin.Text.Trim(),
                    Name      = txtName.Text,
                    Gender    = cbbGender.SelectedIndex,
                    Labels    = txtLabels.Text,
                    TableNo   = txtTableNo.Text,
                    ImagePath = currentImagePath,
                    Entourage = txtEntourage.Text ?? "",
                    GuestType = cbbGuestType.SelectedIndex,
                };
                var thread = new EgoDevil.Utilities.BkWorker.BackgroundThread(Register);
                thread.Start(info);
            }
        }