Thursday, July 30, 2009

Production Program


I remember before I used to work in this Agricultural Company, I developed a simple application with their Inventory on Packaging Materials. Here's the screenshot of the program.

It was designed using a 3-tier application design. The report was done using Business Objects Crystal Report designer. This is with Login and Logout system.

If you want to download the source code in both VB.Net and C# follow this link - http://www.planet-source-code.com/vb/scripts/showcode.asp?txtCodeId=7381&lngWid=10

Wednesday, July 29, 2009

What is LINQ?

LINQ, or Language-Integrated Query, lets you query data using Visual Basic Language.

Some of the Visual Basic keywords for working with LINQ:

Keyword - From which identifies the source of data for the query, Where which provides a condition that specifies which elements are retrieved from the datasource, Order By which indicates how the elements that are returned by the query are sorted, Select which specifies the content of the returned elements, Group By which groups the elements by one or more data items and lets you perform aggregate functions on the groups, and Join which combines data from two data soures.

A LINQ query that retrieves key values from a sorted list

The employee sales sorted list

Dim employeeSales As New SortedList(Of String, Decimal)
employeeSales.Add("Gabriel", 1286.45D)
employeeSales.Add("de Jesus", 2433.49D)
employeeSales.Add("Quirit", 2893.85D)
employeeSales.Add("Velasco", 2094.53D)

A query expression that selects the employee names from the list

Dim employeeList = From sales In employeeSales_
Where sales.Value > 2000 _
Order By sales.Value Descending _
Select sales.Key

Code that excutes the query

Dim employeeDisplay As String = ""
For Each employee In employeeList
employeeDisplay &= employee & vbCrLf
Next
MessageBox.Show(employeeDisplay, "Sorted Employees With Sales Over $2000")

The output would be:

Quirit
de Jesus
Velasco

Sunday, July 26, 2009

Develop Software For Symbian OS

For software developers out there, if you want to develop applications for Symbian OS using your existing skills in Microsoft .Net, try Net60 of www.redfivelabs.com. With this, you can design application in .Net and run it in Symbian OS like Nokia Cellphones, etc.

Saturday, July 25, 2009

.Net For Linux

I've been waiting for this time for the release of MonoDevelop on Windows. MonoDevelop has been stable for a while now in the Linux OS.

For visitors not familiar with MonoDevelop, it is an IDE for developing desktop and web application using C#, VB.Net and other programming language. It runs on top of its own .Net opensource framework called Mono. Check this link for the IDE - http://www.monodevelop.com and the framework here - http://www.mono-project.com.

This is good news for us Microsoft .Net Developers since we are accustomed to our preferred language in .Net and we don't have to start from scratch when we migrate our software development skills in Linux or Mac since we already have Mono and MonoDevelop on our side. This is backed by a company called Novell, the company behind Suse Linux.

Monday, July 20, 2009

Problem with my ASP.Net Image Control

If anyone can help, please advice. I have an image control in ASP.Net and a File Upload Control. After Uploading the file successfully, the image control won't display the uploaded photo. Below is the code for the Upload Button:

Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
Dim dbAccess As DataAccess = New DataAccess
Dim con As SqlConnection = New SqlConnection(dbAccess.ConnectionString)
Dim sizeLimit As Integer = 150000 'Size limit of Photo is only 15KB
Dim saveDir As String = "Images\JobSeeker_Photos\"
Dim appPath As String = Request.PhysicalApplicationPath
Dim path As String = appPath + saveDir + fuPhoto.FileName
If fuPhoto.HasFile Then
If fuPhoto.PostedFile.ContentLength <= sizeLimit Then
fuPhoto.SaveAs(path)
lblUpload.Text = "File uploaded successfully!"
imgPhoto.ImageUrl = path
Else
lblUpload.Text = "File exceeds file limit! Photo size limit is up to 15KB only. Please edit the size of your photo."
End If
End If
End Sub

Thursday, July 9, 2009

Link of The Sales Program Database

Here is the link of the Sales Monitoring System Database. You can attached the database to your SQL Server 2000 and change the connection string from the app.config file in the Visual Studio Project to connect to the database. Change the SERVER NAME to the name of your server in the app.config of the SalesProgram project.

Good luck!!

Link: - http://www.mediafire.com/?tszjewjuvul

Monday, July 6, 2009

My Sales Program in C#


This is the converted version of my Sales Program in C# language. This was designed in VS.Net 2005 with SQL Server 2000 as backend. Source code is available upon request. You can email me at vincepogs@yahoo.com. Or you can download directly on this link http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7347&lngWId=10&txtForceRefresh=8220096291192185