Académique Documents
Professionnel Documents
Culture Documents
NET INVENTORY
MANAGEMENT
SYSTEM
MANAGEMENT
SYSTEM
Undertaken at
PI SOFTEK LTD.
NOIDA
PROJECT REPORT
And
My father
Sri. Jitendra Pandey
Contents at a
Contents glance
Contents at a Glance
Preface………………………………………………………………………………………........
Acknowledgements………………………………………………………………………………
Certificate (By the Director)……………………………………………………………………...
Certificate (By the Team Leader)…………………………………………………………………
Certificate (By the Supervisor)……………………………………………………………………
Declaration……………………………………………………………………………………….
Section 1: Introduction
1.1. Company Profile……………………………………………………………………………
1.2. Product Synopsis………………………………………………………………………........
1.2.1. Purpose & Scope………………………………………………………………….
1.2.2. Product Description……………………………………………………………….
1.3. Benefits of the System……………………………………………………………………….
Section 5: Conclusion
5.1. Scope of Enhancement………………………………………………………………………
5.2. User Feed Back………………………………………………………………………………
5.3. Conclusion…………………………………………………………………………………...
Section 6: Bibliography
Preface
With the advent of various programming technologies and their broad support toward
a lot of stuffs, our needs have escalated over the years, making computers and similar automatic
devices our friend, relative, and teacher and guides many times. The need for integrating our daily
use devices to these machines has become more and more important. Finding the various fields
of application for the use of these revolutionary machines is not a new era of research, but even
now it has much potential to attract the programmers for making it more functional for
simplifying their daily life tasks.
It was very much expected that there will one day when every will have computer not on
his desk but on his hands, but it was difficult to imagine that it would be so early. Just about
thirty years ago and computers were of the size of a whole room or bigger and now, Laptops,
Notebook computers are gong to be essentials in just a few days. I am using the word essential
which would seem hyper to you but be sure it is going to happen because who has thought that
one day the computer will be in every fifth home in all the major cities then in next the time is
for the Laptops, Notebook computers and PDAs.
When talking about the suitability and flexibility of moving along with data, then we
have to compromise with the size and power requirements. In fact, there is nothing like some
sort of competition between the computers and these so popular handheld devices, each one has
its own necessity. As the experts say, after sometimes it will be very obvious to have larger and
stronger machines in the office and the handheld devices with the executives (as it is the case
with the company in which I am working). Now, those executives should be facilitated with the
software/hardware means to transfer and update their data from the big machines in office as
easy as possible. Major software technologies are providing the means to make this type of
transfer possible and descent approaches towards this era of application is the necessity of time.
My project is just a little attempt in this direction.
The application may be not fulfilling all the need of the hungry industry and technology
but it may be said an attempt to make an effort toward simplifying the business needs with using
the assistance of technology with its efficient use.
The next targets are to make the same feasible with now popular technology like
Bluetooth. After which, there will be no need to put the PDA down on any tray near the
computer and the same targets could be achievable wirelessly. I was unable to do that stuff
because of the lack of time and resources right now.
I hope you will appreciate the efforts and forgot the errors and inefficiency that it may
have as just an educational project it is. Also, it was hard to manage the efficiency and cost.
Acknowledgements
The project as it stands today is the sincere contributions of a few spirited individuals
and the help of some of my friends. I take this opportunity to express my sincere gratitude to Mr.
Mr. Pankaj Sharma, Director of P. I. Softek Ltd, Mr. Arvind Sharma & Mr. Kiran Pandit,
HR Managers for their valuable suggestion, constant encouragement, silent support &
unwavering confidence, without which this project would not have been possible. It was they
who motivated for this cause (to do something entirely new) and always was present with their
expert guidance and disciplined ideas.
I am sincerely indebted to my mentor Mr. Arnab Chaudhary for his outstanding and
undeniable considerations. I also thank my team members and all the staff members for giving
me a congenial environment to work in.
I would also like to thank all my friends who have bore with me during this project, apart
from that, those who have helped up in some way or the other. Last but not the least I would like
to extend my heartfelt thanks to my parent, who were with me when I was some expensive about
the project. Their help and encouragement also proved to be a handful.
This is to certify that Mr. Ram Kinkar Pandey, a student of M.Sc. IT in Allahabad
Agriculture Institute – Deemed University, Allahabad, has successfully undertaken
this project on ‘IRSPDA.NET Inventory Management System’ for the partial fulfillment of
his master degree.
This project which will be taken as the final-project for his master degree in Computer
Science embodies the bona fide work done by him under the guidance of P. I. Softek Ltd,
Noida from 08th February 2005 to 31st March 2005.
His performance and general behavior during the training period was excellent and descent.
According to my best knowledge, this work has not been submitted to any other Institute / University
for award of any other degree by him or any other else.
This is to certify that Mr. Ram Kinkar Pandey, a student of M.Sc. IT in Allahabad
Agriculture Institute – Deemed University, Allahabad, Enrollment No: I-
2041050065 has successfully undertaken this project on ‘IRSPDA.NET Inventory
Management System’ for the partial fulfillment of his master degree.
This project which will be taken as the final-project for his master degree in Computer
Science embodies the bona fide work done by him under the guidance of P. I. Softek Ltd,
Noida from 08th February 2005 to 31st March 2005.
His performance and general behavior during the training period was excellent and
descent. According to my best knowledge, this work and the matter embodied in this project has
not been submitted to any other Institute / University for award of any other degree/ any course
of study by him or any other else.
This application has been developed for Palm Handheld with front-end as VB.NET and
Crossfire 5.0 and back-end as PDB (Palm database files).
I wish his all the success in future and a definite bright future.
In This Section
√ Company Profile
√ Product Synopsis
√ Benefits of the System
Company profile
PI Softek LTD. is a global software services company providing custom technology
solutions. Combining proven expertise in technology, and an understanding of emerging business
domains, they deliver a range of services that include e-business solutions, strategic consulting,
maintenance, and product development. Its aim is to offer rapid delivery of innovative, business
applications with emphasis on high quality and cost-effectiveness. At each stage of the
development process it’s emphasis is to deliver quality and rich user experience.
This company offers wide range of services like IT Strategic Consultancy, Software
Maintenance, Offshore Development, Customized Software Development and Product
Engineering. It offers rapid delivery of innovative, business solutions by working with best-in-
class employee and emphasis on high quality, cost-effectiveness and On-Time Delivery. Its focus
is to take care of each area of development process ranging from requirement Analysis and
Specification to implementation. At each stage of the development cycle company’s emphasis is
to deliver quality and rich user experience.
Its primary areas of expertise are .NET, Desktop applications, PDA based application, e-
Solutions ranging from Web based business application to Portals and Client Server applications.
It follows rapid development methodologies and component-based frameworks and use UML
CASE tools for requirement, analysis and designing. Microsoft Project is being used for
scheduling and estimation.
Quality in their product is ensured by their QA team by using automated QA tools like
Visual Test for testing and Relationship 99 and Microsoft ATS for tracking defects. In order to
keep everyone updated, feedback to developers and customers are done on a regular basis.
Company specializes in e-Solutions and wireless technologies. They are well versed with
latest emerging technology .net (C#, VB.net, ADO.net, ASP.net) and have developed some
sophisticated applications using it; which supports multiple language, multiple database support,
role based security, custom controls etc. Their other expertise includes Rational Rose, COM+,
XML, XSL, ASP, JAVA, Satellite Forms, VB, VC++, Crystal Reports, Active Reports, Microsoft
Project, Visio. In all of their products they have used n-tier windows DNA architecture and they
support multiple Data sources like SQL Server, Microsoft Access and Oracle.
The other information regarding the company may also be collected through the company’s
website named www.pisoftek.com and for correspondence, you may go through the following
addresses:
USA INDIA
Priya International Limited. PI Softek Limited.
95, Houghton Lane B-4, Sector-59, Noida(U.P.) Pin 201307
Boxborough, MA01719 USA Phone: 91 - 120 - 2588846/47
Phone: 978 - 263 - 7318 Phone: 91 - 120 - 2582594
Fax: 978 - 263 - 4389 Fax: 91 - 120 - 2582614
piltd@piltd.com info@pisoftek.com
Product Synopsis
When ever you start to make/ launch a product, there are some specific questions that are
needed to be asked and answered as well. For example: -
For which environment/ people, the product is intended to? Means the scope …
A short description of the project to show others what are you doing …
The scope of the product is of course the large scale companies, for which there are a
large customer base and a high reputation. The executives need to be with the clients more and
more and can’t wait for the inventory management staff for giving them the latest inventory
information. One thing is very famous is the corporate world, if you need quick and reliable
response then make the things automated. That’s what our product is doing.
Short description: -
The product was developed in an emulator environment of 8 MB memory and tested in
a 16 MB memory. Treo 650 is a very costly device and so I was unable to move up for the higher
memory devices. The product is not only taking care of data entry phases but also taking care of
notifying its owner the current position of the particular stock when he is gong to take any
decision related to that [particular stock. This facilitates the executives a smart inventory
consultant in his hand, showing them the related information of inventory before making any
decision, because the large and reputed companies cannot take risk of taking back their decisions.
Benefits of the System
Inventory; the backbone of any business organization; Invoices, purchase orders, stock
entries and a lot of old paper work. Is there is some way out? This inventory assistant gives you
the ability to take inventory counts or walk around stock locations and enter purchase order
directly into your off the self handheld device. These can be finally uploaded to the desktop and
transferred to your central server database.
After inputting information into their PDA, retail staff simply places it in the
synchronization cradle to send inventory information to the store controller PC, which then
relays up to minute data to Corporate Headquarters via modem. This reduces administrative
paperwork, eliminate the costs of employee time and office supplies, and reduces mistakes due to
human errors. All of this leads to increased accuracy in inventory management. It helps staff over
and under stocking, identifying goods for discounting and generally move inventory more
quickly.
With easy to use full-localized interface, my system is quick to learn and simple to
operate. As about the benefits of this system, then it could be visualize very easily.
The employees can dramatically improve in-store inventory control. The system not only
improves efficiency in ordering and stock inspection but also streamline the full product
management process, including purchasing, selling, stocking, self price audits and price checks,
re-ticketing, discontinuance and customer enquiry. That’s why it is a totally merchandise solution.
The PDA is going to be very popular with store employees. It has reduced the time they
spend managing inventory and freed them from the checkout so they can get out into the store
and spend more time with the customers. In any retail environment, customers who get personal
service become return customers and drive the business forward.
System
Section 2 development tools
In this section
√ VB .Net Language
√ Crossfire 5.0 Language
VB. Net Language
Visual Basic .NET, the next generation of Visual Basic, is designed to be the easiest and most
productive tool for creating .NET applications, including Windows applications, Web Services,
and Web applications. While providing the traditional ease-of-use of Visual Basic development,
Visual Basic .NET also allows optional use of new language features. Inheritance, method
overloading, structured exception handling, and free threading all make Visual Basic a powerful
object-oriented programming language.
Visual Basic .NET fully integrates with the .NET Framework and the Common
Language Runtime, which together provide language interoperability, simplified deployment,
enhanced security, and improved versioning support.
Visual Basic .NET has many new and improved features that make it a powerful object-
oriented programming language, including inheritance, interfaces, and overloading. Other new
language features include free threading and structured exception handling. Visual Basic .NET
also fully integrates the .NET Framework and the Common Language Runtime, which provide
language interoperability, garbage collection, enhanced security, and improved versioning
support.
A number of languages are in the market; Microsoft Visual Basic was cool too, and still
then they call it a new language not just an extension of Visual Basic. Why?
Visual Basic .NET has many new and improved language features such as inheritance, interfaces,
and overloading that make it a powerful object-oriented programming language. As a Visual
Basic developer, you can now create multithreaded, scalable applications using explicit
multithreading. Other new language features in Visual Basic .NET include structured exception
handling, custom attributes, and common language specification (CLS) compliance.
The CLS is a set of rules that standardizes such things as data types and how objects are
exposed and interoperate. Visual Basic .NET adds several features that take advantage of the
CLS. Any CLS-compliant language can use the classes, objects, and components you create in
Visual Basic .NET. And you, as a Visual Basic user, can access classes, components, and objects
from other CLS-compliant programming languages without worrying about language-specific
differences such as data types. CLS features used by Visual Basic .NET programs include
assemblies, namespaces, and attributes.
Visual Basic .NET supports many new or improved object-oriented language features
such as inheritance, overloading, the Overrides keyword, interfaces, shared members, and
constructors. Also included are structured exception handling, delegates, and several new data
types.
What's New in Visual Basic .NET 2003?
Visual Basic .NET 2003 has added functionality that simplifies bit manipulation and loop
variable declaration.
Bit Shift Operators: Visual Basic .NET now supports arithmetic left and right shift
operations on integral data types (Byte, Short, Integer, and Long). Arithmetic shifts are
not circular, which means the bits shifted off one end of the result are not reintroduced
at the other end. The corresponding assignment operators are provided as well.
Loop Variable Declaration: Visual Basic .NET now allows you to declare a loop
variable as part of a For or For Each loop. You can include an As clause for the variable
in the For or For Each statement, provided no variable of that name has been declared
outside the loop. The scope of a loop variable declared in this manner is the loop itself.
Inheritance: Visual Basic .NET supports inheritance by allowing you to define classes
that serve as the basis for derived classes. Derived classes inherit and can extend the
properties and methods of the base class. They can also override inherited methods with
new implementations. All classes created with Visual Basic .NET are inheritable by
default. Because the forms you design are really classes, you can use inheritance to define
new forms based on existing ones.
Exception Handling: Visual Basic .NET supports structured exception handling, using
an enhanced version of the Try...Catch...Finally syntax supported by other languages
such as C++. Structured exception handling combines a modern control structure
(similar to Select Case or While) with exceptions, protected blocks of code, and filters.
Structured exception handling makes it easy to create and maintain programs with
robust, comprehensive error handlers.
Overriding Properties and Methods: The Overrides keyword allows derived objects
to override characteristics inherited from parent objects. Overridden members have the
same arguments as the members inherited from the base class, but different
implementations. A member's new implementation can call the original implementation
in the parent class by preceding the member name with MyBase.
Data Types: Visual Basic .NET introduces three new data types. The Char data type is
an unsigned 16-bit quantity used to store Unicode characters. It is equivalent to the
.NET Framework System. Char data type. The Short data type, a signed 16-bit integer,
was named Integer in earlier versions of Visual Basic. The Decimal data type is a 96-bit
signed integer scaled by a variable power of 10. In earlier versions of Visual Basic, it was
available only within a Variant.
Interfaces: Interfaces describe the properties and methods of classes, but unlike classes,
do not provide implementations. The Interface statement allows you to declare
interfaces, while the Implements statement lets you write code that puts the items
described in the interface into practice.
Delegates: Delegates — objects that can call the methods of objects on your behalf —
are sometimes described as type-safe, object-oriented function pointers. You can use
delegates to let procedures specify an event handler method that runs when an event
occurs. You can also use delegates with multithreaded applications.
Shared Members: Shared members are properties, procedures, and fields that are
shared by all instances of a class. Shared data members are useful when multiple objects
need to use information that is common to all. Shared class methods can be used
without first creating an object from a class.
References: References allow you to use objects defined in other assemblies. In Visual
Basic .NET, references point to assemblies instead of type libraries.
Assemblies: Assemblies replace and extend the capabilities of type libraries by,
describing all the required files for a particular component or application. An assembly
can contain one or more namespaces.
Multithreading: Visual Basic .NET allows you to write applications that can perform
multiple tasks independently. A task that has the potential of holding up other tasks can
execute on a separate thread, a process known as multithreading. By causing complicated
tasks to run on threads that are separate from your user interface, multithreading makes
your applications more responsive to user input.
Crossfire 5.0 Language
Many of us may have experience of programming a desktop application, but applications
written for devices like Palm powered ones, are a bit different from those of the regular desktop
application. Not only this, but it also differs in the way the users interact with the application. Let
me point out some of the major differences as are listed below:
1. Screen Size
2. Quick turn around expected
3. PC Connectivity
4. Input methods
5. Power
6. Memory
7. File System
8. Backward Compatibility
Now, so these were the differences. We have many languages that are being used for the
desktop application, but as about such limitations, we have to think about a specialist. Such a way
was MobileVB previously and now the present one AppForge Crossfire 5.0. I am not going in
much detail of the MobileVB (as it is still new for many of you viewers) and not much of that
how Crossfire takes care of the above limitations.
AppForge Crossfire software offers the fastest way to create applications for mobile
computers, phones, bar code scanners, and other devices running Palm OS®, Microsoft®
Pocket PC, or Symbian OS. Our software integrates into Microsoft® Visual Studio® .NET to
give you the power to turn your ideas into finished products in record time.
With Crossfire, you can develop, run and test mobile and wireless applications in Visual
Basic .NET or C#. The controls that you use to create mobile programs will work both on a
mobile device and under Windows. This means that, as a developer, you don’t need to have a
wireless device to test and develop an application – you simply run the application from within
Visual Studio .NET, saving hours of development time.
Now, the simple question is that how this whole thing works and to do for making an
Palm OS® (or any Palm Based application), means How AppForge Crossfire works? The
following are the steps for doing the stuff….
1. Install it - Load Crossfire software on a PC and you are ready to start developing
handheld applications. The next time you launch Visual Studio .NET, a new "AppForge" menu
appears in the main menu bar.
2. Write it - Use the Visual Basic .NET or C# language from within Visual Studio .NET
to create the application. First, use the Crossfire project template to open a new project and
display the AppForge toolbar. Next, use the controls to build the interface. Finally, write Visual
Basic .NET code to make the application functional.
3. Compile it - To test, simply choose the standard Run menu option in Visual Studio
.NET. The application compiles in Windows, so you can accurately test and evaluate it without
leaving the Visual Studio IDE.
4. Upload it - After completing the application, choose Deploy to Device in the
AppForge menu and transfer the application to a handheld device with Crossfire Client installed.
5. Run it - The project runs the same whether in Palm OS®, Pocket PC, or Symbian
OS.
Now, the following is the description of Crossfire 5.0 features as available on the
AppForge’s website. It contains all the low level descriptions and comparisons.
Standard Features
Data Features
Palm OS Only Features
Nokia Series 60 Only Features
Nokia 9300/9500 Only Features
Standard Features
Textbox, List box, Combo box, Label, Grid, Button,
Basic Ingots
Checkbox, Radio button, Graphic Button, Graphic, X X X X X
(Controls)
Shape, Filmstrip, Tone, Timer
Up Down A scrollbar with only arrows and no shaft. X X X X X
Time Picker Input mechanism for times. X X X X X
Date Picker Input mechanism for dates. X X X X X
Paints text, graphics, and shapes, with multiple fonts and
Owner Draw Grid X X X X X
colors into a grid.
Scrollbars Can be used to create custom scrolling actions. X X X X X
Slider Input or output data on a predetermined scale. X X X X X
Plays movies converted from .AVI to AppForge (.RMV)
Movie X X X X X
format.
Widget Provides a blank canvas that receives all events. X X X X X
Visual Basic AppForge supports most common Visual Basic
X X X X X
Functions functions.
Format Functions Support for native Visual Basic Format functions. X X X X X
Floating Point Double Precision floating point operations. X X X X X
z-order Controls can overlap on a form. X X X X X
User-Defined
Full support for Visual Basic user-defined types. X X X X X
Types
Focus Events Includes LostFocus, GotFocus, and Validate Events X X X X X
Numeric Support Byte, Char, Integer, Long, Single, Double, and Currency X X X X X
Control Arrays Groups of controls with same name, type and event X X X X X
Controls
Reference all controls on a form with one procedure call. X X X X X
Collection
DATA FEATURES
In this section
√ Requirement Specification
Requirement Specifications
A different set of requirements as far as this particular project is concerned. As this project is
targeted, to be executed on the PDA, a not very well familiar environment for most of you even
today’s world.
PalmOS
Many other accessories like synchronization cradle, or the application required for
synchronization are not part of requirement specification here, as they are part of standard
accessory set of the device Treo 650. Treo 650 may be considered as an advance device as it also
provide support for Bluetooth transfer as well that is not utilized in my project till now.
I have used VB .Net for the development, but as it is not need specifically for the running of the
product, I am not mentioning it as essential.
Implementation Details
Section 4
In this section
√ VB .Net codes
√ Screen shots
VB .Net Codes
frmLogin.vb
End Sub
End Sub
#End Region
Return True
End Function
objData.MoveToFirstRecord(UsrDBName)
objData.SetSortFields(UsrDBName, 0)
objData.FindRecordByField(objUserRec, Trim(txtUser.Text).PadRight(30, ""), 0,
UsrDBName)
Else
End If
Else
End Select
End Sub
End Class
frmMain.vb
Inherits System.Windows.Forms.Form
End Sub
End Sub
#End Region
End Sub
Me.Hide()
End Sub
End Sub
End Class
frmEqptList.vb
End Sub
End Sub
#End Region
Dim objEqptList As tinventoryRecord ' Inventory db structure obj
BtnEqptAdd.Visible = boolVisible
BtnEqptEdit.Visible = boolVisible
BtnEqptDel.Visible = boolVisible
End Sub
objData.MoveToFirstRecord(InvDBName)
GrdEqptList.Refresh()
FillGrid()
AddHeader()
AddItems()
End Sub
VisibilityButton(False)
GrdEqptList.Cols = CShort(3)
GrdEqptList.set_RowHeight(0, (fGetStringHeight(iFontHandle_DeviceDefault) + 4))
GrdEqptList.set_ColWidth(0, CShort(40))
GrdEqptList.set_ColWidth(1, CShort(40))
GrdEqptList.set_ColWidth(2, CShort(90))
grdEqptHeader.Cols = CShort(3)
grdEqptHeader.set_ColWidth(0, CShort(40))
grdEqptHeader.set_ColWidth(1, CShort(40))
grdEqptHeader.set_ColWidth(2, CShort(90))
VisibilityButton(True)
End Sub
grdEqptHeader.RemoveItem(0)
grdEqptHeader.Refresh()
grdEqptHeader.AddItem("Item#" & Chr(9) & "Asset#" & Chr(9) & " Description")
End Sub
Private Sub AddItems()
Try
Dim strItem As String
iNumRow = 0
iRow = 0
objData.MoveToNextRecord(InvDBName)
End While
GrdEqptList.Refresh()
Catch ex As Exception
Throw ex
End Try
End Sub
e.canvas.Erase()
End Sub
Private Sub GrdEqptList_SelectCell(ByVal sender As Object, ByVal e As System.EventArgs)
Handles GrdEqptList.SelectCell
iSelectedRow = CInt(GrdEqptList.Row)
objData.GoToRecordIndex(iSelectedRow, InvDBName)
End Sub
grdEqptHeader.LeftCol = GrdEqptList.LeftCol
End Sub
End Sub
tmrEqpt.Enabled = False
tmrEqpt.Enabled = True
End Sub
End Sub
'See grdlocHeader_SelectCell for an explanation of this timer.
Private Sub tmrEqpt_TimerEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles tmrEqpt.TimerEvent
objData.GoToRecordIndex(iSelectedRow, InvDBName)
myUID = objData.RecordUniqueID(InvDBName)
SortDatabase()
objData.FindRecordbyID(myUID, InvDBName)
If (bInitialSetup) Then
GrdEqptList.Row = 0
bInitialSetup = False
Else
GrdEqptList.Row = objData.CurrentIndex(InvDBName)
End If
End Sub
e.canvas.Reset()
e.canvas.BrushColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOW)
e.canvas.Erase()
e.canvas.PenColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOWTEXT)
If e.selected Then
e.canvas.DrawText(e.x + 3, e.y + 3, grdEqptHeader.get_TextMatrix(e.row, e.col) & "*")
Else
e.canvas.DrawText(e.x + 3, e.y + 3, grdEqptHeader.get_TextMatrix(e.row, e.col))
End If
End Sub
If g_ItemNo = 0 Then
g_ItemNo = 1
Else
g_ItemNo = g_ItemNo + 1
End If
RemoveItems()
Me.Hide()
Catch ex As Exception
Throw ex
End Try
End Sub
g_objItem.InitializeItemScreen()
LoadForm(g_objItem)
RemoveItems()
Me.Hide()
End Sub
Try
itemp = Trim(GrdEqptList.get_TextMatrix(iSelectedRow, 0))
If (MessageBox.Show("Delete ItemNo: " & itemp & " ?", "Confirmation",
MessageBoxButtons.YesNo) = DialogResult.Yes) Then
g_ItemNo = itemp
objData.FindRecordByField(objEqptList, itemp, 0, InvDBName)
objData.DeleteOneRecord(InvDBName)
GrdEqptList.RemoveItem(GrdEqptList.Row)
GrdEqptList.Row = GrdEqptList.Row - 1
GrdEqptList.Refresh()
End If
Catch ex As Exception
MessageBox.Show("Error Occured While Deleting Record:" + ex.Message, "Information")
End Try
End Sub
Catch ex As Exception
Throw ex
End Try
End Sub
End Class
frmItemDetails.vb
End Sub
End Sub
#End Region
g_objItem.txtAsset.Text = ""
g_objItem.txtComm1.Text = ""
g_objItem.txtComm2.Text = ""
g_objItem.txtComm3.Text = ""
g_objItem.txtComm4.Text = ""
g_objItem.txtComm5.Text = ""
g_objItem.txtComm6.Text = ""
g_objItem.txtCommCode.Text = ""
g_objItem.txtCommDesc.Text = ""
g_objItem.txtCommDesc1.Text = ""
g_objItem.txtCommDesc2.Text = ""
g_objItem.txtCommDesc3.Text = ""
g_objItem.txtCommDesc4.Text = ""
g_objItem.txtCommDesc5.Text = ""
g_objItem.txtCommDesc6.Text = ""
g_objItem.txtItem.Text = ""
End Function
objInv.inv_commvalue4 = txtCommDesc4.Text
If (Len(Trim(objInv.inv_commvalue4)) > 0) Then
objData.EditSingleField(objInv, InvDBName, 7)
End If
objInv.inv_commvalue5 = txtCommDesc5.Text
If (Len(Trim(objInv.inv_commvalue5)) > 0) Then
objData.EditSingleField(objInv, InvDBName, 8)
End If
objInv.inv_commvalue6 = txtCommDesc6.Text
If (Len(Trim(objInv.inv_commvalue6)) > 0) Then
objData.EditSingleField(objInv, InvDBName, 9)
End If
Return True
End Function
Private Function AddBlankRecord() As Boolean
Dim iTemp As Double
objInv.inv_eqpid = CDbl(CInt(g_ItemNo))
If (g_Inventory_mode = "Add") Then
objData.CreateSingleFieldRecord(objInv, InvDBName, 0)
End If
End If
Return True
End Function
Private Sub EditValues()
objInv.inv_asidnumber = txtAsset.Text
objData.EditSingleField(objInv, InvDBName, 2)
objInv.inv_commcode = txtCommCode.Text
objData.EditSingleField(objInv, InvDBName, 3)
End Sub
Private Sub AddCommValues()
objInv.inv_commvalue1 = txtCommDesc1.Text
If (Len(Trim(objInv.inv_commvalue1)) > 0) Then
objData.EditSingleField(objInv, InvDBName, 4)
End If
objInv.inv_commvalue2 = txtCommDesc2.Text
If (Len(Trim(objInv.inv_commvalue2)) > 0) Then
objData.EditSingleField(objInv, InvDBName, 5)
End If
objInv.inv_commvalue3 = txtCommDesc3.Text
If (Len(Trim(objInv.inv_commvalue3)) > 0) Then
objData.EditSingleField(objInv, InvDBName, 6)
End If
End Sub
Return True
End Function
If (AddItemRecord()) Then
'Setting Properties
SetCurrentValues()
If g_objQty Is Nothing Then
g_objQty = New frmQuantity
End If
g_objQty.InitializeQtyScreen()
LoadForm(g_objQty)
Else
MessageBox.Show("Record Not Saved", "Information")
End If
End If
Else
Exit Sub
End If
g_objItem.Close()
g_objItem = Nothing
Catch exc As Exception
MessageBox.Show(exc.Message)
End Try
End Sub
Private Sub ClearMemory()
g_objCommList = Nothing
g_objEqptList = Nothing
End Sub
End Sub
End Sub
End Class
frmQuantity.vb
End Sub
End Sub
#End Region
Dim objInv As tinventoryRecord ' Inventory DB structure
Public Sub InitializeQtyScreen()
Dim dtDate As Date
If g_Inventory_mode = "Add" Then
Me.Text = " New Equipment Maintenance"
'txtDate.Text = Today()
PopulateCurrentData()
ElseIf g_Inventory_mode = "Edit" Then
Me.Text = " Edit Equipment Maintenance"
objData.FindRecordByField(objInv, g_ItemNo, 0, InvDBName)
End If
End Sub
Private Sub SetCurrentValues()
UOM = txtUOM.Text
Quantity = CInt(txtQty.Text)
ShortDescription = txtShortDesc.Text
DateAvail = txtDate.Text
End Sub
Private Sub PopulateCurrentData()
Dim strDate As String
txtUOM.Text = UOM
txtQty.Text = Quantity
txtShortDesc.Text = ShortDescription
strDate = DateAvail
If (strDate = #12:00:00 AM#) Then
strDate = Date.Today
End If
txtDate.Text = strDate
End Sub
Private Function EmptyMat_Fields()
g_objMat.txtDwags.Text = ""
g_objMat.txtMatConstruct.Text = ""
g_objMat.txtScopeRef.Text = ""
g_objMat.txtSpareParts.Text = ""
g_objMat.txtStorageLoc.Text = ""
g_objMat.cbStatus.Text = ""
g_objMat.cbCondition.Text = ""
g_objMat.cbWhere.Text = ""
End Function
Private Function AddQtyRecord() As Boolean
'Setting the pointer
objData.FindRecordByField(objInv, g_ItemNo, 0, InvDBName)
'stroing the values in the fields and editing the record in the database
objInv.inv_shortdesc = txtShortDesc.Text
objData.EditSingleField(objInv, InvDBName, 10)
objInv.inv_qty = txtQty.Text
objData.EditSingleField(objInv, InvDBName, 11)
Return True
End Function
Private Sub AddMoreQtyRecord()
objInv.inv_uomcode = txtUOM.Text
objData.EditSingleField(objInv, InvDBName, 12)
objInv.inv_dateavail = txtDate.Text
objData.EditSingleField(objInv, InvDBName, 13)
End Sub
Public Function TextValidation() As Boolean
If Trim(txtQty.Text) = System.String.Empty Then
MsgBox("Quantity cannot be blank", MsgBoxStyle.Information, "IRS")
txtQty.Text = System.String.Empty
txtQty.Focus()
Return False
Return True
End Function
End If
g_objQty.Close()
g_objQty = Nothing
Catch exc As Exception
MessageBox.Show(exc.Message)
End Try
End Sub
End Sub
End Sub
End Class
frmMaterialDetails.vb
End Sub
End Sub
#End Region
Dim objInv As tinventoryRecord ' Inventory DB structure
Public Sub InitializeMatScreen()
cbStatus.AddItem("")
cbStatus.AddItem("Surplus")
cbStatus.AddItem("Idle")
'Where Combobox
cbWhere.AddItem("")
cbWhere.AddItem("Out of Svs.")
cbWhere.AddItem("In Service")
'Condition Combobox
cbCondition.AddItem("")
cbCondition.AddItem("Excellent")
cbCondition.AddItem("Good")
cbCondition.AddItem("Fair")
cbCondition.AddItem("Poor")
End Sub
End Sub
Private Sub SetCurrentData()
MaterialConstruct = txtMatConstruct.Text
StorageLocation = txtStorageLoc.Text
SpareParts = txtSpareParts.Text
ScopeReference = txtScopeRef.Text
Dwags = txtDwags.Text
Status = cbStatus.ListIndex
Where = cbWhere.ListIndex
Condition = cbCondition.ListIndex
End Sub
Private Sub PopulateCurrentData()
txtMatConstruct.Text = MaterialConstruct
txtStorageLoc.Text = StorageLocation
txtSpareParts.Text = SpareParts
txtScopeRef.Text = ScopeReference
txtDwags.Text = Dwags
cbStatus.ListIndex = Status
cbWhere.ListIndex = Where
cbCondition.ListIndex = Condition
End Sub
Private Function AddMatRecord() As Boolean
objInv.inv_where = cbWhere.Text
objData.EditSingleField(objInv, InvDBName, 15)
objInv.inv_condition = cbCondition.Text
objData.EditSingleField(objInv, InvDBName, 17)
Return True
End Function
Private Sub AddMoreMaTRecords()
objInv.inv_assettag = txtStorageLoc.Text
objData.EditSingleField(objInv, InvDBName, 19)
objInv.inv_spareparts = txtSpareParts.Text
objData.EditSingleField(objInv, InvDBName, 20)
objInv.inv_dwgsmanuals = txtDwags.Text
objData.EditSingleField(objInv, InvDBName, 21)
End Sub
objInv.inv_scrapcode = txtScopeRef.Text
objData.EditSingleField(objInv, InvDBName, 22)
objInv.inv_constmatl = txtMatConstruct.Text
objData.EditSingleField(objInv, InvDBName, 25)
End Sub
txtDwags.Text = System.String.Empty
txtDwags.Focus()
Return False
End If
Return True
End Function
AddMoreMaTRecords()
AddFewMoreMatRecords()
g_objManu.InitializeManuScreen()
LoadForm(g_objManu)
Else
MsgBox("Error in Adding Quantity Details", MsgBoxStyle.Information)
Exit Sub
End If
End If
g_objMat.Close()
g_objMat = Nothing
Catch Exc As Exception
MessageBox.Show(Exc.Message)
End Try
End Sub
End Class
frmManufactDetails.vb
End Sub
End Sub
#End Region
Dim objInv As tinventoryRecord ' Inventory DB structure
Public Sub InitializeManuScreen()
End If
End Sub
objInv.inv_serialnumber = txtSerial.Text
objData.EditSingleField(objInv, InvDBName, 18)
objInv.inv_manufacturer = txtManufacturer.Text
objData.EditSingleField(objInv, InvDBName, 23)
Return True
End Function
Private Sub AddMoreManuRecord()
objInv.inv_mfgmodelno = txtMfgNo.Text
objData.EditSingleField(objInv, InvDBName, 24)
objInv.inv_disposalcode = cbDispCode.Text
objData.EditSingleField(objInv, InvDBName, 26)
objInv.inv_dimensions = txtDimensions.Text
objData.EditSingleField(objInv, InvDBName, 27)
End Sub
Private Sub AddSomeMoreManuRecord()
objInv.inv_weight = txtWeight.Text
objData.EditSingleField(objInv, InvDBName, 28)
objInv.inv_longdesc = txtLongDesc.Text
objData.EditSingleField(objInv, InvDBName, 30)
objInv.inv_invtag = txtParts.Text
objData.EditSingleField(objInv, InvDBName, 49)
End Sub
Public Function TextValidation() As Boolean
Try
If Trim(cbNewUsed.Text) = System.String.Empty Then
MsgBox("New/ Used cannot be blank", MsgBoxStyle.Information, "IRS")
cbNewUsed.Text = System.String.Empty
cbNewUsed.Focus()
Return False
End If
If Trim(cbDispCode.Text) = System.String.Empty Then
MsgBox("DispCode cannot be blank", MsgBoxStyle.Information, "IRS")
cbDispCode.Text = System.String.Empty
cbDispCode.Focus()
Return False
End If
Return True
Catch Exc As Exception
Throw Exc
End Try
End Function
Private Sub btnManuNext_ClickEvent(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnManuNext.ClickEvent
Try
If TextValidation() = False Then
Exit Sub
Else
g_objLoc.InitializeLocScreen()
LoadForm(g_objLoc)
Else
MsgBox("Error in Adding Quantity Details", MsgBoxStyle.Information)
Exit Sub
End If
End If
g_objManu.Close()
g_objManu = Nothing 'Me.Hide()
Catch Exc As Exception
MessageBox.Show(Exc.Message)
End Try
End Sub
End Class
frmLocation.vb
End Sub
End Sub
#End Region
End Sub
Private Sub PopulateWithCurrentData()
txtLocCode.Text = LocationCode
txtLocDesc.Text = LocationDecription
txtLocContact.Text = LocationContact
txtLocPhone.Text = LocationPhone
txtLocFax.Text = LocationFax
txtLocEmail.Text = LocationEmail
End Sub
Private Sub SetCurrentData()
LocationCode = txtLocCode.Text
LocationDecription = txtLocDesc.Text
LocationContact = txtLocContact.Text
LocationPhone = txtLocPhone.Text
LocationFax = txtLocFax.Text
LocationEmail = txtLocEmail.Text
End Sub
Public Function TextValidation() As Boolean
If Trim(txtLocCode.Text) = System.String.Empty Then
MsgBox("Inventory Location cannot be blank", MsgBoxStyle.Information, "IRS")
txtLocCode.Text = System.String.Empty
txtLocCode.Focus()
Return False
End If
Return True
End Function
End Sub
Public Sub InitializeLocScreen()
Try
Else
If (g_Inventory_mode = "Edit") Then
MsgBox("Error in Editing Location details", MsgBoxStyle.Information)
Else
MsgBox("Error in Adding Location details", MsgBoxStyle.Information)
End If
Exit Sub
End If
End If
g_objLoc.Close()
g_objLoc = Nothing ' Me.Hide()
Catch Exc As Exception
MessageBox.Show(Exc.Message)
End Try
End Sub
'stroing the values in the fields and editing the record in the database
objInv.inv_loccode = txtLocCode.Text
objData.EditSingleField(objInv, InvDBName, 31)
objInv.inv_locname = txtLocContact.Text
objData.EditSingleField(objInv, InvDBName, 34)
Return True
Catch ex As Exception
Throw ex
End Try
End Function
Private Sub AddMoreLocationRecord()
objInv.inv_locphone = txtLocPhone.Text
objData.EditSingleField(objInv, InvDBName, 35)
objInv.inv_locfax = txtLocFax.Text
objData.EditSingleField(objInv, InvDBName, 36)
objInv.inv_locemail = txtLocEmail.Text
objData.EditSingleField(objInv, InvDBName, 32)
End Sub
End Class
frmConsignment.vb
End Sub
End Sub
#End Region
#Region "Variable Declaration"
Dim objInv As tinventoryRecord ' Inventory DB structure
Dim objConsignList As tlocationRecord 'Location db structure obj
#End Region
End Sub
Private Sub SetCurrentData()
ConsignMentCode = txtConsignCode.Text
ConsignMentDesc = txtConsignDesc.Text
ConsignMentContact = txtConsignContact.Text
ConsignMentPhone = txtConsignPhone.Text
ConsignMentFax = txtConsignFax.Text
ConsignMentEmail = txtConsignEmail.Text
End Sub
Private Sub PopulateWithCurrentData()
txtConsignCode.Text = ConsignMentCode
txtConsignDesc.Text = ConsignMentDesc
txtConsignContact.Text = ConsignMentContact
txtConsignPhone.Text = ConsignMentPhone
txtConsignFax.Text = ConsignMentFax
txtConsignEmail.Text = ConsignMentEmail
End Sub
Private Sub btnConsignBack_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnConsignBack.ClickEvent
If (g_objLoc Is Nothing) Then
g_objLoc = New frmLocation
End If
g_objLoc.InitializeLocScreen()
LoadForm(g_objLoc)
g_objConsign.Close()
g_objConsign = Nothing
'Me.Hide()
End Sub
Public Sub InitializeConsignmentForm()
Try
objData.FindRecordByField(objConsignList, Trim(txtConsignCode.Text).PadRight(3,
""), 0, LocDBName)
'objData.FindRecordbyID(CInt(iTemp), LocDBName)
g_objConsign.txtConsignDesc.Text = objData.GetFieldValue(1, LocDBName)
End If
End If
Catch Exc As Exception
MessageBox.Show(Exc.Message)
End Try
End Sub
Private Sub BtnConsignNext_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles BtnConsignNext.ClickEvent
Try
If g_objCurrency Is Nothing Then
g_objCurrency = New frmCurrency
End If
End Sub
End Sub
'stroing the values in the fields and editing the record in the database
objInv.inv_consignmentcode = txtConsignCode.Text
objData.EditSingleField(objInv, InvDBName, 50)
objInv.inv_consignmentcontact = txtConsignContact.Text
objData.EditSingleField(objInv, InvDBName, 52)
Return True
End Function
Private Sub AddMoreConsignmentRecord()
objInv.inv_consignmentphone = txtConsignPhone.Text
objData.EditSingleField(objInv, InvDBName, 53)
objInv.inv_consignmentfax = txtConsignFax.Text
objData.EditSingleField(objInv, InvDBName, 54)
objInv.inv_consignmentemail = txtConsignEmail.Text
objData.EditSingleField(objInv, InvDBName, 51)
End Sub
End Class
frmCurrency.vb
End Sub
End Sub
#End Region
txtForeignCurr.Text = ForeignCurrency
txtConverFact.Text = ConversionFactor
txtForeignCost.Text = ForeignCost
txtForeignNBV.Text = NBV
txtUom.Text = UOM
If (isUpdate = True) Then
ckUpdt.Value = AppForge.Controls.CheckBoxValue.Checked
Else
ckUpdt.Value = AppForge.Controls.CheckBoxValue.Unchecked
End If
End Sub
Private Sub SetCurrentData()
ForeignCurrency = txtForeignCurr.Text
ConversionFactor = txtConverFact.Text
ForeignCost = txtForeignCost.Text
NBV = txtForeignNBV.Text
isUpdate = ckUpdt.Value
End Sub
Private Sub EditCostvalues()
objInv.inv_originalcost = OriginalCost
objData.EditSingleField(objInv, InvDBName, 38)
objInv.inv_totalcost = TotalCost
objData.EditSingleField(objInv, InvDBName, 40)
End Sub
'Me.Hide()
End Sub
Public Sub InitializeCurrencyForm()
Try
End Try
End Sub
End Sub
Private Sub btnCurrNext_ClickEvent(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCurrNext.ClickEvent
Try
If TextValidation() = False Then
Exit Sub
Else
If AddCurrencyRecord() = True Then
AddMoreCurrencyRecord()
SetCurrentData()
End If
Call StoreValues()
Call EditCostvalues()
g_objCost.InitializeCostDetailForm()
LoadForm(g_objCost)
Else
If (g_Inventory_mode = "Add") Then
MsgBox("Error in Adding Item details", MsgBoxStyle.Information)
Else
MessageBox.Show("Error in Adding Item details", "information")
End If
Exit Sub
End If
End If
g_objCurrency.Close()
g_objCurrency = Nothing 'Me.Hide()
Catch Exc As Exception
MessageBox.Show(Exc.Message, "Error")
End Try
End Sub
End If
End If
End If
Return True
Catch ex As Exception
Throw ex
End Try
End Function
'storing the values in the fields and editing the record in the database
objInv.inv_foreigncurr = txtForeignCurr.Text
objData.EditSingleField(objInv, InvDBName, 55)
objInv.inv_conversionfactor = txtConverFact.Text
objData.EditSingleField(objInv, InvDBName, 56)
objInv.inv_foreigncost = txtForeignCost.Text
objData.EditSingleField(objInv, InvDBName, 57)
Return True
Catch ex As Exception
Throw ex
End Try
End Function
Private Sub AddMoreCurrencyRecord()
objInv.inv_foreignnbv = txtForeignNBV.Text
objData.EditSingleField(objInv, InvDBName, 58)
End Sub
End Class
frmCostDetails.vb
End Sub
End Sub
#End Region
End If
Catch Exc As Exception
Throw Exc
End Try
End Sub
Catch ex As Exception
MessageBox.Show("Error Occured While Saving " + ex.Message, "Error")
End Try
End Sub
Private Function TextValidation() As Boolean
Try
If Me.txtAskPrice.Text = System.String.Empty Then
txtAskPrice.Text = 0
End If
If Not (IsNumeric(txtAskPrice.Text)) Then
MessageBox.Show("Ask Price Should Be Numberic Type", "Information")
txtAskPrice.Text = System.String.Empty
txtAskPrice.Focus()
Return False
End If
If CInt(txtAskPrice.Text) < 0 Then
MsgBox(" Asking Price must be greater than 0", MsgBoxStyle.Information, "IRS")
txtAskPrice.Text = 0
txtAskPrice.Focus()
Return False
End If
If Me.txtLifeRemain.Text = System.String.Empty Then
txtLifeRemain.Text = 0
End If
If Not (IsNumeric(txtLifeRemain.Text)) Then
MessageBox.Show("Life Remaining Should Be Numberic Type", "Information")
txtLifeRemain.Text = System.String.Empty
txtLifeRemain.Focus()
Return False
End If
If CInt(txtLifeRemain.Text) < 0 Then
MsgBox(" Life Remaining must be greater than 0", MsgBoxStyle.Information, "IRS")
txtLifeRemain.Text = 0
txtLifeRemain.Focus()
Return False
End If
If Me.txtLowestPrice.Text = System.String.Empty Then
txtLowestPrice.Text = 0
End If
If Not (IsNumeric(txtLowestPrice.Text)) Then
MessageBox.Show("Lowest Price Should Be Numberic Type", "Information")
txtLowestPrice.Text = System.String.Empty
txtLowestPrice.Focus()
Return False
End If
If CInt(txtLowestPrice.Text) < 0 Then
MsgBox(" Lowest price must be greater than 0", MsgBoxStyle.Information, "IRS")
txtLowestPrice.Text = 0
txtLowestPrice.Focus()
Return False
End If
If Me.txtNBV.Text = System.String.Empty Then
txtNBV.Text = 0
End If
If Not (IsNumeric(txtNBV.Text)) Then
MessageBox.Show("NBV Should Be Numberic Type", "Information")
txtNBV.Text = System.String.Empty
txtNBV.Focus()
Return False
End If
If CInt(txtNBV.Text) < 0 Then
MsgBox(" NBV must be greater than 0", MsgBoxStyle.Information, "IRS")
txtNBV.Text = 0
txtNBV.Focus()
Return False
End If
If Me.txtOrigFreight.Text = System.String.Empty Then
txtOrigFreight.Text = 0
End If
If Not (IsNumeric(txtOrigFreight.Text)) Then
MessageBox.Show("Original Freight Should Be Numberic Type", "Information")
txtOrigFreight.Text = System.String.Empty
txtOrigFreight.Focus()
Return False
End If
If CInt(txtOrigFreight.Text) < 0 Then
MsgBox(" Original Freight must be greater than 0", MsgBoxStyle.Information, "IRS")
txtOrigFreight.Text = 0
txtOrigFreight.Focus()
Return False
End If
If Me.txtOrigInstall.Text = System.String.Empty Then
txtOrigInstall.Text = 0
End If
If Not (IsNumeric(txtOrigInstall.Text)) Then
MessageBox.Show("Original Install Should Be Numeric Type", "Information")
txtOrigInstall.Text = System.String.Empty
txtOrigInstall.Focus()
Return False
End If
If CInt(txtOrigInstall.Text) < 0 Then
MsgBox(" Original Install must be greater than 0", MsgBoxStyle.Information, "IRS")
txtOrigInstall.Text = 0
txtOrigInstall.Focus()
Return False
End If
Catch ex As Exception
Throw ex
End Try
End Function
'stroing the values in the fields and editing the record in the database
objInv.inv_originalcost = txtCost.Text
objData.EditSingleField(objInv, InvDBName, 38)
objInv.inv_totalcost = txtCost.Text
objData.EditSingleField(objInv, InvDBName, 40)
objInv.inv_orifreight = txtOrigFreight.Text
objData.EditSingleField(objInv, InvDBName, 63)
Return True
Catch ex As Exception
Throw ex
End Try
End Function
Private Sub AddMoreCostDtlsRecord()
objInv.inv_oriinstall = txtOrigInstall.Text
objData.EditSingleField(objInv, InvDBName, 64)
objInv.inv_liferemain = txtLifeRemain.Text
objData.EditSingleField(objInv, InvDBName, 60)
objInv.inv_yearcap = txtYearCap.Text
objData.EditSingleField(objInv, InvDBName, 61)
End Sub
Private Sub AddFewMoreCostDtlsRecord()
objInv.inv_nbv = txtNBV.Text
objData.EditSingleField(objInv, InvDBName, 41)
objInv.inv_taxvalue = TxtTaxValue.Text
objData.EditSingleField(objInv, InvDBName, 62)
objInv.inv_askingprice = txtAskPrice.Text
objData.EditSingleField(objInv, InvDBName, 43)
objInv.inv_lowestprice = txtLowestPrice.Text
objData.EditSingleField(objInv, InvDBName, 44)
End Sub
End Class
frmUOMList.vb
End Sub
End Sub
#End Region
Dim objUomList As tuomRecord 'UOm db structure obj
btnUomOk.Visible = boolVisible
btnUomCancel.Visible = boolVisible
End Sub
Public Sub InitializeUomLookUp()
objData.MoveToFirstRecord(UomDBName)
GrdUomList.Refresh()
FillGrid()
AddHeader()
AddItems()
End Sub
Public Sub FillGrid()
VisibilityButton(False)
GrdUomList.Refresh()
GrdUomList.Cols = 2
GrdUomList.set_RowHeight(0, (fGetStringHeight(iFontHandle_DeviceDefault) + 4))
GrdUomList.set_ColWidth(0, CShort(70))
GrdUomList.set_ColWidth(1, CShort(80))
grdUomHeader.Cols = CShort(2)
grdUomHeader.set_ColWidth(0, CShort(70))
grdUomHeader.set_ColWidth(1, CShort(80))
VisibilityButton(True)
End Sub
grdUomHeader.RemoveItem(0)
grdUomHeader.Refresh()
grdUomHeader.AddItem("UOM Code" & Chr(9) & " Description")
End Sub
Private Sub AddItems()
iNumRow = 0
iRow = 0
While Not objData.EndOfFile(UomDBName)
objData.MoveToNextRecord(UomDBName)
End While
GrdUomList.Refresh()
End Sub
Private Sub grdUomList_PaintCell(ByVal sender As Object, ByVal e As
AppForge.Controls.OwnerDrawGrid.PaintCellEventArgs) Handles GrdUomList.PaintCell
e.canvas.Erase()
End Sub
Private Sub grdUomlist_SelectCell(ByVal sender As Object, ByVal e As System.EventArgs)
Handles GrdUomList.SelectCell
iSelectedRow = CInt(GrdUomList.Row)
objData.GoToRecordIndex(iSelectedRow, UomDBName)
End Sub
Private Sub grdUomList_LeftColChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles GrdUomList.LeftColChanged
grdUomHeader.LeftCol = GrdUomList.LeftCol
End Sub
End Sub
Private Sub grdUomHeader_SelectCell(ByVal sender As Object, ByVal e As System.EventArgs)
Handles grdUomHeader.SelectCell
tmrUom.Enabled = False
tmrUom.Enabled = True
End Sub
End Sub
'See grdlocHeader_SelectCell for an explanation of this timer.
Private Sub tmrUom_TimerEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles tmrUom.TimerEvent
objData.GoToRecordIndex(iSelectedRow, UomDBName)
myUID = objData.RecordUniqueID(UomDBName)
SortDatabase()
objData.FindRecordbyID(myUID, UomDBName)
If (bInitialSetup) Then
GrdUomList.Row = 0
bInitialSetup = False
Else
GrdUomList.Row = objData.CurrentIndex(UomDBName)
End If
End Sub
e.canvas.Reset()
e.canvas.BrushColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOW)
e.canvas.Erase()
e.canvas.PenColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOWTEXT)
'e.canvas.CurrentFont = iFontHandle_Medium_Bold 'This font handle was created in
modCommon.setupFonts
If e.selected Then
e.canvas.DrawText(e.x + 3, e.y + 3, grdUomHeader.get_TextMatrix(e.row, e.col) & "*")
Else
e.canvas.DrawText(e.x + 3, e.y + 3, grdUomHeader.get_TextMatrix(e.row, e.col))
End If
End Sub
Me.Hide()
End Sub
g_objQty.txtUOM.Text = Trim(iTemp)
LoadForm(g_objQty)
Me.Hide()
End Sub
End Class
frmLocationList.vb
End Sub
End Sub
#End Region
Dim objLocList As tlocationRecord 'Location db structure obj
Public iSelectedRow As Integer
Private bInitialSetup As Boolean = True
Public iLocIndex As Integer
btnLocOk.Visible = boolVisible
btnLocCancel.Visible = boolVisible
End Sub
Public Sub InitializeLocLookUp()
objData.MoveToFirstRecord(LocDBName)
GrdLocList.Refresh()
FillGrid()
AddHeader()
AddItems()
End Sub
Public Sub FillGrid()
VisibilityButton(False)
GrdLocList.Refresh()
GrdLocList.Cols = 2
GrdLocList.set_RowHeight(0, (fGetStringHeight(iFontHandle_DeviceDefault) + 4))
GrdLocList.set_ColWidth(0, CShort(60))
GrdLocList.set_ColWidth(1, CShort(100))
grdLocHeader.Cols = CShort(2)
grdLocHeader.set_ColWidth(0, CShort(60))
grdLocHeader.set_ColWidth(1, CShort(100))
VisibilityButton(True)
End Sub
grdLocHeader.RemoveItem(0)
grdLocHeader.Refresh()
grdLocHeader.AddItem("Loc Code" & Chr(9) & "Loc Description")
End Sub
Private Sub AddItems()
iNumRow = 0
iRow = 0
While Not objData.EndOfFile(LocDBName)
objData.MoveToNextRecord(LocDBName)
End While
GrdLocList.Refresh()
End Sub
End Sub
iSelectedRow = CInt(GrdLocList.Row)
objData.GoToRecordIndex(iSelectedRow, LocDBName)
End Sub
grdLocHeader.LeftCol = GrdLocList.LeftCol
End Sub
End Sub
tmrLoc.Enabled = False
tmrLoc.Enabled = True
End Sub
End Sub
'See grdlocHeader_SelectCell for an explanation of this timer.
Private Sub tmrloc_TimerEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles
tmrLoc.TimerEvent
objData.GoToRecordIndex(iSelectedRow, LocDBName)
myUID = objData.RecordUniqueID(LocDBName)
SortDatabase()
objData.FindRecordbyID(myUID, LocDBName)
If (bInitialSetup) Then
GrdLocList.Row = 0
bInitialSetup = False
Else
GrdLocList.Row = objData.CurrentIndex(LocDBName)
End If
End Sub
Private Sub grdLocHeader_PaintCell(ByVal sender As Object, ByVal e As
AppForge.Controls.OwnerDrawGrid.PaintCellEventArgs) Handles grdLocHeader.PaintCell
e.canvas.Reset()
e.canvas.BrushColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOW)
e.canvas.Erase()
e.canvas.PenColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOWTEXT)
'e.canvas.CurrentFont = iFontHandle_Medium_Bold 'This font handle was created in
modCommon.setupFonts
If e.selected Then
e.canvas.DrawText(e.x + 3, e.y + 3, grdLocHeader.get_TextMatrix(e.row, e.col) & "*")
Else
e.canvas.DrawText(e.x + 3, e.y + 3, grdLocHeader.get_TextMatrix(e.row, e.col))
End If
End Sub
LoadForm(g_objMain)
ElseIf g_Last_Screen = "Loc" Then
LoadForm(g_objLoc)
End If
Me.Hide()
End Sub
Private Sub btnLocOk_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnLocOk.ClickEvent
Dim iTemp As String
LoadForm(g_objLoc)
LoadForm(g_objMain)
End If
Me.Hide()
End Sub
End Class
frmConsignmentList.vb
End Sub
End Sub
#End Region
Dim objConsignList As tlocationRecord 'Location db structure obj
Public iSelectedRow As Integer
Private bInitialSetup As Boolean = True
Public iConLocIndex As Integer
btnConsignOk.Visible = boolVisible
btnConsignCancel.Visible = boolVisible
End Sub
Public Sub InitializeConsignLookUp()
objData.MoveToFirstRecord(LocDBName)
GrdConsignList.Refresh()
FillGrid()
AddHeader()
AddItems()
End Sub
Public Sub FillGrid()
VisibilityButton(False)
GrdConsignList.Refresh()
GrdConsignList.Cols = 2
GrdConsignList.set_RowHeight(0, (fGetStringHeight(iFontHandle_DeviceDefault) + 4))
GrdConsignList.set_ColWidth(0, CShort(60))
GrdConsignList.set_ColWidth(1, CShort(100))
grdConHeader.Cols = CShort(2)
grdConHeader.set_ColWidth(0, CShort(60))
grdConHeader.set_ColWidth(1, CShort(100))
VisibilityButton(True)
End Sub
grdConHeader.RemoveItem(0)
grdConHeader.Refresh()
grdConHeader.AddItem("Loc Code" & Chr(9) & " Loc Name")
End Sub
Private Sub AddItems()
'VisibilityButton(False)
iNumRow = 0
iRow = 0
End Sub
Private Sub grdConsignList_PaintCell(ByVal sender As Object, ByVal e As
AppForge.Controls.OwnerDrawGrid.PaintCellEventArgs) Handles GrdConsignList.PaintCell
e.canvas.Erase()
e.canvas.DrawText(e.x + 3, e.y + 3, GrdConsignList.get_TextMatrix(e.row, e.col))
End Sub
Private Sub GrdConsignList_SelectCell(ByVal sender As Object, ByVal e As System.EventArgs)
Handles GrdConsignList.SelectCell
iSelectedRow = CInt(GrdConsignList.Row)
objData.GoToRecordIndex(iSelectedRow, LocDBName)
End Sub
grdConHeader.LeftCol = GrdConsignList.LeftCol
End Sub
End Sub
tmrConsign.Enabled = False
tmrConsign.Enabled = True
End Sub
End Sub
'See grdlocHeader_SelectCell for an explanation of this timer.
Private Sub tmrConsign_TimerEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles tmrConsign.TimerEvent
objData.GoToRecordIndex(iSelectedRow, LocDBName)
myUID = objData.RecordUniqueID(LocDBName)
SortDatabase()
objData.FindRecordbyID(myUID, LocDBName)
If (bInitialSetup) Then
GrdConsignList.Row = 0
bInitialSetup = False
Else
GrdConsignList.Row = objData.CurrentIndex(LocDBName)
End If
End Sub
e.canvas.Reset()
e.canvas.BrushColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOW)
e.canvas.Erase()
e.canvas.PenColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOWTEXT)
'e.canvas.CurrentFont = iFontHandle_Medium_Bold 'This font handle was created in
modCommon.setupFonts
If e.selected Then
e.canvas.DrawText(e.x + 3, e.y + 3, grdConHeader.get_TextMatrix(e.row, e.col) & "*")
Else
e.canvas.DrawText(e.x + 3, e.y + 3, grdConHeader.get_TextMatrix(e.row, e.col))
End If
End Sub
VisibilityButton(False)
If g_Last_Screen = "Consign" Then
VisibilityButton(True)
LoadForm(g_objMain)
End If
Me.Hide()
End Sub
End Class
frmCommodityList.vb
End Sub
End Sub
#End Region
Dim objCommList As tcommodityRecord 'Commodity db structure obj
Public iSelectedRow As Integer
Private bInitialSetup As Boolean = True
Public iCommIndex As Integer
btnCommOk.Visible = boolVisible
btnCommCancel.Visible = boolVisible
End Sub
Public Sub InitializeCommLookUp()
objData.MoveToFirstRecord(CommDBName)
GrdCommList.Refresh()
FillGrid()
AddHeader()
AddItems()
End Sub
Public Sub FillGrid()
VisibilityButton(False)
GrdCommList.Cols = CShort(2)
GrdCommList.set_RowHeight(0, (fGetStringHeight(iFontHandle_DeviceDefault) + 4))
GrdCommList.set_ColWidth(0, CShort(50))
GrdCommList.set_ColWidth(1, CShort(100))
grdCommHeader.Cols = CShort(2)
grdCommHeader.set_ColWidth(0, CShort(50))
grdCommHeader.set_ColWidth(1, CShort(80))
VisibilityButton(True)
End Sub
grdCommHeader.RemoveItem(0)
grdCommHeader.Refresh()
grdCommHeader.AddItem("Code" & Chr(9) & " Description")
End Sub
Private Sub AddItems()
iNumRow = 0
iRow = 0
While Not objData.EndOfFile(CommDBName)
objData.MoveToNextRecord(CommDBName)
End While
GrdCommList.Refresh()
End Sub
e.canvas.Erase()
iSelectedRow = CInt(GrdCommList.Row)
objData.GoToRecordIndex(iSelectedRow, CommDBName)
End Sub
grdCommHeader.LeftCol = GrdCommList.LeftCol
End Sub
End Sub
tmrComm.Enabled = False
tmrComm.Enabled = True
End Sub
End Sub
'See grdlocHeader_SelectCell for an explanation of this timer.
Private Sub tmrComm_TimerEvent(ByVal sender As Object, ByVal e As System.EventArgs)
Handles tmrComm.TimerEvent
objData.GoToRecordIndex(iSelectedRow, CommDBName)
myUID = objData.RecordUniqueID(CommDBName)
SortDatabase()
objData.FindRecordbyID(myUID, CommDBName)
If (bInitialSetup) Then
GrdCommList.Row = 0
bInitialSetup = False
Else
GrdCommList.Row = objData.CurrentIndex(CommDBName)
End If
End Sub
e.canvas.Reset()
e.canvas.BrushColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOW)
e.canvas.Erase()
e.canvas.PenColor = myShell.TranslateColor(AppForge.LogicalColor.WINDOWTEXT)
'e.canvas.CurrentFont = iFontHandle_Medium_Bold 'This font handle was created in
modCommon.setupFonts
If e.selected Then
e.canvas.DrawText(e.x + 3, e.y + 3, grdCommHeader.get_TextMatrix(e.row, e.col) & "*")
Else
e.canvas.DrawText(e.x + 3, e.y + 3, grdCommHeader.get_TextMatrix(e.row, e.col))
End If
End Sub
LoadForm(g_objMain)
End If
Me.Hide()
End Sub
End Class
frmDate.vb
End Sub
End Sub
#End Region
End Sub
Imports System.Runtime.InteropServices
Else
'--------------------------------------------------
Case LocDBName 'Location
' Open the database
#If APPTYPE = "PDA" Then
dblocation =
AFPDBClassInstance.PDBOpen(AppForge.MobileVB.Compatibility.tOpenStyle.Byfilename,
g_appPath & "\" & LocDBName, 0, 0, 0, 0,
AppForge.MobileVB.Compatibility.tOpenMode.afModeReadWrite)
#End If
#If APPTYPE = "PPC" Then
dblocation =
AFPDBClassInstance.PDBOpen(AppForge.MobileVB.Compatibility.tOpenStyle.Byfilename,
g_appPath & "\" & LocDBName", 0, 0, 0, 0,
AppForge.MobileVB.Compatibility.tOpenMode.afModeReadWrite)
#End If
If dblocation <> 0 Then
OpenDatabase = True 'on successful opening of the database
Else
'We failed to open the database
OpenDatabase = False
#If APPTYPE = "PDA" Then
MsgBox("Could not open database -" & LocDBName & ".pdb" + vbCrLf + vbCrLf +
"Potential causes are:" + vbCrLf + "1. Database file does not exist" + vbCrLf + "2. The database
path in the PDBOpen call is incorrect", vbExclamation, "IRS")
#End If
Else
OpenDatabase = False 'fail to open the database
#If APPTYPE = "PDA" Then
MsgBox("Could not open database -" & CommDBName & ".pdb" + vbCrLf + vbCrLf
+ "Potential causes are:" + vbCrLf + "1. Database file does not exist" + vbCrLf + "2. The database
path in the PDBOpen call is incorrect", vbExclamation, "IRS")
#End If
#If APPTYPE = "PPC" Then
MsgBox("Could not open database -" & CommDBName & ".pdb" + vbCrLf + vbCrLf + "Potential
causes are:" + vbCrLf + "1. Database file does not exist" + vbCrLf + "2. The database path in the
PDBOpen call is incorrect", vbExclamation,"IRS")
#End If
End If
'---------------------------------------------------------
Case UomDBName 'UOM database
' Open the database
#If APPTYPE = "PDA" Then
dbuom =
AFPDBClassInstance.PDBOpen(AppForge.MobileVB.Compatibility.tOpenStyle.Byfilename,
g_appPath & "\" & UomDBName, 0, 0, 0, 0,
AppForge.MobileVB.Compatibility.tOpenMode.afModeReadWrite)
#End If
#If APPTYPE = "PDA" Then
dbuom =
AFPDBClassInstance.PDBOpen(AppForge.MobileVB.Compatibility.tOpenStyle.Byfilename,
g_appPath & "\" & UomDBName, 0, 0, 0, 0,
AppForge.MobileVB.Compatibility.tOpenMode.afModeReadWrite)
#End If
If dbuom <> 0 Then
OpenDatabase = True 'on successful opening of the database
Else
OpenDatabase = False 'fail to open the database
#If APPTYPE = "PDA" Then
MsgBox("Could not open database -" & UomDBName & ".pdb" + vbCrLf + vbCrLf +
"Potential causes are:" + vbCrLf + "1. Database file does not exist" + vbCrLf + "2. The database
path in the PDBOpen call is incorrect", vbExclamation, "IRS")
#End If
#If APPTYPE = "PPC" Then
MsgBox("Could not open database -" & UomDBName & ".pdb" + vbCrLf + vbCrLf +
"Potential causes are:" + vbCrLf + "1. Database file does not exist" + vbCrLf + "2. The database
path in the PDBOpen call is incorrect", vbExclamation,"IRS")
#End If
End If
'--------------------------------------
Case UsrDBName 'User database
' Open the database
#If APPTYPE = "PDA" Then
dbuser =
AFPDBClassInstance.PDBOpen(AppForge.MobileVB.Compatibility.tOpenStyle.Byfilename,
g_appPath & "\" & UsrDBName, 0, 0, 0, 0,
AppForge.MobileVB.Compatibility.tOpenMode.afModeReadWrite)
#End If
#If APPTYPE = "PPC" Then
dbuser =
AFPDBClassInstance.PDBOpen(AppForge.MobileVB.Compatibility.tOpenStyle.Byfilename,
g_appPath & "\" & UsrDBName, 0, 0, 0, 0,
AppForge.MobileVB.Compatibility.tOpenMode.afModeReadWrite)
#End If
If dbuser <> 0 Then
OpenDatabase = True 'On successfully opening the database
Else
OpenDatabase = False 'fail to open the database
#If APPTYPE = "PDA" Then
MsgBox("Could not open database -" & UsrDBName & ".pdb" + vbCrLf + vbCrLf +
"Potential causes are:" + vbCrLf + "1. Database file does not exist" + vbCrLf + "2. The database
path in the PDBOpen call is incorrect", vbExclamation, "IRS")
#End If
End Select
End Function
' Function To Find the No of Records in the Databse
Public Function GetNumRecords(ByVal sDBName As String) As Integer
End Function
End Function
End Function
End Function
End Function
End Function
End Function
Case Else
'do noting
End Select
End Function
End Function
Else
End If
End If
Return retVal
Case Else
'do nothing
End Select
End Function
'Go to Record of Specified Index
Public Function GoToRecordIndex(ByVal index As Integer, ByVal sDBName As String) As
Boolean
End Function
Case Else
'do nothing
End Select
End Function
End Function
'Write a single field of the record to the Database
Public Function WriteSingleFieldRecord(ByVal MyRecord As BaseClassStructure, ByVal
sDBName As String, ByVal iFldNo As Integer) As Boolean
sDataType = objInv.GetFieldType(iFldNo)
d_Double = CDbl(CInt(objInv.getFieldValue(iFldNo)))
Return True
MyRecord = objLoc
Return True
sDataType = objcomm.GetFieldType(iFldNo)
Select Case sDataType
Case s_string
str = objcomm.getFieldValue(iFldNo)
AFPDBClassInstance.PDBWriteField(dbcommodity, iFldNo, str)
Case d_date
dt_date = objcomm.getFieldValue(iFldNo)
AFPDBClassInstance.PDBWriteField(dbcommodity, iFldNo, dt_date)
Case bool_boolean
b_Bool = objcomm.getFieldValue(iFldNo)
AFPDBClassInstance.PDBWriteField(dbcommodity, iFldNo, b_Bool)
End Select
MyRecord = objcomm
Return True
MyRecord = objUom
Return True
MyRecord = objUser
Return True
Case Else
'do nothing
End Select
End Function
'move pointer to the search record if found
Public Function FindRecordByField(ByVal MyRecord As BaseClassStructure, ByVal sSearchText
As String, ByVal iFldNo As Integer, ByVal sDBName As String)
Case bool_boolean
b_Bool = CBool(sSearchText)
AFPDBClassInstance.PDBFindRecordByField(dbinventory, iFldNo, b_Bool)
Case dbl_double
d_Double = CDbl(CInt(sSearchText))
AFPDBClassInstance.PDBFindRecordByField(dbinventory, iFldNo, d_Double)
End Select
Case bool_boolean
b_Bool = CBool(sSearchText)
AFPDBClassInstance.PDBFindRecordByField(dblocation, iFldNo, b_Bool)
End Select
Case bool_boolean
b_Bool = CBool(sSearchText)
AFPDBClassInstance.PDBFindRecordByField(dbcommodity, iFldNo, b_Bool)
End Select
Case bool_boolean
b_Bool = CBool(sSearchText)
AFPDBClassInstance.PDBFindRecordByField(dbuom, iFldNo, b_Bool)
End Select
Case d_date
dt_date = CDate(sSearchText)
AFPDBClassInstance.PDBFindRecordByField(dbuser, iFldNo, dt_date)
Case bool_boolean
b_Bool = CBool(sSearchText)
AFPDBClassInstance.PDBFindRecordByField(dbuser, iFldNo, b_Bool)
End Select
Case Else
'do nothing
End Select
End Function
' Creation of record structure by Schema involves
'Create Record By Schema ,Write to the Database then Update
Public Function CreateRecord(ByVal MyRecord As BaseClassStructure, ByVal sDBName As
String) As Boolean
Case Else
'do nothing
End Select
End Function
Public Function CreateSingleFieldRecord(ByVal MyRecord As BaseClassStructure, ByVal
sDBName As String, ByVal iFldNo As Integer) As Boolean
Select Case sDBName
AFPDBClassInstance.PDBUpdateRecord(dbinventory)
Return CreateSingleFieldRecord
Case LocDBName 'Location
'Create a new record
AFPDBClassInstance.PDBCreateRecordBySchema(dblocation)
'Write the new record + Update the new record
CreateSingleFieldRecord = WriteSingleFieldRecord(MyRecord, sDBName, iFldNo)
AFPDBClassInstance.PDBUpdateRecord(dblocation)
Return CreateSingleFieldRecord
End Function
'Edit a single field
Public Function EditSingleField(ByVal MyRecord As BaseClassStructure, ByVal sDBName As
String, ByVal iFieldNo As Integer) As Boolean
AFPDBClassInstance.PDBUpdateRecord(dbinventory)
MyRecord = objInv
Return True
Case Else
'do nothing
End Select
End Function
End Function
Public Sub CloseDatabase(ByVal sDBName As String)
End Sub
End Class
Global.vb
Imports System.Runtime.InteropServices
Module Global
'---------------------------------------------------------------------------
'Database Structure Declaration
'---------------------------------------------------------------------------
' Commodity Database
'CreatorID and TypeID for Commodity Database
Public Const commodity_CreatorID As Integer = &H49525350
Public Const commodity_TypeID As Integer = &H44415441
End Property
End Function
'Pass the field index # current value present in the control to be set into the data field
Public Function setValue(ByVal indx As Integer, ByVal sVal As String) Implements
BaseClassStructure.setValue
End Select
End Function
End Function
End Property
End Function
'Pass the field index # current value present in the control to be set into the data field
Public Function setValue(ByVal indx As Integer, ByVal sVal As String) Implements
BaseClassStructure.setValue
End Select
End Function
End Select
End Function
End Property
End Function
'Pass the field index # current value present in the control to be set into the data field
Public Function setValue(ByVal indx As Integer, ByVal sVal As String) Implements
BaseClassStructure.setValue
End Select
End Function
End Function
End Structure ' End of UOMDB structure declaration
'----------------------------
'User Datatabase
'----------------------------
' Constants for the CreatorID and TypeID
Public Const user_CreatorID As Integer = &H49525350
Public Const user_TypeID As Integer = &H44415441
End Function
'Pass the field index # current value present in the control to be set into the data field
Public Function setValue(ByVal indx As Integer, ByVal sVal As String) Implements
BaseClassStructure.setValue
End Select
End Function
End Function
End Structure ' End of UserDB Structure declaration
'-------------------------------
' Inventory Database Structure
'-------------------------------
'Constants for the CreatorID and TypeID
Public Const inventory_CreatorID As Integer = &H49525350
Public Const inventory_TypeID As Integer = &H44415441
End Property
End Function
'Pass the field index # current value present in the control to be set into the data field
Public Function setValue(ByVal indx As Integer, ByVal sVal As String) Implements
BaseClassStructure.setValue
End Select
End Function
'Pass the field index # to get the value of the field
Public Function getFieldValue(ByVal indx As Integer) As String Implements
BaseClassStructure.getFieldValue
getFieldValue = CStr(CInt(inv_eqpid))
Case 1
getFieldValue = CStr(CInt(inv_trannumber))
Case 2
getFieldValue = inv_asidnumber
Case 3
getFieldValue = inv_commcode
Case 4
getFieldValue = inv_commvalue1
Case 5
getFieldValue = inv_commvalue2
Case 6
getFieldValue = inv_commvalue3
Case 7
getFieldValue = inv_commvalue4
Case 8
getFieldValue = inv_commvalue5
Case 9
getFieldValue = inv_commvalue6
Case 10
getFieldValue = inv_shortdesc
Case 11
getFieldValue = CStr(CInt(inv_qty))
Case 12
getFieldValue = inv_uomcode
Case 13
getFieldValue = inv_dateavail
Case 14
getFieldValue = inv_status
Case 15
getFieldValue = inv_where
Case 16
getFieldValue = inv_newused
Case 17
getFieldValue = inv_condition
Case 18
getFieldValue = inv_serialnumber
Case 19
getFieldValue = inv_assettag
Case 20
getFieldValue = inv_spareparts
Case 21
getFieldValue = inv_dwgsmanuals
Case 22
getFieldValue = inv_scrapcode
Case 23
getFieldValue = inv_manufacturer
Case 24
getFieldValue = inv_mfgmodelno
Case 25
getFieldValue = inv_constmatl
Case 26
getFieldValue = inv_disposalcode
Case 27
getFieldValue = inv_dimensions
Case 28
getFieldValue = CStr(CInt(inv_weight))
Case 29
getFieldValue = inv_msds
Case 30
getFieldValue = inv_longdesc
Case 31
getFieldValue = inv_loccode
Case 32
getFieldValue = inv_locemail
Case 33
getFieldValue = inv_spare
Case 34
getFieldValue = inv_locname
Case 35
getFieldValue = inv_locphone
Case 36
getFieldValue = inv_locfax
Case 37
getFieldValue = inv_datepurchased
Case 38
getFieldValue = CStr(CInt(inv_originalcost))
Case 39
getFieldValue = inv_spare1
Case 40
getFieldValue = CStr(CInt(inv_totalcost))
Case 41
getFieldValue = CStr(CInt(inv_nbv))
Case 42
getFieldValue = inv_assetnumber
Case 43
getFieldValue = CStr(CInt(inv_askingprice))
Case 44
getFieldValue = CStr(CInt(inv_lowestprice))
Case 45
getFieldValue = inv_recordstatus
Case 46
getFieldValue = inv_webenabled
Case 47
getFieldValue = inv_activequote
Case 48
getFieldValue = inv_historyquote
Case 49
getFieldValue = inv_invtag
Case 50
getFieldValue = inv_consignmentcode
Case 51
getFieldValue = inv_consignmentemail
Case 52
getFieldValue = inv_consignmentcontact
Case 53
getFieldValue = inv_consignmentphone
Case 54
getFieldValue = inv_consignmentfax
Case 55
getFieldValue = inv_foreigncurr
Case 56
getFieldValue = CStr(CInt(inv_conversionfactor))
Case 57
getFieldValue = CStr(CInt(inv_foreigncost))
Case 58
getFieldValue = CStr(CInt(inv_foreignnbv))
Case 59
getFieldValue = inv_edo
Case 60
getFieldValue = CStr(CInt(inv_liferemain))
Case 61
getFieldValue = CStr(CInt(inv_yearcap))
Case 62
getFieldValue = CStr(CInt(inv_taxvalue))
Case 63
getFieldValue = CStr(CInt(inv_orifreight))
Case 64
getFieldValue = CStr(CInt(inv_oriinstall))
Case 65
getFieldValue = inv_moa
Case 66
getFieldValue = CStr(inv_noupdate)
Case 67
getFieldValue = inv_webspecial
Case 68
getFieldValue = inv_transactionlocks
Case 69
getFieldValue = inv_bidlocks
Case 70
getFieldValue = inv_notes
Case 71
getFieldValue = inv_adddatetime
Case 72
getFieldValue = inv_adduser
Case 73
getFieldValue = inv_addprog
Case 74
getFieldValue = inv_lmdatetime
Case 75
getFieldValue = inv_lmuser
Case 76
getFieldValue = inv_lmprog
Case 77
getFieldValue = inv_divcode
Case 78
getFieldValue = inv_flag
Case 79
getFieldValue = inv_img
End Select
End Function
End Structure
End Module
Utility.vb
Option Explicit On
Module Utility
'Form Objects
Public g_objLogin As New frmLogin
'Global variables
Public g_Inventory_mode As String
Public g_Last_Screen As String
Public g_ItemNo As Double
'Database Constants
Public Const InvDBName = "inventory"
Public Const UsrDBName = "user"
Public Const UomDBName = "uom"
Public Const LocDBName = "location"
Public Const CommDBName = "commodity"
'Database Object
Public objData As DataBase
'FontType Variables
Public iFontHandle_DeviceDefault As Integer
Public iFontHandle_Small As Integer
Public iFontHandle_Small_Bold As Integer
Public iFontHandle_Medium As Integer
Public iFontHandle_Medium_Bold As Integer
Public iFontHandle_Large As Integer
Public iFontHandle_Large_Bold As Integer
'--------------------------------------------------------------------------------------
'Key press constants
Public Const vchrMenu = &H105 ' Menu button
Public Const vchrLaunch = &H108 ' Launch button (home key)
Public Const vchrKeyboard = &H109 ' Request to pop-up keyboard
Public Const vchrFind = &H10A ' Find button
Public Const vchrCalc = &H10B ' Calculator buttons
Public Const vchrKeyboardAlpha = &H110 ' Alpha-keyboard button
Public Const vchrKeyboardNumeric = &H111 ' Number-keyboard button
Public Const vchrHard1 = &H204 ' Leftmost hard key ' (usually Calendar)
Public Const vchrHard2 = &H205 ' Center-left hard key ' (usually PhoneBook)
Public Const vchrHard3 = &H206 ' Center-right hard key ' (usually To Do)
Public Const vchrHard4 = &H207 ' Rightmost hard key ' (usually Memo)
Public Const vchrHardPower = &H208 ' Power button
Public Const vchrHardCradle = &H209 ' Cradle button (HotSync)
Public Const vchrHardContrast = &H20B ' Contrast button
Public Const vchrHardAntenna = &H20C ' Antenna switch
'Color Constants
Public lCOLOR_HIGHLIGHT As Integer
Public lCOLOR_HIGHLIGHTTEXT As Integer
Public lCOLOR_WINDOWBKG As Integer
Public lCOLOR_WINDOWTEXT As Integer
objFrm.Show()
End Sub
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrMenu)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrLaunch)
'AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrKeyboard)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrFind)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrCalc)
'AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrKeyboardAlpha)
'AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrKeyboardNumeric)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHard1)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHard2)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHard3)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHard4)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHardPower)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHardCradle)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHardContrast)
AppForge.MobileVB.Compatibility.Device.RegisterKeyCode(vchrHardAntenna)
End Sub
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrMenu)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrLaunch)
'AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrKeyboard)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrFind)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrCalc)
'AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrKeyboardAlpha)
'AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrKeyboardNumeric)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHard1)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHard2)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHard3)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHard4)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHardPower)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHardCradle)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHardContrast)
AppForge.MobileVB.Compatibility.Device.ReleaseKeyCode(vchrHardAntenna)
End Sub
' Database Functions
Public Function OpenAllDatabase() As Boolean
'MsgBox("in open database")
Try
objData = New DataBase
objData.OpenDatabase("inventory")
objData.OpenDatabase("location")
objData.OpenDatabase("uom")
objData.OpenDatabase("commodity")
objData.OpenDatabase("user")
Return True
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information)
Return False
End Try
End Function
Try
objData.CloseDatabase("inventory")
objData.CloseDatabase("user")
objData.CloseDatabase("location")
objData.CloseDatabase("uom")
objData.CloseDatabase("commodity")
Return True
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information)
Return False
End Try
End Function
g_objMain = Nothing
g_objEqptList = Nothing
g_objLocList = Nothing
g_objConsignList = Nothing
g_objCommList = Nothing
g_objUOMList = Nothing
End Sub
#Region "Properties"
#Region "frmItemDetails"
#End Region
#Region "frmQuantity"
#End Region
#Region "frmMaterialDetails"
Private pi_strMaterialConstruct As String
Public Property MaterialConstruct() As String
Get
Return pi_strMaterialConstruct
End Get
Set(ByVal Value As String)
pi_strMaterialConstruct = Value
End Set
End Property
Private pi_strStorageLoc As String
Public Property StorageLocation() As String
Get
Return pi_strStorageLoc
End Get
Set(ByVal Value As String)
pi_strStorageLoc = Value
End Set
End Property
Private pi_strSpareParts As String
Public Property SpareParts() As String
Get
Return pi_strSpareParts
End Get
Set(ByVal Value As String)
pi_strSpareParts = Value
End Set
End Property
Private pi_strScopeRef As String
Public Property ScopeReference() As String
Get
Return pi_strScopeRef
End Get
Set(ByVal Value As String)
pi_strScopeRef = Value
End Set
End Property
Private pi_strDwags As String
Public Property Dwags() As String
Get
Return pi_strDwags
End Get
Set(ByVal Value As String)
pi_strDwags = Value
End Set
End Property
Private pi_intStatus As Integer
Public Property Status() As Integer
Get
Return pi_intStatus
End Get
Set(ByVal Value As Integer)
pi_intStatus = Value
End Set
End Property
Private pi_intWhere As Integer
Public Property Where() As Integer
Get
Return pi_intWhere
End Get
Set(ByVal Value As Integer)
pi_intWhere = Value
End Set
End Property
Private pi_intCondition As Integer
Public Property Condition() As Integer
Get
Return pi_intCondition
End Get
Set(ByVal Value As Integer)
pi_intCondition = Value
End Set
End Property
#End Region
#Region "frmManufactDetails"
Private pi_strManuf As String
Public Property Manufacturer() As String
Get
Return pi_strManuf
End Get
Set(ByVal Value As String)
pi_strManuf = Value
End Set
End Property
Private pi_strSerial As String
Public Property Serial() As String
Get
Return pi_strSerial
End Get
Set(ByVal Value As String)
pi_strSerial = Value
End Set
End Property
Private pi_intNewUsed As Integer
Public Property NewUsed() As Integer
Get
Return pi_intNewUsed
End Get
Set(ByVal Value As Integer)
pi_intNewUsed = Value
End Set
End Property
Private pi_strDimension As String
Public Property Dimension() As String
Get
Return pi_strDimension
End Get
Set(ByVal Value As String)
pi_strDimension = Value
End Set
End Property
Private pi_strParts As String
Public Property Parts() As String
Get
Return pi_strParts
End Get
Set(ByVal Value As String)
pi_strParts = Value
End Set
End Property
Private pi_strWeight As Double
Public Property Weight() As Double
Get
Return pi_strWeight
End Get
Set(ByVal Value As Double)
pi_strWeight = Value
End Set
End Property
Private pi_strMfgNo As String
Public Property MfgNo() As String
Get
Return pi_strMfgNo
End Get
Set(ByVal Value As String)
pi_strMfgNo = Value
End Set
End Property
Private pi_intDispCode As Integer
Public Property DisplayCode() As String
Get
Return pi_intDispCode
End Get
Set(ByVal Value As String)
pi_intDispCode = Value
End Set
End Property
Private pi_strLongDesc As String
Public Property LongDescription() As String
Get
Return pi_strLongDesc
End Get
Set(ByVal Value As String)
pi_strLongDesc = Value
End Set
End Property
#End Region
#Region "frmLocation"
Private pi_strLocationCode As String
Public Property LocationCode() As String
Get
Return pi_strLocationCode
End Get
Set(ByVal Value As String)
pi_strLocationCode = Value
End Set
End Property
Private pi_strLocDesc As String
Public Property LocationDecription() As String
Get
Return pi_strLocDesc
End Get
Set(ByVal Value As String)
pi_strLocDesc = Value
End Set
End Property
Private pi_strLocContact As String
Public Property LocationContact() As String
Get
Return pi_strLocContact
End Get
Set(ByVal Value As String)
pi_strLocContact = Value
End Set
End Property
Private pi_strLocPhone As String
Public Property LocationPhone() As String
Get
Return pi_strLocPhone
End Get
Set(ByVal Value As String)
pi_strLocPhone = Value
End Set
End Property
Private pi_strLocFax As String
Public Property LocationFax() As String
Get
Return pi_strLocFax
End Get
Set(ByVal Value As String)
pi_strLocFax = Value
End Set
End Property
Private pi_strLocEmail As String
Public Property LocationEmail() As String
Get
Return pi_strLocEmail
End Get
Set(ByVal Value As String)
pi_strLocEmail = Value
End Set
End Property
#End Region
#Region "frmConsignMent"
Private pi_strConsignCode As String
Public Property ConsignMentCode() As String
Get
Return pi_strConsignCode
End Get
Set(ByVal Value As String)
pi_strConsignCode = Value
End Set
End Property
Private pi_strConsignDesc As String
Public Property ConsignMentDesc() As String
Get
Return pi_strConsignDesc
End Get
Set(ByVal Value As String)
pi_strConsignDesc = Value
End Set
End Property
#End Region
#Region "frmCurrency"
Private pi_intForCurr As String
Public Property ForeignCurrency() As String
Get
Return pi_intForCurr
End Get
Set(ByVal Value As String)
pi_intForCurr = Value
End Set
End Property
Private pi_intConFact As Double
Public Property ConversionFactor() As Double
Get
Return pi_intConFact
End Get
Set(ByVal Value As Double)
pi_intConFact = Value
End Set
End Property
Private pi_intForCost As Double
Public Property ForeignCost() As Double
Get
Return pi_intForCost
End Get
Set(ByVal Value As Double)
pi_intForCost = Value
End Set
End Property
Private pi_intForeignNBV As Integer
Public Property NBV() As Integer
Get
Return pi_intForeignNBV
End Get
Set(ByVal Value As Integer)
pi_intForeignNBV = Value
End Set
End Property
Private pi_blnForCurr As Boolean
Public Property isUpdate() As Boolean
Get
Return pi_blnForCurr
End Get
Set(ByVal Value As Boolean)
pi_blnForCurr = Value
End Set
End Property
#End Region
#Region "frmCostDetails"
Private pi_dblCost As Double
Public Property OriginalCost() As Double
Get
Return pi_dblCost
End Get
Set(ByVal Value As Double)
pi_dblCost = Value
End Set
End Property
Private pi_dblTotalCost As Double
Public Property TotalCost() As Double
Get
Return pi_dblTotalCost
End Get
Set(ByVal Value As Double)
pi_dblTotalCost = Value
End Set
End Property
Private pi_dblOrgFrt As Double
Public Property OriginalFrieght() As Double
Get
Return pi_dblOrgFrt
End Get
Set(ByVal Value As Double)
pi_dblOrgFrt = Value
End Set
End Property
Private pi_dblOrgInstall As Double
Public Property OriginalInstall() As Double
Get
Return pi_dblOrgInstall
End Get
Set(ByVal Value As Double)
pi_dblOrgInstall = Value
End Set
End Property
Private pi_dblLifeRemaining As Double
Public Property LifeRemaining() As Double
Get
Return pi_dblLifeRemaining
End Get
Set(ByVal Value As Double)
pi_dblLifeRemaining = Value
End Set
End Property
Private pi_dblYeapCap As Double
Public Property YearCapital() As Double
Get
Return pi_dblYeapCap
End Get
Set(ByVal Value As Double)
pi_dblYeapCap = Value
End Set
End Property
Private pi_dblNBV As Double
Public Property ForeignNBV() As Double
Get
Return pi_dblNBV
End Get
Set(ByVal Value As Double)
pi_dblNBV = Value
End Set
End Property
Private pi_dblTaxValue As Double
Public Property TaxValue() As Double
Get
Return pi_dblTaxValue
End Get
Set(ByVal Value As Double)
pi_dblTaxValue = Value
End Set
End Property
Private pi_dblAskPrc As Double
Public Property AskingPrice() As Double
Get
Return pi_dblAskPrc
End Get
Set(ByVal Value As Double)
pi_dblAskPrc = Value
End Set
End Property
Private pi_dblLowestPrice As Double
Public Property LowestPrice() As Double
Get
Return pi_dblLowestPrice
End Get
Set(ByVal Value As Double)
pi_dblLowestPrice = Value
End Set
End Property
#End Region
#Region "Others"
Private pi_strCondition As Double
Public Property ConditionFactor() As Double
Get
Return pi_strCondition
End Get
Set(ByVal Value As Double)
pi_strCondition = Value
End Set
End Property
#End Region
#End Region
End Module
AssemblyInfo.vb
Imports System.Reflection
Imports System.Runtime.InteropServices
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("250A41AD-F8B1-4B0C-89BA-ECBBD996C2F6")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
<Assembly: AssemblyVersion("1.0.*")>
Screen Shots
The technical details are for the experts and future extenders, the other things are
always part of every project, more or less. But the part, about which a lay man, a simple user is
concerned about is this present phase; the screen shots ……..
Screen shots… How could you forget to include the screen shots of your project in
your documentation? We are programmer not poet/ writers, who can make a clear picture by
only words for what ever they see, whatever they feel. Obviously, the best presentation is that
need not to speak by its own words, but let the words be played by viewer’s mind itself. A picture
is of course have no alternate in words, that’s why I am about to present what my application
look like, what is the thing for which I feel proud for being made by me.
The first screen showing the look on the emulator. Some limitations we have gone through
The login screen in the Investment Recovery System and the message displayed after it.
In this section
√ Scope of enhancement
√ User Feed back
√ Conclusion
Scope of Enhancement
Finally it’s done and nothing remains to do something to add up in it for future, could
some one say about any project or any assignment. My project is also not extra ordinary.
According to my best knowledge, the best PDA that are available in the market are of
capacity 200 MB or more than it and I worked on just 8 MB and 16 MB devices, of course much
of the world is still remained to be explore.
More over, it is still necessary to come in the server room or to master computer for
submitting their respective entries, it is something like having an excellent staff for doing your
inventory management, but as about our goal, we want to make fully comfortable and constraint-
less. One such option lies in the very popular Blue tooth technology.
As about the Bluetooth, Bluetooth is a wireless technology that enables any electrical device to
wirelessly communicate in the 2.5 GHz ISM (license free) frequency band. It allows devices such
as mobile phones, headsets, PDA's and portable computers to communicate and send data to
each other without the need for wires or cables to link to devices together. It has been specifically
designed as a low cost, low power, radio technology, which is particularly suited to the short
range Personal Area Network (PAN) application. (It is the design focus on low cost, low size
and low power, which distinguishes it from the IEEE 802.11 wireless LAN technology).
What one can think after reading the above description about Bluetooth, why not we
should go for the Bluetooth for the sane goal? No need to have a synchronization cradle, no
need to go in a server room or sending your PDA away from your hand.
This would be an obvious enhancement toward this project. I am willing to take care of
that target but because of the time/money constraints, it was obvious to go with the things that
are available, so that is the present one.
I hope, it will attract the attention of many of my friends towards this era of application.
User Feedback
User; he is ultimate destination, where the success or failure of any product is expected
to be decided. There are a lot of examples of many expensive and highly technical projects that
failed only because of not getting user’s proper anticipation. That’s why before finalizing this
product, it was necessary to take support of a person far away from the programming side of the
project and also has a good knowledge of the system, so he can test the possibilities for which
the product could be a failure.
I asked a technical staff of the company to work with product and to find out the bugs,
of course he reported some bugs initially but that was the sign a good testing skill and it help me
a lot to find out the bugs that I left unconsciously. As my target system was Treo 650, which a
very costly stuff tats why I was constrained to the simulators of the actual product that were
available to me at that time.
So, that may be said the user feedback. Although I have not testing between a lot of
people and a lot of data as the target machine with us was of only 8 MB, but the results were
convincing to anybody that the product would work for the actual machine too, as good as it
works for the simulator.
Conclusion
Definitely I am not starting a brand new thing and there are still many successfully
running products till the date, but it was to just an attempt to utilize my capability to attract
attention of the Indian programmer in his direction. There are obvious limitations in the product
presented by me, but under provided resources, technical helps and a short scale of time, I tried
my best.
Definitely I am looking for more resources to move more into this direction and want to
make a complete product that removes the necessity of putting the PDA on the synchronization
cradle and it is not very much problematic because the target device Treo 650 is also capable of
Bluetooth based data transfer.
The product I presented is now under the investigation of the technical section of my
company to look over the future prospects for making a specialist or generalized product for the
field. I am hoping it will take a good shape in the near future that will also be better for my
carrier aspects.
I hope my efforts for going towards a costly/ unfamiliar but very useful way of
application, in the form of this project will be praised by my educational institution and I will get
a good response from the institution and the industry as well.
Bibliography
Section 6
In this section
√ Bibliography
Bibliography
Taking something entirely new as a project is always problematic as far as the availability
of resources is concerned. I tried and tried to get some good and feasible books for the topic in
India, but either that may be hardly available in India or it is not possible for me to get them in
Delhi, Allahabad or in any other nearest big city.
That’s why I got the material from the websites only and no books for the references. As
about the Microsoft Visual .Net, there are so many books but they are not in the reference of
PDAs or Crossfire 5.0, so I am not mentioning any particular books for that one. I am writing
down some websites for whom I am especially thankful for the respective owners. I am writing
them as technical references in the next paragraph:-
Technical References:-
√ www.AppForge.com
√ www.palm.com
√ www.palmOS.com
√ www.palmsource.com