private void Checkstatus(int memberid) { DataTable dt = new MemberDAO().GetMember(memberid); if (dt.Rows.Count > 0) { string status = dt.Rows[0]["createdby"].ToString(); if (status == "Driver") { int memberUserid = Convert.ToInt32(ViewState["memberUser_id"].ToString()); UserScanDAO userscan = new UserScanDAO(); userscan.AddUserScanByIDMember(memberUserid, "ไม่ได้ลงทะบียนสแกน", "ไม่ได้ลงทะบียนสแกน", 0, 0, 0, datetime(), false, 0, ""); Response.Redirect("../Driver/FingerPrintscan.aspx" + this.EncryptQueryString("userid=" + memberUserid + "&driverid=" + memberid)); //cookiesdatauseranddriver(memberUser, memberid); } else if (status == "User") { txtusername_password.Text = "Username and/or password is incorrect."; } } }
protected void bthOKSave_Click(object sender, EventArgs e) { int memberUserid = Convert.ToInt32(ViewState["memberUser_id"].ToString()); MemberDAO Member = new MemberDAO(); UserScanDAO userscan = new UserScanDAO(); Member.UpdateMemberByIsactive(memberUserid, true); userscan.AddUserScanByIDMember(memberUserid, "ไม่ได้ลงทะบียนสแกน", "ไม่ได้ลงทะบียนสแกน", 0, 0, 0, datetime(), false, 0, ""); Response.Redirect("../Login.aspx"); }