Code Examples
  Home arrow Code Examples arrow Page 3 - Creating an Ordering System Using EVB
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Creating an Ordering System Using EVB
By: Vishal Rajpara
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 23
    2004-08-18

    Table of Contents:
  • Creating an Ordering System Using EVB
  • Application Design
  • Module 2 Pocket PC Application Desktop Utility
  • Screen 2, the Main Screen
  • Screen 3, the Customer Information
  • Screen 4, the User Information
  • Application Testing and Deployment

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating an Ordering System Using EVB - Module 2 Pocket PC Application Desktop Utility


    (Page 3 of 7 )

    Module 2 Pocket PC Application Desktop Utility that is used to import or export data from a PDA to a desktop.

    Application Development using EVB

    All Code

    Screen 1  (Login Screen)

    Create an Ordering System Using EVB

    Code:

    ''''' # EVB Code Started # ''''''''''''

    ''''' # Valiable Declaration # '''''''''''''
    Option Explicit
    Dim cn As Connection
    Dim rs As Recordset
    Dim tsql As String

    ''''' # Create Database
    ''''' # Ask Password at time of database creation
    Private Sub btnCreateDatabase_Click()
        Dim ans As String
        ans = InputBox("Please enter password", "Admin login")
        If ans = "grep4u" Then
            Call CreateDatabase
            Exit Sub
        End If
    End Sub

    Private Sub btnExit_Click()
        App.End
    End Sub

    Private Sub btnLogin_Click()
        On Error GoTo 0
        Dim validUser As Boolean

        tsql = "select * from TUsers"
        Set rs = CreateObject("ADOCE.Recordset.3.0")
        rs.Open tsql
        validUser = False

        Do While Not rs.EOF
            If Trim(rs.Fields("UserName").Value) = Trim(txtUserName.Text) Then
                validUser = True
                rs.Close
                Set rs = Nothing
                Exit Do
            End If
            rs.MoveNext
        Loop
       
        If validUser = False Then
            MsgBox "Unable to login." & vbNewLine & "Please verify username and password.", vbCritical, "Login Error"
        Else
            frmAction.lblUsername.Caption = txtUserName.Text
            frmAction.Show
        End If
    txtUserName.Text = ""
    txtPassword.Text = ""

    End Sub

    Private Sub Form_Load()

    End Sub

    Private Sub Form_OKClick()
        App.End
    End Sub

    Private Sub CreateDatabase()

        On Error GoTo 0
        ''''' # Create Database
        Set rs = CreateObject("ADOCE.Recordset.3.0")
        rs.Open "CREATE DATABASE 'Medisoft.cdb'"

    ''''' # create table
        Set rs = CreateObject("ADOCE.Recordset.3.0")
        tsql = "create table TUsers ( UserName varchar(20),Password varchar(20) )"
        rs.Open tsql

        tsql = "create table Patient_Master ( PName varchar(20),PhoneNo varchar(20),Address varchar(100) )"
        rs.Open tsql
       
        tsql = "create table Patient_Tran ( T_id integer,T_Date DateTime,PName varchar(20),T_Delivery Bit,T_Collection Bit, Qty Integer, TankType varchar(20),UserName varchar(20) )"
        rs.Open tsql
    ''''' # insert Users data
    '**************************
    'Don't remove otherwise you will not be able access entire software
    '**************************
        tsql = "insert into TUsers(UserName,Password) values('Admin','admin')"
        rs.Open tsql
    'insert patient data
        tsql = "insert into Patient_Master(PName,PhoneNo,Address) values ('Pankaj Joshi','9820747561','c-5-7 3,3 sector 1-a cbd belapur')"
        rs.Open tsql
    'insert transaction data
        tsql = "insert into Patient_Tran(T_id,T_Date,PName,T_Delivery ,T_Collection , Qty,TankType,UserName) values (1,#1-1-2004#,'Pankaj Joshi',1,0,2,'3M6','Admin')"
        rs.Open tsql
    'rs.Close
        Set rs = Nothing
    End Sub

    More Code Examples Articles
    More By Vishal Rajpara


       · u all suck
       · I was looking for a tutorial about creating applications for pocket pc. you really...
       · madarchod ...ask ur mom...and yes ur a failure that happened in a taxi cab..god rest...
     

    CODE EXAMPLES ARTICLES

    - Handling Animations and Bitmaps Using GDI+ f...
    - Download a Web Page using the WebClient
    - Creating a Chart using Data from a Database ...
    - The Basics of Charting with the MS Chart Con...
    - Searching Body Text with textRange: Enter th...
    - Searching Body Text with textRange: Building...
    - Searching Body Text with textRange, part 1: ...
    - First Steps in Programming
    - Programming in C
    - Quick Introduction to ASF,ASX, and Networkin...
    - SatView: Pointer Perfect, Part 2: Constructi...
    - SatView: Pointer Perfect, Part 1
    - Style Case Studies: Construction Unions
    - Creating an Engine for Games for Windows
    - Style Case Studies: Generic Callbacks

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT