Showing posts with label ITA - (207). Show all posts
Showing posts with label ITA - (207). Show all posts

Wednesday, June 15, 2011

Ebook Linker Down - Source CODE Released !!!

 During the last examination period at SLIIT, the Ebook sharing website (Thariya's Ebook Linker) which I designed was very much helpful for me and for my friends to share the learning resources we had. I received so many good comments for developing that from my friends as well as my lecturers at SLIIT. 

It was successfully hosted at http://tharindu.somee.com but after two or three weeks I got to know that the website was not working properly. The reason was the deletion of the database from the server. I guess it was done by the site administrators at somee.com and I can't blame them since it's a free hosting service. Maybe they received complains from the book authors for violating copy rights.

I have no intention of running the site by uploading a database to the server. Therefore I thought of sharing the source code of the website with you. It was developed using Microsoft Visual Studio 2008, .NET framework 3.5, ASP.NET and C# as the programming language. 

This will be useful for 1st year students at SLIIT for the ITA group project.


The database is also included in the Zip file. You have to attach the database to the MS SQL server on your PC when running the website. (Read this post for more information

Then open the project in Microsoft Visual Studio. You need to modify the web.config file with your MS SQL server name. In my PC it is (local). Replace (local) with your server name.

If you don't know the server name, you can open the Microsoft SQL Server Management Studio and the Server Name will appear as shown in the image below.
If you have any problem regarding the source code, just drop me a message via the contact me page.

-Tharindu Edirisinghe-
-SLIIT 10-

Tuesday, March 8, 2011

ITA Group Project - Part V

If you couldn't read the previous posts of this series, first read them. Part I, Part II, Part III, Part IV.

Fortunately 12 Lab II had plug bases under the computers (In some other labs they were sealed I guess) and all of them were occupied. I shutdown a PC in the lab and plugged my laptop there. We had to hurry up because we were only given 5 minutes to get prepared. I asked Sasika to turn his laptop on and give me a copy of the home page he designed for the website. I hurried up to paste it in the project and integrated them. Then I gave an introduction to Mezaj and Sajee what we should do and did a quick demonstration.
(Mezaj and myself..... Planning something serious !!!)

(Dasun and Sajee..... Watching me working I guess :D)

Then we plugged the projector to my laptop and I started presenting our project. I demonstrated the user levels of the website and then showed how to register a new customer. The validation was also working perfectly. Then I showed how to login to the website. Also I showed how to recover the password using the security question and how to modify the account details without letting Ms. Isuri ask even a single question. I think she was extremely satisfied with the workability of our solution. 

Then Sasika described and showed how to make a reservation using the website and the functionality of the shopping cart feature. Then Mezaj showed how the data of the extra facilities of our apartment reservation system are generated and loaded into the grid view of the web page. He also described the functionality of the Contact Us page. Then Sajee expressed the difference between the dynamically generated pages and the statically designed pages using the About Us page.

Unfortunately the Searching function was not working correctly but other than that all the other features , functionality and the interfaces of the website were relatively at a higher level when compared to the work done by other groups.
(Sasika in a lab session of ITA. The Interface designer of the project)

After doing the presentation, we uploaded the source code to the course web. Then I went home and had a long sleep as I couldn't have for over four days.

P.S - The successful completion of the project and the presentation led me to get an 'A' for the ITA subject from the 2nd semester exam of the 1st year.  I further developed the website during the vacation and hosted it on a free server. You can visit it from http://teamss.somee.com. This is the end of this series of posts. Finally let me tell you one thing. Always try to be the guy who saves the day. Even when the other group members go down, you must be able to do the whole thing and save your GPA.

(Every single coding came from my head)


Extract the downloaded zip file. Then you'll get a folder and inside that there are two folders. One of them contains the MS SQL database and the log file. Read this post and paste the database and the log file where your other databases are stored in your PC and attach the database.
The other folder contains the web pages. Edit the web.config file by modifying the connection string.

my connection string : Data Source=YASIRU-PC;Initial Catalog=ssbooks;Integrated Security=True

Instead of 'YASIRU-PC', put your SQL server name there. Then build the project and run. You have to run the 'Default.aspx' page and unless it will redirect you to the error page since I have created and managed the sessions in the Default page.

-Tharindu Edirisinghe-
-SLIIT 10'-

Sunday, March 6, 2011

ITA Group Project - Part IV

If you couldn't read the previous posts of this series, first read them. Part I, Part II, Part III.

Before sleeping, I set the alarm to 5.00 A.M because I knew that otherwise I wouldn't be able to finish the project before delivering the presentation. After two hours the alarm was ringing. I got up with a terrible headache and despite all the pains, I was struggling to save 10 marks from the final result of ITA subject. Sasika was still sleeping and I wasn't bothered to wake him up because I was determined to complete the rest on my own.

(This is the Apartments page where the data are dynamically generated and displayed)
 (This is the Extra Facilities page of the website. Here also the data is dynamically generated and displayed)
The continuous work over three days affected me very badly and I felt like I was undergoing through a short term memory loss. I felt that I was looking at the screen of my laptop without figuring out what to do next. Somehow I was able to finish it at 7.00 A.M. My father came to pick me up and I went home to get ready to leave for SLIIT. Still the home page was not integrated to the website because it was designed in Sasika's PC.

I reached SLIIT around 8.00 A.M and Dasun telephoned me suddenly. He told me that he was suffering from fever and was unable to come for the presentation. I had nothing to say except scolding him. I was the one who worked continuously and finished the stuff then and he was the one who got fever !

I waited at the 12 common room until the other group members came. While waiting, I helped other groups who sought my help in finishing the projects. We were supposed to deliver the presentation at 9.00 A.M. Around 8.50 A.M, Mezaj and Sajee came. Still they had no idea about the project whether it is completed or not. I couldn't show it to them because my laptop battery was ruined then and I couldn't turn on my laptop without giving the power supply. Then we went to the 12 Lab II and waited for the arrival of Sasika. Then I found all the other groups were trying to export their projects to the computers in the lab and they told that we were supposed to do the presentation using a computer in the lab.


The whole project, database, coding and the web pages were lying in my laptop and I knew that it was impossible to port our project to a computer at lab. The reason was first I created the database by writing SQL scripts and later I did a lot of modifications to the data tables without keeping track of the SQL scripts. Other thing was when entering data to database, I used the GUI of SQL Server which comes inbuilt with MS SQL Server where I had just to type or copy and paste data on the virtual data tables.
(When we were doing the project, I didn't know how to copy a MS SQL data base from one computer to another directly and even if I knew it, we wouldn't be able to use it in a computer in the lab without having administrative privileges over the SQL Server).

Ms. Isuri was there to inspect the presentations and the first group started delivering their presentation. They had designed nice interfaces but the functionality wasn't there. The user logins were not working and registering customers was also not working. Then I realized what a great project we ( I ) had done with all the functionality and attractive interfaces. Sasika came around 9.30 A.M and we were the group to deliver the presentation next. I asked Ms. Isuri whether we could use my laptop and she told that it was alright giving me a great relief.

To be continued ...

Read the Part V of this series of posts.

-Tharindu Edirisinghe-
-SLIIT 10-

Thursday, March 3, 2011

ITA Group Project - Part III

Read the Part I and Part II of this post, if you couldn't read yet.


31st October 2010


I went to Sasika's place early in the morning. We integrated what we had developed so far with the interfaces that Sasika had developed. The functions to Search apartments, Display user account details and modify, Reserve and cancel reservations were not yet written then. Details of the apartments were also not yet added to the database then. Sasika kept on working with designing the interfaces and I was writing functions one by one. Mezaj, Sajee and Dasun came around 9.30 A.M. We were running out of time.

Since I was the group leader, it was my responsibility to manage the project. With the tight deadline, it was a daunting task to do. So we discussed about what is left to do and Mezaj, Sajee and Dasun started writing the descriptions for the apartments and typing them. It was a great relief for me because we had  to insert more than 50 records of apartment descriptions to the database.

After having lunch, I got a terrible headache. I think it was because of the continuous work for nearly 7 hours and due to lack of sleep in previous day. So I slept for a while letting others do the work. I think I slept for an hour and when I got up, I thought others had finished entering data to the database. To my utter surprise, they all were listening to music and doing some other work. Even Sasika was designing some graphics for some other group project which a friend of him had asked to do. I was really disappointed and helpless because it was the last day to complete the project and the next day we were supposed to do the presentation regarding the project. 

With my arrival they started the work again and around 4.30 P.M they finished typing all the records of the apartments. Since the programming part and the interface designing was left to do I asked Mezaj, Sajee and Dasun to go home and come to SLIIT next day in the morning. Everything was on my shoulders then. Sasika and I worked together till the mid night. He was sneezing and caught a cold. So finally I asked him to get some rest and he went to sleep. I was in a dire need to have some rest and my eyes were burning. I closed my eyes and kept on coding because I was perfect in typing.

Around 3.00 A.M, I could finish the major tasks of the website and there was only one function to be written. That was showing details of customer account and modifying them. I stopped work to get some sleep because I felt I was not well. 

To be continued.....

-Tharindu Edirisinghe-
-SLIIT 10'-

Monday, February 28, 2011

ITA Group Project - Part II

If you have not yet read the previous post, first read it. 

29th October 2010

After finishing the lab sheet, I built some web pages with basic interfaces and connected it with the database. I wrote some functions to register customers, to check the login username and password and redirect the user to another web page, if the user name and password matched. It worked successfully. Although these user login functions come in-built with Visual Studio ASP.NET, I had no previous experience in using them. Therefore I thought it would be better to write our own functions so that we know exactly  how they work and we know how to modify them whenever necessary. The other thing was more than learning new things, we had to do something because the deadline was tight. I kept on working and decided to meet other group members next day.

I called Sasika to know about the progress in designing the master page but he had not finished it then. I asked him to come to SLIIT next day but he told me that he was having some important work to do and would not be comming. ( Later on I got to know that important work was a date with a girl  :D )

Therefore I decided not to go to SLIIT next day and I told others to continue writing details of the apartments which we were going to include in the website.

30th October 2010

We all got together at Sasika's place. He had almost finished designing the master page. Others had brought the photos of apartments and we discussed about the features we should add to the website. While Sasika was resizing the photos to add to our website, I added web pages to the master page and showed them how I had managed to provide database connection. For three or four hours we kept on working and ended up with so many bugs in the project. I was confused then and thought that I should go through each coding from the beginning. So I came home and tried to find mistakes. I tried to find help from online forums and finally I could correct all the bugs. From those forums, I learned about the 'On row command' in the Grid View and I used it to generate buttons dynamically to add the apartments to the cart.By that time I understood that I should do more and more work because there was only one day left to meet the deadline. I continued my work and slept only for three hours that night.
(This is the Home Page of the website. Credit should go to Sasika for designing nice interfaces.)
You may think that without doing everything on my own, I should have given the work to others also. Yes you are correct, but what if others are not good in programming ??? If I told a group member to write a function to accept certain inputs and give a specified output, would he be able to do it? In my case, the answer was 'NO'. Although Sasika was good in programming he had a lot to do, designing the interfaces and graphics in the website.


-Tharindu Edirisinghe-
-SLIIT 10'-

Saturday, February 26, 2011

ITA Group Project - Part I

When we were in the 2nd semester of the first year at SLIIT, we had to develop a web site for the Internet Technology and Applications (ITA) subject as an assignment. The important thing was 10% of the final marks for that subject was given for this assignment. So it was really important to do the assignment well and score high marks because every single point counts for the GPA. From this series of posts, I'll tell you how we did the project.

For the DBMS I subject we had a group assignment to develop a database in Microsoft SQL Server according to the selected topic and for this ITA assignment, we had to build a website and connect it with the database we had developed. The group members had to be the same for both the assignments. The topic we selected was 'Apartment Reservation System'. The group members were Sasika (SS), Mezaj, Dasun, Sajee and I was the group leader. 

From left to right -  myself, Sasika, Mezaj and Dasun.

It was scheduled to finish the assignments before the final exams but due to various reasons the deadline for the presentation was postponed to November 1st 2010. Since I was the group leader, I decided not to start the project until the final exams were over because I thought it would be better to concentrate more on the final exam. We had the last exam paper on 27th October and I'll start the story from then. 

27th October 2010

We had the DCCN I paper in the morning. After the exam, all the group members got together and I asked them to be prepared to do what ever I tell them and to come when ever I call them because we had few days  left to complete the project. I didn't know how to implement the solution as my knowledge in web developing  in  ASP.NET using C# was at a low level at that time because we had limited number of practicals in ASP.NET.

I went home and went through the requirements of the website to be developed. They were as following.
  • Three types of users for the website - Admin, Registered user, Visitor
  • Provide user login, password recovery, account modification
  • Dynamically generate data on the web pages from the database
  • Shopping cart feature for products (add to cart, remove from cart, show total products, show the total payment)
  • Make reservations and cancel when necessary.
  • Search option
  • Contact us page
  • About us page
Then I realized that before starting the project, I should improve my programming and web development skills in ASP.NET C# and to be familiar with Visual Studio as it was the IDE we were supposed to use for the project. 

I had a video tutorial series in 'ASP.NET Web Development Essentials' (from Lynda) which Tharinda (a fellow student at SLIIT) gave me. So I started watching it and did the practicals in that. It gave me the essential skills to develop the website.

28th October 2010

I asked all the group members to come to SLIIT in the morning and unlike in ST I Assignment everybody came on time. First we discussed about the project and drew a plan develop the solution. What I realized was that we should design the master page of the website first and so I gave it to Sasika as he was good in graphic designing. I asked Mesaj, Sajee and Dasun to visit the Online apartment reservation websites and study the features they had and also to download images of apartments so that we could use them in our website. The database we developed for the DBMS I assignments was not matching with the requirements of the website so that I decided to build a new database for the assignment.I gave the video tutorials to them so that they also could get familiar with ASP.NET.

I went home and started building the database. First I added tables to store customer account details and apartment details. Then the next problem was how to access the database from the website. We had only one practical lab session on that and I could not even finish the lab sheet correctly.  So I started doing the lab sheet and tried to learn how to provide the database connection through a website.


I went through all the coding given in the lab sheet and did the practical. From that I learned how to Insert data to database and to Update, Delete, Retrieve data in the database using the website. 

To be continued......

Read the Part II of this series.

-Tharindu Edirisinghe-
-SLIIT 10'-

Saturday, December 11, 2010

A website using basic HTML and CSS

During a lab session of ITA subject at SLIIT, we were asked to create a website for a bank. We were given basic instructions and it was a group activity.



We used Macromedia Dream Weaver when developing the website. We had to manually code some parts of the website as the instructors were counting on that.

The technical stuff in the website

  • Linking pages.
  • Using images.
  • Basic CSS styles.
  • Use tables to represent data.
  • Ordered and Unordered Lists.
  • Change font colors and size.
  • Design a form including text boxes, radio buttons and tick boxes.
  • The consistency of website.


Click Here to visit the website we designed.

Click Here to download the source code (173.06 KB).

-Tharindu Edirisinghe-
-SLIIT 10'-

Monday, December 6, 2010

How to copy a Microsoft SQL Server Database to another computer ?

From this post, I'll show you how to copy a MS SQL Database in one computer to another with an example.

When you go to the Microsoft SQL Server Management Studio, it shows all the databases.

As you see in the above image, I have a database called ITA. I'll show you how to copy that.

All the databases are stored in the following location by default in your computer. 

Local Disk (C:) -> Program Files -> Microsoft SQL Server -> MSSQL10.MSSQLSERVER -> MSSQL -> DATA

(If you have changed the location when you installed MS SQL Server, go to that location.)
You need to have administrator privileges to access that location.


When you go there, as in the above image, it shows all the databases.

For each database, there are two files as in the image below.
Now I'm going to copy the database named 'ITA' . Right Click on the two files and select 'Copy'.
Go to the location where you want to paste them (eg: your Pen Drive), right click on the window and click 'Paste'.

Then the following Dialog Box appears. 
It says that I need to provide administrator permission to copy the files. Since I have, I'll click 'Continue'. 
OOPS !!! What happened ? It says that the database is opened in SQL Server so that I cannot copy it. So before copying the database, I have to detach the database from the MS SQL Server.


As in the above image, go to MS SQL Server Management Studio. In the Object Explorer, in the Databases folder, it shows all the databases. Right Click on the database you want to Detach, select 'Tasks' and select 'Detach'. Then the following window appears.
Press 'OK'.
Then your database will not appear under the databases list in MS SQL Server Management Studio. In the below image, my 'ITA' database is not appearing now.
 Then go to the location where databases are stores. 

Now you see a small padlock symbol near the database files I detached. Right Click on them, select 'Copy', and 'Paste' them in the location you want to copy them. Using a Pen Drive, you can copy them to another computer. 

After copying the files, you need to Attach the Detached files. Go to MS SQL Server Management Studio. Right Click on the Databases folder and select 'Attach'.

Then the following window appears.


Click on the 'Add' button. Then it'll show all the databases.




Select the particular database and press 'OK'.Then the following window appears.



Press 'OK'.

Now the Databases folder shows my database. 

Now you have copied the database files to your pen drive. In the other computer, paste them in the location where databases are stored. Then open MS SQL Server Management Studio and 'Attach' the pasted database as I described earlier.

-Tharindu Edirisinghe-
-SLIIT 10'-