protected void bthnoteok_Click(object sender, EventArgs e)
        {
            UserScanDAO userscan     = new UserScanDAO();
            int         memberuserid = Convert.ToInt32(this.DecryptQueryString("userid").ToString());
            DataTable   dt           = userscan.GetUserScanByIDMember(memberuserid);

            if (dt.Rows.Count > 0)
            {
                if (txtcomment.Text.Trim() != "")
                {
                    string datetimeup   = dt.Rows[0]["datetime_up"].ToString();
                    string datetimedown = dt.Rows[0]["datetime_down"].ToString();

                    if (datetimeup == "ยังไม่ได้สแกน")
                    {
                        if (chkup.Checked == true)
                        {
                            userscan.UpdateUserScanByIDMember_Up(memberuserid, txtcomment.Text.Trim());
                            userscan.UpdateUserScanByIDMember_Noteup(memberuserid, 1);
                        }
                    }

                    if (datetimedown == "ยังไม่ได้สแกน")
                    {
                        if (chkdown.Checked == true)
                        {
                            userscan.UpdateUserScanByIDMember_Down(memberuserid, txtcomment.Text.Trim());
                            userscan.UpdateUserScanByIDMember_Notedown(memberuserid, 1);
                        }
                    }
                }
            }
        }
Exemple #2
0
        private void CheckIsactive(int memberuserid)
        {
            // MemberDAO Member = new MemberDAO();
            UserScanDAO userscan = new UserScanDAO();
            DataTable   dt       = userscan.GetUserScanByIDMember(memberuserid);

            if (dt.Rows.Count > 0)
            {
                bool isactive = (bool)dt.Rows[0]["activescan"];
                if (isactive == true)
                {
                    labscan.Text            = "ทำการสแกนลายนิ้วมือเรียบร้อยแล้ว";
                    Imgfingerprint.ImageUrl = "~/Images/true.png";
                    bthSaveFinish.Visible   = false;
                }
            }
        }