private void PT_formStart_Load(object sender, EventArgs e)
        {
            textBox1.Focus();
            Bitmap logo = new Bitmap(Properties.Resources.Logo_RSG);

            pictureEdit_Logo.Image = logo;

            setup_Datatable = new setup_Datatable();
            utils           = new Utils();

            Utils.create_Img_Cached();

            lb_Student_RGP.Text  = "";
            lb_Student_Name.Text = "";
            pictureEdit_Student_Attendees.Image = null;

            cmb_Room.DataSource    = PT_Session.get_Datatable_Club_RoomList();
            cmb_Room.ValueMember   = "room";
            cmb_Room.DisplayMember = "room";
            cmb_Room.SelectedIndex = -1;
            cmb_Room.Visible       = false;
            lb_Room.Visible        = false;

            foreach (Control ctl in this.Controls)//bgw
            {
                ctl.Enabled = false;
            }
        }
Beispiel #2
0
        public void get_Employee_Status(string rfid)
        {
            setup_Datatable setup = new setup_Datatable();
            DataTable       dt    = setup.datatable_instructor_RFID(rfid);

            if (dt.Rows.Count == 0)
            {
                alertControl1.Show(this, "Data center", "Instructor not found", gbr_warn);
                return;
            }
            else
            {
                if (_employee_Start.Trim() == dt.Rows[0]["employeeStart"].ToString().Trim())
                {
                    timer1.Stop();
                    if (MessageBox.Show("Do you want to finish this private instruction session ?", "Axioma agent", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        update_Signin();
                    }
                    else
                    {
                        this.DialogResult = DialogResult.Cancel;
                        this.Close();
                    }
                }
                else
                {
                    MessageBox.Show("Instructor does not match with instructor started the private instruction session", "Axioma Agent", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Beispiel #3
0
        public void get_Employee_Status(string rfid)
        {
            setup_Datatable setup = new setup_Datatable();
            DataTable       dt    = setup.datatable_instructor_RFID(rfid);

            if (dt.Rows.Count == 0)
            {
                alertControl1.Show(this, "Data center", "Instructor not found", gbr_warn);
                return;
            }
            else
            {
                timer1.Stop();
                string msg = "";
                if (_instructorCode.Trim() == dt.Rows[0]["employeeStart"].ToString().Trim())
                {
                    msg = "Do you want to start using <b>" + _studentName + " - " + _productName + "</b> private session, teach by <b>" + dt.Rows[0]["preferredName"].ToString().Trim() + "</b> ?";
                }
                else
                {
                    msg = "<b>" + _instructorName + "</b> is the registered instructor for this private instruction package. \nDo you want to start using <b>" + _studentName + " - " + _productName + "</b> private session, teach by <b>" + dt.Rows[0]["preferredName"].ToString().Trim() + "</b> ?";
                }

                Cst_Form_Long form = new Cst_Form_Long(msg);
                if (form.ShowDialog() == DialogResult.Yes)
                {
                    insert_signin(dt.Rows[0]["employeeStart"].ToString().Trim());
                }
                else
                {
                    this.DialogResult = DialogResult.Cancel;
                    this.Close();
                }
            }
        }
        private void PT_studentMultiEnd_Alt_Load(object sender, EventArgs e)
        {
            textBox1.Focus();
            Bitmap logo = new Bitmap(Properties.Resources.Logo_RSG);

            pictureEdit_Logo.Image = logo;

            lb_ClubName.Text = _clubName;

            setup_Datatable = new setup_Datatable();
            textBox1.Focus();
            timer1.Start();
            timer2.Start();
        }
Beispiel #5
0
        public void get_Employee_Status(string rfid)
        {
            setup_Datatable setup = new setup_Datatable();
            DataTable       dt    = setup.datatable_instructor_RFID(rfid);

            if (dt.Rows.Count == 0)
            {
                alertControl1.Show(this, "Data center", "Instructor not found", gbr_warn);
                return;
            }
            else
            {
                timer1.Stop();


                //cek registered package instructor with instructor finger
                List <string> list_instructorName = new List <string>();
                foreach (DataRow data in _dt_listData.Rows)
                {
                    if (data["instructorCode"].ToString().Trim() != dt.Rows[0]["employeeStart"].ToString().Trim())
                    {
                        if (!list_instructorName.Contains(data["instructorName"].ToString().Trim()))
                        {
                            list_instructorName.Add(data["instructorName"].ToString().Trim());
                        }
                    }
                }

                string msg = "";
                if (list_instructorName.Count == 0)
                {
                    msg = "Do you want to start using <b>" + _productName + "</b> private session with total participants <b>" + _totalParticipants + "</b>, teach by <b>" + dt.Rows[0]["preferredName"].ToString().Trim() + "</b> ?";
                }
                else
                {
                    msg = "<b>" + string.Join(";", list_instructorName.ToArray()) + "</b> is the registered instructor for this private instruction package. \nDo you want to start using <b>" + _productName + "</b> private session with total participants <b>" + _totalParticipants + "</b>, teach by <b>" + dt.Rows[0]["preferredName"].ToString().Trim() + "</b> ?";
                }

                Cst_Form_Long form = new Cst_Form_Long(msg);
                if (form.ShowDialog() == DialogResult.Yes)
                {
                    insert_signin(dt.Rows[0]["employeeStart"].ToString().Trim());
                }
                else
                {
                    this.DialogResult = DialogResult.Cancel;
                    this.Close();
                }
            }
        }
Beispiel #6
0
        private void PT_studentMultiEnd_Load(object sender, EventArgs e)
        {
            textBox1.Focus();
            Bitmap logo = new Bitmap(Properties.Resources.Logo_RSG);

            pictureEdit_Logo.Image = logo;

            lb_ClubName.Text                    = _clubName;
            lb_Student_Name.Text                = _student_Name;
            lb_Student_RGP.Text                 = "RGP: " + _student_RGP;
            lb_productName.Text                 = _product_Name;
            lb_Instructor_Name.Text             = "Instructor: " + _employee_StartName;
            pictureEdit_Student_Attendees.Image = null;

            setup_Datatable = new setup_Datatable();
            utils           = new Utils();
            Utils.create_Img_Cached();

            foreach (Control ctl in this.Controls)
            {
                ctl.Enabled = false;
            }
        }
Beispiel #7
0
        private void PT_studentMultiStart_Load(object sender, EventArgs e)
        {
            textBox1.Focus();
            Bitmap logo = new Bitmap(Properties.Resources.Logo_RSG);

            pictureEdit_Logo.Image = logo;

            setup_Datatable = new setup_Datatable();
            utils           = new Utils();

            Utils.create_Img_Cached();

            lb_Student_RGP.Text  = "";
            lb_Student_Name.Text = "";
            pictureEdit_Student_Attendees.Image = null;

            dr = null;

            foreach (Control ctl in this.Controls)//bgw
            {
                ctl.Enabled = false;
            }
        }