|
Programming › Re: Fingerprint Matching Application by Bros1: 6:27pm On Aug 21, 2012 |
I can help you out if you want assistance .NET. Our enterprise software products at Codebase Technologies have biometric support integrated. I can send you code samples , SDK and ActiveX for bimetric integration into desktop and browser based apps. Thanks |
Car Talk › Re: Is The 2002 Ford Explorer Reliable? by Bros1: 8:17pm On Aug 13, 2012 |
I will suggest that you consider it critically. Ford explorers from 2002-2004 happens to be on the lists of most problematic vehicles on most car review sites. Check edmunds.com and carcomplaints.com. thanks |
Programming › Re: VB.NET Assistance Needed From VB.NET Gurus by Bros1: 10:01am On Aug 11, 2012 |
This problem you have is called Ranking issue. TSQL provide ranking functions.
So when average scores are same for more than one student, you have 2 main options.
1. SELECT admissionno, RANK() OVER (ORDER BY SUM(AggregateScore) DESC) AS 'POSITION' FROM studentresults WHERE PresentClass=@currentClass AND TermID=@termId GROUP BY AdmissionNo Result will be like this: 1,2,2,2,5,6,6,8,.....
2. SELECT admissionno, DENSE_RANK() OVER (ORDER BY SUM(AggregateScore) DESC) AS 'POSITION' FROM studentresults WHERE PresentClass=@currentClass AND TermID=@termId GROUP BY AdmissionNo Result will be like this:1,2,2,2,3,4,4,5,.....
From experience with schools we've deployed. option 1 is preferred. But i may suggest in ur case like the client decide. Thanks |
Programming › Re: VB.NET Assistance Needed From VB.NET Gurus by Bros1: 6:38pm On Aug 10, 2012 |
Dear VURN, i think i understand ur challenge. you want to rank your result from ur query based on the average score. I will share a SQL snippet from our Schools Management ERP software. /****** Object: StoredProcedure [dbo].[TermReportCard] Script Date: 08/10/2012 18:31:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[TermReportCard] ( @termId varchar(20), @currentClass varchar(50), @admissionNo VARCHAR(20) ) --exec [TermReportCard] '1001201120121','jss2f boys','10/6911' AS SET NOCOUNT ON; DECLARE @averageAge AS NUMERIC --get average class age SELECT @averageAge=AVG(DATEPART(Yy, Ap.DateOfBirth)) FROM Applicant ap INNER JOIN AdmissionNumber an ON Ap.ApplicantId = an.ApplicantId WHERE (an.CurrentClass = @currentclass)
SELECT @averageAge=DATEPART(yy,GETDATE())-@averageAge
-- get term and session info DECLARE @term VARCHAR(20),@session VARCHAR(20) SELECT @term= CASE term WHEN 1 THEN 'First' WHEN 2 THEN 'Second' WHEN 3 THEN 'Third' WHEN 4 THEN 'Fourth' end FROM dbo.Term WHERE TermID=@termId
SELECT @session=session FROM dbo.Term WHERE TermID=@termId
--add school letterhead, principal signature and DECLARE @principalSign AS VARBINARY(max) DECLARE @noInClass AS INT DECLARE @percent AS decimal(8,2)
SELECT @principalSign=SIGNATURE FROM staffbio WHERE Designation='###' SELECT @noInClass=COUNT(DISTINCT AdmissionNo) FROM dbo.StudentResults WHERE PresentClass=@currentClass AND TermID=@termId -- determine students position DECLARE @weightScore decimal(8,2),@noOfSubjects INT,@position int SELECT @weightscore=SUM(aggregatescore)FROM dbo.StudentResults WHERE PresentClass=@currentClass AND TermID=@termId AND AdmissionNo=@admissionNo SELECT @noOfSubjects=COUNT(DISTINCT subject)FROM dbo.StudentResults WHERE PresentClass=@currentClass AND TermID=@termId AND AdmissionNo=@admissionNo
SELECT @percent=@weightscore/@noOfSubjects;
WITH classPositions AS ( SELECT admissionno, ROW_NUMBER() OVER (ORDER BY SUM(AggregateScore) DESC) AS 'POSITION' FROM studentresults WHERE PresentClass=@currentClass AND TermID=@termId GROUP BY AdmissionNo ) SELECT @position=POSITION FROM classPositions WHERE admissionno=@admissionNo;
--select the main table SELECT @averageAge 'Average Class Age',@position 'Position',@percent 'Percent',@noInClass 'No in Class', (@noOfSubjects*100) 'Weighted Score', a.StudentName, AggregateScore,s.Subject,s.AdmissionNo, @principalSign 'Principal',@term 'Term',@session 'Session',s.PresentClass, s.Assessment FROM studentresults s INNER JOIN dbo.AdmissionNumber a ON s.AdmissionNo=a.AdmissionNo WHERE s.TermID=@termid AND s.PresentClass=@currentClass AND a.AdmissionNo=@admissionNo
Take note of : SELECT admissionno, ROW_NUMBER() OVER (ORDER BY SUM(AggregateScore) DESC) AS 'POSITION' FROM studentresults WHERE PresentClass=@currentClass AND TermID=@termId GROUP BY AdmissionNo that is where the ranking takes place. If u need more assistance or clarification, contact me: david.adele@codebasetechnologies.com. Thanks |
Autos › Re: Mistbushi Motero Sport 4sale @option Price by Bros1: 7:59am On May 11, 2012 |
Intereseted too. Send pixs to david.adele@codebasetechnologies.com |
Autos › Any Car Dealer That Sells Used Cars With Instalmental Payment? by Bros1(op): 9:49am On Mar 10, 2012 |
We am looking for a dealer that sell good used vehicles with option of instalmental payment. You can send your requirements to admin@codebasetechnologies.com or call 08035133522. Thanks |
Webmasters › Re: How To Integrate Sms To A Online Registration Form (php, Html, Aspx Etc) by Bros1: 6:57pm On Jan 26, 2012 |
You can use this my code. It's is vb and from one of my applications. Though i've tried simplifying it. It basically creates a webrequest using the parameters from ur provider as a string. It send the request to the web server and get the response as sending status. For more assistance, you can email me at david.adele@codebasetechnologies.com or +2348035133522. Thanks Option Strict On Imports Microsoft.VisualBasic Imports System.Xml Imports System.Net Imports System.IO Imports LogissTableAdapters Imports System.Web.UI
Public Class SMSEngine Private noOfsms As Integer = Nothing Private SMSSent As Integer = Nothing
Function SendSMS(ByVal sender As String, ByVal message As String, ByVal destination As String) As String Dim genid As String = ChrW(34) & GetUniqueCode() & ChrW(34)
'Dim xml1 As String = "<SMS><authentification><username>youremail@yahoo.co.uk</username><password>yourpass</password></authentification><message><sender>" & TextBox2.Text & "</sender><msgtext>" & TbMessage.Text & "</msgtext></message><recipients><gsm>" & TextBox3.Text & "</gsm></recipients></SMS>" Dim xml1 As String = "<SMS><authentification><username>youremail@yahoo.co.uk</username><password>yourpass</password></authentification><message><sender>" & sender & "</sender><msgtext>" & message & "</msgtext><flash>1</flash><sendtime></sendtime><listname></listname></message><recipients><gsm messageId=" & genid & ">" & destination & "</gsm></recipients></SMS>" & ""
Dim url As String = "http://www.codebasetechnologies.com/tools/xml/Sms.php" Dim request As WebRequest = WebRequest.Create(url)
request.Method = "Post"
request.ContentType = "text/xml"
'The encoding might have to be chaged based on requirement
Dim encoder As New UTF8Encoding()
Dim data() As Byte = encoder.GetBytes(xml1) 'postbody is plain string of xml
request.ContentLength = data.Length request.Timeout = 6000000 Dim reqStream As Stream = request.GetRequestStream()
reqStream.Write(data, 0, data.Length)
reqStream.Close()
Dim response As System.Net.WebResponse = request.GetResponse()
Dim reader As New System.IO.StreamReader(response.GetResponseStream())
Dim str As String = reader.ReadToEnd() 'Label1.Text = "Message sent" response.Close() Return str
'record the sms into the database. Note you may omit this or implement it own way 'Try ' Dim count As Integer = Nothing
' Dim y As New SMSStatisticsTableAdapter ' y.Insert(count, False, Membership.GetUser.UserName, DateTime.Now, message) 'Catch ex As Exception ' 'response.write("message sent but not saved into the system" & ex.Message) 'End Try
End Function
Private Function GetUniqueCode() As String
'Dim allChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" Dim allChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" Dim GotUniqueCode As Boolean = False Dim uniqueCode As String = ""
'While Not GotUniqueCode
Dim str As New System.Text.StringBuilder
For i As Byte = 1 To 10 'length of req key Dim xx As Integer Randomize() xx = CInt(Rnd() * (Len(allChars) - 1)) 'number of rawchars str.Append(allChars.Trim.Chars(xx)) Next
' IsUniqueCode check that the unique value is not already in the database uniqueCode = str.ToString Return uniqueCode End Function End Class
|
Programming › Re: Fingerprint Programming In ASP.NET by Bros1: 7:50pm On Sep 12, 2011 |
Excelentj, I can help you out. I have implemented an ASP.net portal for an organisation and biometric was a core feature in it. I have also implemented a browser based Point of Sales using ASP.net and biomteric integration and an Biometric Attendance solution for a campus using ASP.net, fingerprint SDK and fingerprint scanners. I will help out with some of the source code( i believe dat you are good at javascript and ActiveX too). If you need more assistance, call me on 08035133522 (Office hours only). Thanks <%@ Page Language="VB" AutoEventWireup="false" CodeFile="PointOfSale.aspx.vb" Inherits="PointOfSale" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <style type="text/css"> .multiPage { float:left; border:1px solid #94A7B5; border-left-color:#008080; border-left-style:groove; background-color: #008080; padding:4px; padding-left:0; width:830px; margin-left:-1px; height:700px; } .multiPage div { border:1px solid #008080; border-left:0; background-color:#E3F40B; } .multiPage img { cursor:no-drop; } #Button2 { height: 53px; width: 199px; } .style1 { height: 28px; } .style2 { font-size: medium; color: #00CCFF; font-weight: bold; } .style3 { font-size: x-large; color: #CCFF33; } .style4 { font-size: x-large; color: #008080; } </style> <title>Logiss TuckShop: Point Of Sales</title> <telerik:RadCodeBlock ID="r1" runat="server"> <script type="text/javascript"> function OnClientSelectedIndexChangedDD(sender, eventArgs) { var item = eventArgs.get_item(); //var combo = item.get_comboBox(); var theValue = document.getElementById('HF3'); }
function OnClientItemsRequesting(sender, eventArgs) { var context = eventArgs.get_context(); context["FilterString"] = eventArgs.get_text(); }
function addRowToTable() {
// get the radcombo text and value(price) var combo = $find("<%= RcbItem.ClientID %>" ; //var combo = document.getElementById('RcbItem'); var itemName = combo.get_text(); var uP = combo.get_value(); var unitPrice = uP.substring(11); // set focus back var input = combo.get_inputDomElement(); input.focus(); combo.set_text("" ; // add a new row var tbl = document.getElementById('dataTable'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow; var row = tbl.insertRow(lastRow);
// left cell
var cellRight = row.insertCell(0); var el = document.createElement('input'); el.type = 'checkbox'; //el.setAttribute('onselect', 'deleteRow()'); cellRight.appendChild(el);
// Item name column var cellName = row.insertCell(1); cellName.innerHTML = itemName;
// Unit price column var cellPrice = row.insertCell(2); cellPrice.innerHTML = unitPrice; // Quantity column var cellQ = row.insertCell(3); var quantity = $find("<%= rntbQauntity.ClientID %>" ; var q = quantity.get_value(); cellQ.innerHTML = q;
// subtotal column var cellSub = row.insertCell(4); cellSub.innerHTML = q * unitPrice;
// remove column var cellDelete = row.insertCell(5); var buttonnode = document.createElement('input'); buttonnode.setAttribute('type', 'button'); //buttonnode.setAttribute('name', 'sal'); buttonnode.setAttribute('value', 'Remove item'); //buttonnode.setAttribute("onClick", 'deleteRow()') //buttonnode.attachEvent('onclick', 'deleteRow'); buttonnode.onclick = function () { var i = this.parentNode.parentNode.rowIndex; document.getElementById('dataTable').deleteRow(i); GrandTotal(); }; cellDelete.appendChild(buttonnode); GrandTotal(); //guard against misspell items if (unitPrice == 0) { var table1 = document.getElementById('dataTable'); var rowCount = table1.rows.length; table1.deleteRow(rowCount - 1); alert('Item not allowed'); }
}
function deleteRow() { try { var table = document.getElementById('dataTable'); var rowCount = table.rows.length;
for (var i = 0; i < rowCount; i++) { var row = table.rows[i]; var chkbox = row.cells[5].childNodes[0]; if (null != chkbox && true == chkbox.checked) { if (rowCount <= 1) { alert("Cannot delete all the header rows" ; break; } table.deleteRow(i); rowCount--; i--; }
} } catch (e) { alert(e); } GrandTotal(); }
function GrandTotal() { var table = document.getElementById('dataTable'); var rowCount = table.rows.length; var sum = 0 // var newrow = table.insertRow(rowCount); // reference the all subtotal cells for (var i = 1; i < rowCount; i++) { var drow = table.rows[i]; sum = sum + parseFloat(drow.cells[4].innerHTML); } var total = document.getElementById('total'); total.innerHTML = 'N' + sum; //var cellSum = newrow.insertCell(0); //cellSum.innerHTML = sum; }
function CreateText() { var minsize = 10; var maxsize = 15; var startvalid = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789'; var validchars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789'; var actualsize = Math.floor(Math.random() * (maxsize - minsize + 1)) + minsize; var guid = startvalid.charAt(Math.floor(Math.random() * startvalid.length)); for (count = 1; count < actualsize; count++) guid += validchars.charAt(Math.floor(Math.random() * validchars.length)); return guid; }
function PostOrder() { var table = document.getElementById('dataTable'); //generate UID to serve as Order identifier var guid = CreateText();
// Obtain the staff or student identity var xx = document.getElementById('lbStaff'); var aa = document.getElementById('lbStaffName'); var bb = document.getElementById('lbAdmission'); var cc = document.getElementById('lbStudentName'); var dd = document.getElementById('lbBalance'); // var person = null;
if (xx.innerHTML == "" && bb.innerHTML == "" { //public is buying person = "Anonymous"; } else if (xx.innerHTML == '' && !(bb.innerHTML == '')) { // student is buying person = cc.innerHTML + " : " + bb.innerHTML; } else if (bb.innerHTML == '' && !(xx.innerHTML == '')) { //staff is buying person = aa.innerHTML + ' ' + "#" + xx.innerHTML; } else { person = "ERROR"; }
for (var i = 1, row; row = table.rows[i]; i++) { //iterate through rows //rows would be accessed using the "row" variable assigned in the for loop var name = row.cells[1].innerHTML; var price = row.cells[2].innerHTML; var quantity = row.cells[3].innerHTML;
//call the webservice Items.RecordSales(guid, name, price, quantity, person, Callback);
//for (var j = 0, col; col = row.cells[j]; j++) { // the above will iterate through columns //columns would be accessed using the "col" variable assigned in the for loop // } } // reset the staff name and label to empty values
bb.innerHTML = ' '; aa.innerHTML = ' '; xx.innerHTML = ' '; cc.innerHTML = ' '; dd.innerHTML = ' '; // ****** Note this prevent incomplete receipt printing ****** setTimeout("__doPostBack('BtHid', '')", 3000); }
function Callback(result) { var outDiv = document.getElementById("record" ; outDiv.innerHTML = result; } </script> </telerik:RadCodeBlock> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="~/SERVICES/Items.asmx" /> </Services> </telerik:RadScriptManager> <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="Scrollbars" runat="server" /> <p class="style2"> <span class="style3"> </span><span class="style4"> Logiss Tuckshop Point Of Sale</span></p> <telerik:RadTabStrip ID="RadTabStrip1" MultiPageID="RadMultiPage1" Orientation="VerticalLeft" style="float:left; width:150px;" runat="server" SelectedIndex="0"> <Tabs> <telerik:RadTab runat="server" Selected="True" Text="Root RadTab1"> <TabTemplate> <img src=", /Img/tuck%20pic/ibu%20owo!.jpg" width="150px" Height="140px" /> </TabTemplate> </telerik:RadTab> <telerik:RadTab runat="server" Text="Root RadTab2" > <TabTemplate> <img src=", /Img/tuck%20pic/8.jpg" width="150px" Height="140px" /> </TabTemplate> </telerik:RadTab> <telerik:RadTab runat="server" Text="Root RadTab3" > <TabTemplate> <img src=", /Img/tuck%20pic/Atmbag%20.jpg" width="150px" Height="140px"/> </TabTemplate> </telerik:RadTab> <telerik:RadTab runat="server" Text="Root RadTab4"> <TabTemplate> <img src=", /Img/tuck%20pic/4.jpg" width="150px" Height="140px"/> </TabTemplate> </telerik:RadTab> <telerik:RadTab runat="server" Text="Root RadTab5"> <TabTemplate> <img src=", /IMG/tuck pic/clip .jpg" width="150px" Height="140px"/> </TabTemplate> </telerik:RadTab> </Tabs> </telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" CssClass="multiPage" runat="server" SelectedIndex="0"> <telerik:RadPageView ID="RadPageView1" runat="server"> <div>
<asp:HiddenField ID="HF3" ClientIDMode="Static" Value="1" runat="server" /> <telerik:RadComboBox ID="RadComboBox1" AutoPostBack="true" Width="200px" Runat="server"> <Items> <telerik:RadComboBoxItem runat="server" Text="JSS1" Value="1" Selected="true" /> <telerik:RadComboBoxItem runat="server" Text="JSS2" Value="2" /> <telerik:RadComboBoxItem runat="server" Text="JSS3" Value="3" /> <telerik:RadComboBoxItem runat="server" Text="SSS1" Value="4" /> <telerik:RadComboBoxItem runat="server" Text="SSS2" Value="5" /> <telerik:RadComboBoxItem runat="server" Text="SSS3" Value="6" /> </Items> </telerik:RadComboBox> <asp:Button ID="Button1" runat="server" OnClientClick="fnCapture()" Text="Get Student" /> <asp:Button ID="BtStaff" runat="server" OnClientClick="fnCapture2()" Text="Get Staff" />
<telerik:RadComboBox ID="RcbItem" runat="server" DropDownWidth="500px" EnableItemCaching="true" EnableLoadOnDemand="True" Filter="Contains" MarkFirstMatch="true" OnClientItemsRequesting="OnClientItemsRequesting" Width="500px" AccessKey="T" AllowCustomText="false"> <WebServiceSettings Method="GetProducts" Path="~/services/Items.asmx" /> </telerik:RadComboBox>
<telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="RadXmlHttpPanel1_ServiceRequest" Value=""> <asp:Label ID="lbAdmission" runat="server" style="font-size:xx-large;" Text="" />
<asp:Label ID="lbStudentName" runat="server" style="font-size:xx-large;" Text="" />
<asp:Label ID="lbBalance" runat="server" style="font-size:xx-large;" Text="" /> </telerik:RadXmlHttpPanel> <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel2" runat="server" OnServiceRequest="RadXmlHttpPanel2_ServiceRequest" Value=""> <asp:Label ID="lbStaff" runat="server" style="font-size:xx-large;" Text="" />
<asp:Label ID="lbStaffName" runat="server" style="font-size:xx-large;" Text="" /> </telerik:RadXmlHttpPanel>
Quantity <telerik:RadNumericTextBox ID="rntbQauntity" runat="server" Font-Size="2.5em" MaxValue="10000" MinValue="0" NumberFormat-DecimalDigits="0" ShowSpinButtons="false" Value="1"> </telerik:RadNumericTextBox> <input type="button" id="btAdd" value="Add item" onclick="addRowToTable()" />
<div style="width:100%; border-style: groove; border-collapse:collapse;"> <table ID="dataTable" runat="server" align="center" border="1" style="width: 100%;"> <tr> <td class="style1"> <input type="checkbox" name="chk" /> </td> <td class="style1"> Item name </td> <td class="style1"> Unit Price </td> <td class="style1"> Quantity </td> <td class="style1"> SubTotal </td> <td class="style1"> Remove </td> </tr> </table> <span id="total" style="float:right; padding-right:100px; font-size:x-large;"> </span> </div>
<%-- <asp:Button ID="BtRecord" Font-Size="X-Large" runat="server" OnClientClick="PostOrder();" Text="Record Sales" />--%> <input type="button" id="Button2" style="font-size:x-large;" value="Record" onclick="PostOrder()" /> <div id="record"></div> <telerik:ReportViewer ID="ReportViewer1" runat="server" style="display:none;" Resources-ProcessingReportMessage="Generating receipt, " /> </div> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView2" runat="server"> Returned Items <p>You can</p> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView3" runat="server"> Replacement </telerik:RadPageView> <telerik:RadPageView ID="RadPageView4" runat="server"> Sales Reports
<asp:Button ID="btShowSales" runat="server" Text="Show daily sales" />
<telerik:RadGrid ID="rgSales" runat="server"> </telerik:RadGrid> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView5" runat="server"> Utilities </telerik:RadPageView> </telerik:RadMultiPage>
<asp:Button ID="BtHid" runat="server" onclick="BtHid_Click" Text="Hidden" ClientIDMode="Static" style="display:none;" /> <object id="objSecuBSP" style="left: 0px; top: 0px" height="0" width="0" classid="CLSID:6283f7ea-608c-11dc-8314-0800200c9a66" name="objSecuBSP" viewastext> </object> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function fnCapture() { var err
try // Exception handling { // Open device. [AUTO_DETECT] // You must open device before capture. DEVICE_FDP02 = 1; DEVICE_FDU02 = 2; DEVICE_FDU03 = 3; DEVICE_FDU04 = 4;
DEVICE_AUTO_DETECT = 255;
document.objSecuBSP.OpenDevice(DEVICE_AUTO_DETECT); err = document.objSecuBSP.ErrorCode; // Get error code
if (err != 0) // Device open failed { alert('Device open failed !'); return; }
// Enroll user's fingerprint. document.objSecuBSP.Capture(); err = document.objSecuBSP.ErrorCode; // Get error code
if (err != 0) // Enroll failed { alert('Capture failed ! Error Number : [' + err + ']'); return; } else // Capture success { // Get text encoded FIR data from SecuBSP module. var k = document.getElementById("HF1" ; var key = k.value; key = document.objSecuBSP.FIRTextData; // alert('Fingerprint Ok'); var xx = document.getElementById('lbStaff'); var aa = document.getElementById('lbStaffName'); var bb = document.getElementById('lbAdmission'); var cc = document.getElementById('lbStudentName'); var dd = document.getElementById('lbBalance'); bb.innerHTML = 'loading student, please wait, '; aa.innerHTML = ' '; xx.innerHTML = ' '; cc.innerHTML = ' '; dd.innerHTML = ' '; // to trigger the xmlhhtpPanel var panel = $find("<%= RadXmlHttpPanel1.ClientID %>" ; panel.set_value(key); }
// Close device. [AUTO_DETECT] document.objSecuBSP.CloseDevice(DEVICE_AUTO_DETECT);
} catch (e) { alert(e.message); }
return; }
function fnCapture2() { var err
try // Exception handling { // Open device. [AUTO_DETECT] // You must open device before capture. DEVICE_FDP02 = 1; DEVICE_FDU02 = 2; DEVICE_FDU03 = 3; DEVICE_FDU04 = 4;
DEVICE_AUTO_DETECT = 255;
document.objSecuBSP.OpenDevice(DEVICE_AUTO_DETECT); err = document.objSecuBSP.ErrorCode; // Get error code
if (err != 0) // Device open failed { alert('Device open failed !'); return; }
// Enroll user's fingerprint. document.objSecuBSP.Capture(); err = document.objSecuBSP.ErrorCode; // Get error code
if (err != 0) // Enroll failed { alert('Capture failed ! Error Number : [' + err + ']'); return; } else // Capture success { // Get text encoded FIR data from SecuBSP module. var k = document.getElementById("HF1" ; var key = k.value; key = document.objSecuBSP.FIRTextData; // alert('Fingerprint Ok'); var xx = document.getElementById('lbStaff'); var aa = document.getElementById('lbStaffName'); var bb = document.getElementById('lbAdmission'); var cc = document.getElementById('lbStudentName'); var dd = document.getElementById('lbBalance'); xx.innerHTML = 'loading staff, please wait, '; aa.innerHTML = ' '; bb.innerHTML = ' '; cc.innerHTML = ' '; dd.innerHTML = ' '; // to trigger the xmlhhtpPanel var panel = $find("<%= RadXmlHttpPanel2.ClientID %>" ; panel.set_value(key);
}
// Close device. [AUTO_DETECT] document.objSecuBSP.CloseDevice(DEVICE_AUTO_DETECT);
} catch (e) { alert(e.message); }
return; }
function getS(sender, args) { var k = $find("<%= HF1.ClientID %>" ; var key = k.value; var panel = $find("<%= RadXmlHttpPanel1.ClientID %>" ; panel.set_value(key); } </script> </telerik:RadScriptBlock> <div id="Output"> <asp:HiddenField ID="HF1" Value="finger" runat="server" /> <asp:HiddenField ID="HF2" ClientIDMode="Static" runat="server" /> </div> </form> </body> </html>
code behind Imports Telerik.Reporting.Data Imports TuckReports
Partial Class PointOfSale Inherits System.Web.UI.Page Protected Sub RadXmlHttpPanel1_ServiceRequest(sender As Object, e As Telerik.Web.UI.RadXmlHttpPanelEventArgs) Dim data As String = e.Value Dim theLevel As Integer = CInt(RadComboBox1.SelectedValue) 'connect the webservice from d portal to retrieve student name Dim x As New portal.getstudent.Tuck Dim y = x.GetStudent(data, theLevel) lbAdmission.Text = y.AdmissionNo lbStudentName.Text = y.StudentName lbBalance.Text = "₦" & y.Balance End Sub
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Request.Form("__EVENTTARGET" = "BtHid" Then 'fire event BtHid_Click(Me, New EventArgs()) End If Button1.Attributes.Add("OnClick", "return false;" BtStaff.Attributes.Add("OnClick", "return false;" 'BtRecord.Attributes.Add("OnClick", "return false;" End Sub
Protected Sub RadXmlHttpPanel2_ServiceRequest(sender As Object, e As Telerik.Web.UI.RadXmlHttpPanelEventArgs) Handles RadXmlHttpPanel2.ServiceRequest Dim data As String = e.Value ' from the client-side 'connect the webservice from d portal to retrieve staff name Dim x As New portal.getstaff.Tuck Dim y = x.GetStaff(data) lbStaff.Text = y.AdmissionNo lbStaffName.Text = y.StudentName End Sub 'Protected Sub BtRecord_Click(sender As Object, e As System.EventArgs) Handles BtRecord.Click ' Dim y As String = CStr(Session("theguid" ) ' ' print report without showing it on screen.
' Dim myreport As Telerik.Reporting.Report = New Receipt2 ' Dim filter1 As New Filter("=Fields.OrderId", FilterOperator.Equal, y) ' myreport.Filters.Add(filter1) ' 'Show receipt ' ReportViewer1.Report = myreport ' ReportViewer1.RefreshReport() ' ' ReportViewer1.Visible = False ' Dim printScript = String.Format("{0}.PrintReport();", Me.ReportViewer1.ClientID) ' Page.ClientScript.RegisterStartupScript(Page.GetType(), "ReportPrint", printScript, True)
'End Sub
Protected Sub BtHid_Click(sender As Object, e As System.EventArgs) Dim y As String = CStr(Session("theguid" ) ' print report without showing it on screen.
Dim myreport As Telerik.Reporting.Report = New Receipt2 Dim filter1 As New Filter("=Fields.OrderId", FilterOperator.Equal, y) myreport.Filters.Add(filter1) 'Show receipt ReportViewer1.Report = myreport ReportViewer1.RefreshReport() ' ReportViewer1.Visible = False Dim printScript = String.Format("{0}.PrintReport();", Me.ReportViewer1.ClientID) Page.ClientScript.RegisterStartupScript(Page.GetType(), "ReportPrint", printScript, True) End Sub End Class
|