Example #1
0
        public void check_Instructor()
        {
            DataRow[] dr = _dt_ins_fingerPrint.Select("employee= " + instructor_FingerID.Trim());
            string    instructor_Name = "-";

            if (dr.Length != 0)
            {
                instructor_Name = dr[0]["employeeName"].ToString();
            }
            timer1.Stop();

            string msg = "";

            if (_instructorCode.Trim() == instructor_FingerID.Trim())
            {
                msg = "Do you want to start using <b>" + _studentName + " - " + _productName + "</b> private session, teach by <b>" + instructor_Name + "</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>" + instructor_Name + "</b> ?";
            }

            Cst_Form_Long form = new Cst_Form_Long(msg);

            if (form.ShowDialog() == DialogResult.Yes)
            {
                insert_signin();
            }
            else
            {
                this.DialogResult = DialogResult.Cancel;
                this.Close();
            }
        }
Example #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
            {
                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();
                }
            }
        }
Example #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();


                //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();
                }
            }
        }
Example #4
0
        public void check_Instructor()
        {
            DataRow[] dr = _dt_ins_fingerPrint.Select("employee= " + instructor_FingerID.Trim());
            string    finger_instructor_Name = "-";

            if (dr.Length != 0)
            {
                finger_instructor_Name = dr[0]["employeeName"].ToString();
            }
            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() != instructor_FingerID.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>" + finger_instructor_Name + "</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>" + finger_instructor_Name + "</b> ?";
            }

            Cst_Form_Long form = new Cst_Form_Long(msg);

            if (form.ShowDialog() == DialogResult.Yes)
            {
                insert_signin();
            }
            else
            {
                this.DialogResult = DialogResult.Cancel;
                this.Close();
            }
        }