Documente Academic
Documente Profesional
Documente Cultură
ENGINEERING FACULTY
CS 299
SUMMER TRAINING
REPORT
Performed at
08.06.2009 – 06.07.2009
1
Abstract:
Introduction
The name of the organization I have worked for is T.C Başbakanlık Devlet Planlama
Teşkilatı Müsteşarlığı(T.R. Prime Ministry State Planning Organization) under the
department of Yönetim Bilgi Merkezi Dairesi(The Department of Management of
Informatics). The main focus of informatics department is to provide the personal of whole
organization with the contemporary software, maintain and improve these particular
software and the network systems used in the organization. They are also responsible for
the condition of the hardware and their lending status for organization personals. The
reason we chose this organization is to gain experience at a government organization and
observe how they solve problems that require computer engineering problem solving skills.
Another reason we chose this place as our summer training is because we wanted to work
on software solutions rather than hardware technologies.
2
I have contributed to many significant parts of the Hardware Tracing System including
designing the program, extracting the flowcharts, coding the algorithms, forming the
connection of database with program, testing & debugging. The motivation behind the
effort is vastly relevant to our enthusiasm to learn new field technologies such as .Net and
Sql. The result we achieved after our hard work was nearly perfect in terms of accuracy of
what we were required to comply. Our program consists of four parts regarding the user
interface. Personal List, Hardware Wizard, Record Wizard and User loan status page. I
had influence on all of these parts especially Record Wizard, User borrowing status page
and Hardware Wizard. We had problem installing the ms Access database to the server
since we realized it was not a supported environment we had to switch to sql server. At
first I migrated the database to sql server 2008, thinking the 2005 version at the server
could handle it but it could not so I had to export the whole database to Sql server 2005.
All the problems regarding database has been resolved. In short, as an Individual I have
mainly worked on coding of these particular parts, setting up and the migration between
different database environments which I think makes me an active and a useful member of
our team. This program is particularly important because it eliminates most of the
confusing and untidy paperwork of lending unit in the organization. Not to mention the
easiness to trace all the hardware lending records.
This report follows the guideline standards: company information, detailed work done, and
conclusion.
Company information:
the informatics department in Devlet Planlama Teşkilatı is responsible for maintaining and
improving the computer technology used in the organization. Selçuk Kavasoğlu, the head
of the department introduced the technologies used in Devlet Planlama Teşkilatı.
The network system used in the organization is quite complex. The main unit is located at
8th floor, which is where informatics department is. From all 20 floors, in every 3 floors in
the building the small units connect to each other. These small units are connected to the
main unit at informatics department.
A number of servers are used in order to operate web programs, and different types of
databases. Since each technology uses different operating system, on these servers
Windows and Linux operating systems are used. For instance, .Net scripting requires
3
Windows OS whilst Php requires Linux servers.
Servers and network units, which are located at 8th floor are maintained and checked
regularly. These hardware are cooled by two professional air conditioners that does not
work simultaneously but complementing each other when one is not operational. Labris
and Kaspersky AntiVirus systems are used for security issues in the organization.
Organization use the web page “Intra” based on “.net” programming for easily accessing
and sharing information. The web page should always be up to date. According to needs
of organization, they should always write new web based programs (like Hardware Tracing
System written by us) working in servers which are linked from “Intra”. These are managed
by informatics department.
The intranet technology(Intra) is actively used by personals and the employees at the
informatics department. An intranet is a private network that uses Internet protocols to
securely share any part of an organization's information or operational systems within that
organization. The informatics department uses the intra to provide the web based
programs to the personals, introduce new software to personal publish announcements.
This page is updated regularly by the informatics department.
Lastly informatics department provides the hardware and software for employees in the
institute.
Team Members:
Supervisors:
Work Done:
The purpose of the main project is to store the registration data of the organization
personal, the hardware that organization possesses, the lending status which help the
operator of the program organize his work and borrowing status page which is built for
personal to track their loans. The general basis of the program is that the operator adds a
personal and a hardware to the system with the help of hardware wizard and personal list.
Afterwards when the hardware is lent to a particular personal the registration wizard
records these two keys. And when a particular hardware is returned the registration
allocated for the specific personal and hardware is updated accordingly.
The parts I have contributed to the project(which are obviously a significant part of the
project) are:
• Designing the workflow and database tables
• Creating and modifying the database and the migration between Ms Access, Ms Sql
Server
• Coding of Registration Wizard, Hardware Wizard, Personal List, User loan status
page
• Testing and debugging of Registration Wizard, Hardware Wizard, User loan status
page.
• Attending to the presentation of the finished work to the employees.
The work I have done is particularly significant because it occupies the backbone of the
project. I have mastered the use of Ms Access, Ms Sql Server and Visual Web Developer
5
which helped the project considerably. I am particularly responsible for the coding of
Registration wizard, hardware wizard and User loan status page.
My motivation behind the particular work that I have done is related to many factors such
as, the enthusiasm to learn new technologies(.Net, Sql Language), my responsibilities
towards team members, the will to successfully complete summer training for the sake of
organization and my responsibility to Bilkent University. The work I have done was entirely
required because it occupies most significant parts of the main project which helps the
program to work correctly.
Design:
In the summer training I have learned to design database tables. As from Figure 1-A, the
database diagram and the relationship between tables could be seen. The vertical key
images indicate that field is a primary key. Horizontal ones that end with infinite sign
indicate a relationship between two tables.
6
Figure 1 - A
For instance, in the 'kayit' table 'kid' is the primary key and 'NETWORK' and 'dno' are
foreign keys transferred through the tables 'Kullanıcı' and 'donanim' In short, a registration
entry consists of a Personal and a Hardware.
Details Of Tables:
tur(Type Table)
Figure 2 - A
This table stores all hardware types. tname field for type name. See Figure 2 - A
model(Model Table)
7
Figure 2 - B
This table stores all hardware model. mname field for type name. See Figure 2 - B
donanim(Hardware Table)
This table stores hardware information. It has Type and Model as foreign keys, dno as
primary key, serino(serial number), info,
kullanımda(isInUse),çalışır(isWorking),alinis_tarihi(date bought), garanti_bitis(date
warranty ends), firmaadi(firm name), kaldırıldı(isObsolete). See Figure 2 - B
Figure 2 - C
kullanıcı(Personal Table)
This table stores personal information. It has BIRIMKODU(departmentNo) as foreign key.
NETWORK as primary key, Id, ADI(Name), SOYADI(Surname), E_posta(eMail),
AYRILDI(has left), DAHILI_TEL(tel No) regarding personal data. See Figure 2 - D
8
Figure 2 - D
Birim(Department Table)
This table stores all departments in the organization. It has BIRIMNO(departmentNo) as
primary key, BIRIMADI(departmentName) and KISA(short DepartmentName). See Figure
2-E
Figure 2 - E
9
Kayit(Registration Table)
This table stores registrations. It has kid as primary key. Dno and NETWORK as foreign
keys from hardware and personal table. Info field is used to record any comments made
on the particular registration. verildigitarih(Date lent) and teslimtarihi(expected delivery
date) are recorded. Upon delivery, getirdigitarih(delivery date) and if the hardware is
saglam(undamaged) are recorded onto the same entry for the registration. See Figure 2 -
F
Figure 2 - F
adminTable(Admin Table)
This table stores administrator names and passwords. Id for admin,
kullanici_adi(username), sifre(password, md5 hash of original password), NETWORK are
stored in adminTable. See Figure 2 - G
Figure 2 - G
tema(Theme table)
This table stores the graphical themes of the program which are blue, green and black at
the moment. Options for determining the name of theme and current to determine the
current theme allocated for the program. If that theme is current, the current field is set to 1
otherwise 0. Figure 2 - H
10
*NETWORK field mentioned above corresponds to domain of the computer network
names allocated for each personal such as 'DPTDOMAIN\ataban',
'DPTDOMAIN\aiskender' .
Apart from modeling the database before implementation, the graphical user interface was
thoroughly discussed and sketched during design. The following section consists of the
real screenshots of the program which are nearly identical to the sketches drawn during
design process.
11
Login Screen
12
Home Page
Upon the login of Administrator, page is redirected to home page. There are 3 significant
pages, that are, Hardware wizard, Records Wizard, Personnel List. And below that admin
can select options to change the theme of the site(Which affects all administrators'
options) or change his password. The theme options operates with css classes. New
admins may only be added at database level.
13
Personal List
14
Figure 4 – B(personal adding prompt screen)
In this page admin may check the data if they are correct and select the corresponding
department and proceed or cancel the process then return to original personal list page.
15
Hardware Wizard
If Hardware wizard button is clicked, the page is redirected to the page shown in 5 – A. In
this page Admin may see all hardware that are possessed. May click the details button
near a particular hardware to see additional details.
16
Figure 5 – B(details pane)
The type and model of the hardware may be selected from a dropdown list, serial Number,
info, Date bought etc may be edited via textbox. And if the hardware is undamaged or
removed can be changed with the help of checkbox components. However The stock
number or if the hardware is in use may not be changed because the value in the table
may be related to other tables.(This topic will be covered afterwards.) Then he may
choose to apply the modifications or not. The page returns to original form(Figure 5 - B) in
either case. The administrator may want to view the removed hardware in particular by
17
changing the checkbox state above the original table. In that case only removed hardware
are shown. Apart from these he may choose to view the detailed hardware list by pressing
the corresponding button.
In that case the hardware list transforms into the one like in Figure 5-D thus enabling the
administrator to see every single detail about every hardware comprehensively.
18
Figure 5 – E (adding a new hardware)
In this menu, admin selects the type or model from the dropdown list or may add another
one.(Figure 5 – F)
After entering all data, he may confirm or cancel. If he proceeds, systems checks if the
variables are acceptable(for example, date format)
19
Record Wizard
If Record wizard button is clicked, the page is redirected to the page shown in 6 - A.
Figure 6 - A
In hardware wizard page, there are four options an administrator may select.
• Lend a hardware
• Return a hardware
• View the current records
• View the old records
20
Lend hardware
At the beginning of this stage only personal search box is visible. The personal who the
hardware will be lent to is searched by name, surname or both. (The Filtering used in this
system is dynamic, means multiple filtering may be used)
All that fits the search criteria is listed in the upper right list. After the personal is selected
the hardware search box becomes visible. Administrator may filter his search by Type,
Model, Stock Number, or Serial Number. After pressing the search button all hardware that
fits the criteria defined is listed beneath the other list. After selecting the hardware that is to
be lent, the last prompt panel appears. In which, the date information is to be
entered(these fields are optional) and if the telephone number of the personal is missing, it
may be entered too. Lastly Admin may approve the lending or cancel it.
21
If confirmed, personal and hardware information in addition to date and telephone info is
passed through cookies to a pop up page called Temporary Debt Receipt that is required
to be printed by administrator. See figure 6 – C
Figure 6 - C
In this popup window, there is nothing editable. It should be printed to be signed by the
lender and the borrower due to strict paperwork policy of organization. This paperwork
could not be eliminated because the organization yet does not have digital signature
system and does not trust lending works that are not protected by signatures..
22
Return hardware
As it can be seen in figure 6 – D, the administrator may search through the records by
personal information of Hardware information.(Again the filtering is dynamic, multiple
criteria may be used to filter the search) In figure 6 – D, there are two personal named
Ahmet who were lent Notebooks. The surname of one of them is Dincer. He is the one
who we gave the laptop in figure 6 – B. After selecting the appropriate record, the date he
has returned the hardware is entered, any objections regarding the hardware(for example
whether he contaminated the notebook with a virus) are written, and if the hardware is
23
damaged or not are entered with checkbox. Such information are not obligatory, but just
help to trace the data easier. Near that panel, detailed information about the personal and
the hardware are displayed. Below that, admin may confirm the returning or cancel. When
confirmed, the record is updated by inserting the returning date(and if it is undamaged) to
the existing record on database.
Figure 6-E illustrates the page reserved for viewing the current records. At the top, the list
consists of the records which lack the delivery date(not the expected delivery date) in
24
order to filter the records that are current. The red rows indicate that the borrower has
failed to return the hardware at time, green indicates the opposite and yellow rows are for
those that does not have expected delivery dates, which means they are lent for an
undetermined duration. Below, if the button at one of the rows are clicked the panel below
becomes visible and shows all of the details of record. Additionally, the dates are editable
and the Temporary Debt Receipt can be summoned again for printing.
25
Figure 6 - F(View the old records)
The figure 6 – F illustrates the page reserved for viewing the old records. The List above
consists of all records which does not have a null value at return date. Therefore all
records in this list are the personal who has returned their hardware. When The details
button at one of the row is clicked, the information panel below regarding the personal and
hardware info of that row becomes visible.
Apart from all of these administrator operations, an employee of the organization may login
to see his loans. The program simply matches the domain name of the employee with the
one in personal database. If the personal exists, they are given permission to view all
loans of that user. There is no password protection.
Options Panel
If the options icon is clicked the page is redirected to the one in figure 7 - A
At this stage admin may choose to change his password, change the theme of the
program, or just go back to the homepage.
Figure 7 – A(options)
26
Changing the password:
In figure 7 – B the admin is prompted to enter the old password once and the new
password twice for security. When confirmed, the database is updated.
When the employee logins as user, they may see all of their loans. In Figure 8 - B it can be
seen that I have been lent a Toshiba Notebook. If I have borrowed more that one item they
would all be listed in the view. This way, all employes are able to track what they have
borrowed and when they have to return it.
To illustrate the algorithms used, the codes of hardware wizard will be examined.
28
such as gridView, DetailsViw, FormView. These components makes everything
easier for the programmer. Since we have created a moderate sized program, we
have chiefly used these built-in components rather than primitive structures.
Visual web developer provides a complete design pane for the developer. In this
pane the visual appearance could be observed, and components may be added.
Figure 9-A
Fi
gure 9-B
Figure 9-A and Figure 9-B is the screenshot of the design pane allocated for
HardWare Wizard.
29
In Figure 9 - A, left table is GridView1, right table is FormView1, below table is
GridView2. The names have been appointed automatically by Web Developer.
Above, there are two buttons. The left one makes the pane in Figure 9-B visible,
and the right one hides GridView1 and makes GridView2 visible. The buttons below
that is used to navigate through the website. In figure 9 - A, at bottom position there
are 5 objects, these are DataSource structures that webDeveloper provides. We
have used SqlDataSource to populate the components because MsSql has been
used as database system. If we have used Ms Access, we would have used
AccessDataSources.
Figure 10 - A
30
<Columns>
<asp:CommandField ButtonType="Button" SelectText="Ayrıntılar"
ShowSelectButton="True">
<ControlStyle CssClass="donanim_control"></ControlStyle>
</asp:CommandField>
<asp:BoundField DataField="tname" HeaderText="Tür"
SortExpression="tname" />
<asp:BoundField DataField="mname" HeaderText="Model"
SortExpression="mname" />
<asp:BoundField DataField="dno" HeaderText="Demirbaş No"
ReadOnly="True" SortExpression="dno" />
<asp:BoundField DataField="serino" HeaderText="Seri No"
SortExpression="serino" />
<asp:BoundField DataField="kaldirildi" HeaderText="kaldirildi"
SortExpression="kaldirildi" Visible="False" />
</Columns>
<SelectedRowStyle CssClass="donanim_selected" />
<HeaderStyle CssClass="donanim_header" ForeColor="#f4f4f4"/>
<AlternatingRowStyle BackColor="#e1e1e1" />
</asp:GridView>
</td>
ConnectionString is the string that is used to connect the database in this case we are
getting the string from the Web.config. The following code is small section in Web.config
file that is allocated for connection string. Currently there is only one string written,
because we only connect to a single database. We can add as many connection strings as
we want using proper format.
<connectionStrings>
<add name="mydonanimtakipdbConnectionString" connectionString="Data
Source=kuvars;Initial Catalog=donanimtakipsistemiDB;User
Id=dtsuser;Password=qwertyu7;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
SelectCommand provides the string to select data entries from the database according to
some rules. In this case, ="SELECT [tname], [mname], [dno], [serino],[kaldirildi] FROM
[donanim] WHERE ([kaldirildi] = @kaldirildi)"
[tname], [mname], [dno], [serino],[kaldirildi] are selected from the [donanim] table where
kaldirildi is equal to some parameter. the "@" sign means that the following keyword is a
parameter that is to be defined. This case the parameter is not bound to the checkbox that
is used to view the hardware that are removed but when the checkbox state is changed
the Select Command alters. Which is done at the server-side scripting that .Net
environment provides.
End Sub
The code above is executed at the server not the client's browser because it is a visual
basic function.
<tr align="left">
32
<th align="right">Kullanımda:</th>
<td><asp:CheckBox ID="kullanimdaCheckBox" runat="server"
Checked='<%# Bind("kullanimda") %>' Enabled="false"/></td>
</tr>
<tr align="left">
<th align="right">Tür:</th>
<td><asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="tnameSqlDataSource" DataTextField="tname"
DataValueField="tname"
SelectedValue='<%# Bind("tname") %>'
CssClass="donanim_drop">
</asp:DropDownList></td>
</tr>
<tr align="left">
<th align="right">Model:</th>
<td><asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="mnameSqlDataSource" DataTextField="mname"
DataValueField="mname"
SelectedValue='<%# Bind("mname") %>'
CssClass="donanim_drop">
</asp:DropDownList></td>
</tr>
<tr align="left">
<th align="right">Seri No:</th>
<td><asp:TextBox ID="serinoLabel" runat="server"
CssClass="donanim_textbox" Text='<%# Bind("serino") %>' /></td>
</tr>
<tr align="left">
<th align="right">Sağlam:</th>
<td><asp:CheckBox ID="saglamCheckBox" runat="server" Checked='<
%# Bind("saglam") %>' /></td>
</tr>
<tr>
<th align="right">
Kaldırıldı:</th>
<td>
<asp:CheckBox ID="kaldirildiCheckBox" runat="server"
Checked='<%# Bind("kaldirildi") %>' />
</td>
</tr>
<tr align="left">
<th align="right">Alış Tarihi:</th>
<td><asp:TextBox ID="alinis_tarihiLabel" runat="server"
CssClass="donanim_textbox" Text='<%# Bind("alinis_tarihi", "{0:d}") %>' /></td>
</tr>
<tr align="left">
<th align="right">Garanti Bitiş Tarihi:</th>
<td><asp:TextBox ID="garanti_bitisLabel" runat="server"
CssClass="donanim_textbox" Text='<%# Bind("garanti_bitis", "{0:d}") %>' /></td>
33
</tr>
<tr align="left">
<th align="right">Alınan Firma:</th>
<td><asp:TextBox ID="firmaadiLabel" runat="server"
CssClass="donanim_textbox" Text='<%# Bind("firmaadi") %>' /></td>
</tr>
<tr>
<td></td>
<td><asp:Button ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Devam"
CssClass="donanim_control"/>
<asp:Button ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel"
Text="İptal" CssClass="donanim_control"/></td>
</tr>
</table>
</EditItemTemplate>
<ItemTemplate>
<table>
<tr align="left" valign="top">
<td width="50%"></td>
<td width="50%" align="right">
<asp:ImageButton ID="image1" runat="server"
ImageUrl="~/images/cross.png" Height="25px" Width="25px"
onclick="image1_Click" /></td>
</tr>
<tr align="left">
<th align="right">Demirbaş No:</th>
<td><asp:Label ID="dnoLabel" runat="server" Text='<%#
Eval("dno") %>' /></td>
</tr>
<tr align="left">
<th align="right">Kullanımda:</th>
<td><asp:CheckBox ID="kullanimdaCheckBox" runat="server"
Checked='<%# Bind("kullanimda") %>' Enabled="false" /></td>
</tr>
<tr align="left">
<th align="right">Tür:</th>
<td><asp:Label ID="tnameLabel" runat="server" Text='<%#
Bind("tname") %>' /></td>
</tr>
<tr align="left">
<th align="right">Model:</th>
<td><asp:Label ID="mnameLabel" runat="server" Text='<%#
Bind("mname") %>' /></td>
</tr>
<tr align="left">
<th align="right">Seri No:</th>
<td><asp:Label ID="serinoLabel" runat="server" Text='<%#
Bind("serino") %>' /></td>
</tr>
34
<td><asp:TextBox ID="TextBox1" runat="server"
CssClass="donanim_textbox" Height="60px" ReadOnly="True" Text='<%# Bind("not")
%>' TextMode="MultiLine" Width="200" ></asp:TextBox></td>
</tr>
<tr align="left">
<th align="right">Sağlam:</th>
<td><asp:CheckBox ID="saglamCheckBox" runat="server" Checked='<
%# Bind("saglam") %>' Enabled="false" /></td>
</tr>
<tr align="left">
<th align="right">
Kaldırıldı:</th>
<td>
<asp:CheckBox ID="kaldirildiCheckBox" runat="server"
Checked='<%# Bind("kaldirildi") %>'
Enabled="False" />
</td>
</tr>
<tr align="left">
<th align="right">Alış Tarihi:</th>
<td><asp:Label ID="alinis_tarihiLabel" runat="server" Text='<%#
Bind("alinis_tarihi", "{0:d}") %>' /></td>
</tr>
<tr align="left">
<th align="right">Garanti Bitiş Tarihi:</th>
<td><asp:Label ID="garanti_bitisLabel" runat="server" Text='<%#
Bind("garanti_bitis", "{0:d}") %>' /></td>
</tr>
<tr align="left">
<th align="right">Alınan Firma:</th>
<td><asp:Label ID="firmaadiLabel" runat="server" Text='<%#
Bind("firmaadi") %>' /></td>
</tr>
<tr align="left">
<td></td>
<td><asp:Button ID="EditButton" runat="server"
CausesValidation="False" CommandName="Edit" Text="Düzenle"
CssClass="donanim_control"/>
</td>
</tr>
</table>
</ItemTemplate>
<EditRowStyle BackColor="#f4f4f4" />
</asp:FormView>
There are two states of the FormView1 which are Viewing and editing. SqlDataSource4 is
used as data source. Whose code is:
35
SelectCommand="SELECT [tname], [mname], [dno], [serino], [not],
[kullanimda], [saglam], [alinis_tarihi], [garanti_bitis], [firmaadi],
[kaldirildi] FROM [donanim] WHERE ([dno] = @dno)"
Select command is simply used for Viewing and Update Command is for editing(updating).
@dno parameter is bound to the controller that is GridView1, which means when an item
is selected from GridView1 "dno" attribute is passed to the parameter so as to populate the
FormView1. The same applies for Updating. Update parameters are used to pass the
parameters in the FormView1 to the UpdateCommand string in order to update the
database.
Apart from all of these, the user may want to add a new hardware. And when adding a new
hardware new models and types may be added.
Sub eklefunc()
37
Dim v7 As DateTime
Dim v8 As DateTime
Try
v7 = Convert.ToDateTime(TarihText1.Text)
date1ok = True
Catch
AlertMsg("Hatalı Tarih")
Exit Sub
End Try
Try
v8 = Convert.ToDateTime(TarihText2.Text)
date2ok = True
Catch
AlertMsg("Hatalı Tarih")
Exit Sub
End Try
If ÜrünTürüList.SelectedItem.Text = "-Seçiniz-" Or
ÜrünModeliList.SelectedItem.Text = "-Seçiniz-" Or DemirbaşNo.Text = "" Or
SeriNo.Text = "" Then
AlertMsg("Ekleme Girişimi Başarısız")
Exit Sub
Else
Dim dbconn, dbcomm, dbinsert, sql1
dbconn = New
SqlConnection(ConfigurationManager.ConnectionStrings("mydonanimtakipdbConnection
String").ConnectionString)
dbconn.Open()
dbcomm.Parameters.Add(New SqlParameter("@alinis_tarihi",
SqlDbType.DateTime))
dbcomm.Parameters("@alinis_tarihi").Value = v7
dbcomm.Parameters.Add(New SqlParameter("@garanti_bitis",
SqlDbType.DateTime))
dbcomm.Parameters("@garanti_bitis").Value = v8
Try
dbcomm.ExecuteNonQuery()
Catch
AlertMsg("Hatalı veritabanı girişi")
Exit Sub
Finally
38
dbconn.close()
End Try
End If
GridView1.DataBind()
ekleHide()
End Sub
V1-V9 are variables to be used for parameters dbcomm sql command. Via this command,
program is able to communicate with the database and transfer it the information that are
required to add a new entry.
First of all the variables are appended the values from components. Then their validity is
checked. For example the date string is converted to formal date and applied a certain
format. If the process fails, exception occurs and process is stopped. Then, the variables
are passed to the sql parameters and the sql query is executed. If everything goes well,
GridView1 pane becomes visible, and hardware adding pane(Figure 10 - B) disappears.
There are 3 functions regarding adding new hardware models which are:
Sub updateModelList()
Dim dbconn, sql, dbcomm
Dim dbread As SqlDataReader
dbconn = New
SqlConnection(ConfigurationManager.ConnectionStrings("mydonanimtakipdbConnection
String").ConnectionString)
Try
dbconn.Open()
sql = "SELECT mname FROM model"
dbcomm = New SqlCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
ÜrünModeliList.Items.Clear()
ÜrünModeliList.Items.Add("-Seçiniz-")
While dbread.read()
ÜrünModeliList.Items.Add(dbread(0))
End While
ÜrünModeliList.Items.Add("*Yeni Model*")
dbread.Close()
dbconn.Close()
Catch
End Try
End Sub
Sub ekleModelList()
If ÜrünModeliList.SelectedItem.Value = "*Yeni Model*" Then
ÜrünModeliList.Visible = "False"
ModelBox.Visible = "True"
ModelEkle.Visible = "True"
39
ÜrünTürüList.Enabled = "False"
End If
End Sub
Sub ModelEkleButton()
Dim dbconn, dbcomm, dbinsert, sql1
dbconn = New
SqlConnection(ConfigurationManager.ConnectionStrings("mydonanimtakipdbConnection
String").ConnectionString)
dbconn.Open()
dbconn.close()
ModelBox.Text = ""
updateModelList()
ÜrünModeliList.SelectedIndex = ÜrünModeliList.Items.Count - 2
ModelEkle.Visible = "False"
ModelBox.Visible = "False"
ÜrünModeliList.Visible = "True"
ÜrünTürüList.Visible = "True"
ÜrünTürüList.Enabled = "True"
End Sub
updateModelList simply populates the model list from database. Two certain items are
always inserted into the list no matter if the database is empty. Those are ("-Seçiniz-") and
("*Yeni Model*") -Seçiniz- is a dummy item that cannot be selected as a model. And when
*Yeni Model* is selected ekleModelList fucntion is executed. A new textbox and a button
appears. When used fills in this textbox and presses the button, the new model is added to
the database and becomes ready to be used.
msg.Replace("\n", "\\n")
sb.Append("<script language='javascript'>")
sb.Append("</sc" + "ript>")
'Response.Write(sb.ToString)
40
ClientScript.RegisterClientScriptBlock(Me.GetType(), "sb", sb.ToString)
End Sub
Sub Takvimciinit1()
Dim tarihh = Date.Today
TarihText1.Text = tarihh
End Sub
At the beginning of the code of each page there is a piece of code that checks if the user is
a valid administrator.
<%
Dim USERNAME
Dim PASSWORD
Dim dbconn, sql, dbcomm
Dim dbread As SqlDataReader
dbconn = New
SqlConnection(ConfigurationManager.ConnectionStrings("mydonanimtakipdbConnection
String").ConnectionString)
dbconn.Open()
sql = "SELECT kullanici_adi,sifre FROM adminTable WHERE NETWORK = '" &
HttpContext.Current.User.Identity.Name & "'"
dbcomm = New SqlCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
If dbread.read() Then
USERNAME = dbread("kullanici_adi")
PASSWORD = dbread("sifre")
Else
Response.Redirect("unauthorized.aspx")
End If
If Request.Cookies("YBM") Is Nothing Then
Response.Redirect("unauthorized.aspx")
Else
If Request.Cookies("YBM")("USER") <> USERNAME Or Request.Cookies("YBM")
("PASS") <> PASSWORD Then
Response.Redirect("unauthorized.aspx")
End If
End If
%>
'theme
'###################################
Dim dbconn1, sql1, dbcomm1
Dim dbread1 As SqlDataReader
41
dbconn1 = New
SqlConnection(ConfigurationManager.ConnectionStrings("mydonanimtakipdbConnection
String").ConnectionString)
dbconn1.Open()
sql1 = "SELECT options FROM tema WHERE [current] = 1"
dbcomm1 = New SqlCommand(sql1, dbconn1)
dbread1 = dbcomm1.ExecuteReader()
If dbread1.read() Then
If dbread1("options") = "mavi" Then
link1.Attributes.Add("href", "./css/BlueStyle.css")
ElseIf dbread1("options") = "yeşil" Then
link1.Attributes.Add("href", "./css/GreenStyle.css")
ElseIf dbread1("options") = "siyah" Then
link1.Attributes.Add("href", "./css/BlackStyle.css")
Else
link1.Attributes.Add("href", "./css/BlueStyle.css")
End If
Else
Response.Redirect("hata.aspx")
End If
dbread1.close()
dbconn1.close()
'###################################
This piece of code regulates the theme of each page when placed in the Page_Load
function of page. The corresponding Css style is applied according to the [current] value.
There has been various testing methods and tools we have used and learned. In Visual
Web Developer 2008, I have learned to use the debugging option in the compiler and add
break point at certain lines to simplify our testing and debugging stage. However I found
Microsoft Sql Server hard to use and user unfriendly. Therefore there has been a lot of
trials and errors concerning database issues. The last week of our summer training was
generally about testing and debugging, it is because we had just been familiar with the
new .Net and Sql environment.
The initiation stage comprised acquiring the hardware and the software, their installation
etc. We have also introduced ourselves to the organization employee and acquired our
42
project goals
During the planning and designing, we have designed the database model and the general
model of our program. A lot of draft paper has been used in this process.
Implementation progress was straightforward since we have designed our project nearly
flawlessly. Thousands lines of codes has been written in this stage and was most time
consuming of all stages.
Testing and debugging consumed the last week of the summer training and was one of
most challenging parts.
After we have completed the project, it has been presented to the audience and installed
on the organization servers for active use. Currently, program runs flawlessly on the
server.
As engineer applicants, we have adopted the idea of design first and implement
later. We have applied this process to our workflow successfully. Our project was
there to deal with a real life problem. We have approached to this problem using
engineering problem solving skills. We have often interacted with the personal who
required this program and our supervisor. At the end of each week we have briefly
presented our advancements. Communication skills were maintained at greatest
degree.
I have participated to the design, development, testing and debugging utterly. I have been
in the development stage from beginning to the end. The parts I have
We had minor help from the employees. To be specific, when we had a problem
regarding asp.net coding we have referred to him. However most of the time we
were able to handle the problems ourselves. Through the summer training we have
attended to 2 seminars. One of them was a presentation of a commercial institution.
The presenters has introduced a system called "Virtual Machine from Parallels".
Since the subject is irrelevant to topic I will not cover the subject. The other seminar
43
was arranged for every other intern including us. In the seminar, the role of the
Department of Management of Informatics and a brief information about modern
informatics has been narrated. In short these seminars had no effect on our project.
Since our project is software related we have vastly used programming skills. The
information we have learned in CS 101, 102, 201, 202 has been much of use. The
designing methods we have learned in schools were really useful during summer training.
It was the first time for me to work in a real world problem with engineering basics,
however the practice I had in school like being in school project groups really helped me to
cope with problems. Apart from all of these, the things we have learned at the summer
training is incomparable to what we have learned at school. For example, we have worked
with a whole new programming language, Visual Basic. After we have realized the
similarities of VB with java or C++ it has been rather easy for us to master it. As for
Database systems, having no experience in database technologies in school or real life, I
believe what I have learned at summer training will be very useful for me both in my
44
courses and real life programs.
Our team consisted of three persons including Me, Kerem and Faruk. Kerem is an 3rd
grade undergraduate CS student at Bilkent University as me. And Faruk is a 4rd grade
CTE student at Bilkent University. At first, Faruk was the most knowledgeable among us
concerning database. So he has vastly helped us to design the database tables. We were
all unexperienced at Asp.net. As we learned new methods we have shared the information
with other participants. Faruk had withdrawn from the project about a week later resulting
Kerem and Me working on most of the project but his help about database issues was
significant. Since Kerem is a colleague I have known for more than 2 years we never had
communication problems and we overcome any conflicts. We had a live and advancing
teamwork together, both of us being enthusiastic about the summer training our team
dynamic was pretty well considering the temperature during the summer. Kerem and I
have split the duties and worked on separate parts simultaneously in a professional
manner.
The projects developed at the organization are developed using the latest
technologies with the optimal amount of budget and labor due to it being a
government institute. The end users of the projects developed are generally
personals working in the organization and used to ease and automate their work.
Therefore the global impact of the engineering solutions is not big. The personals
consult to The Department of Management of Informatics if they need a software solution
to the real world problems they have encountered. After the needs of these personal are
considered, the projects start to be developed at this department. The presentation we
attended was about the advertisement of a new technology called parallels which
promotes virtual machines.
" Parallels is committed to helping organizations reduce the cost and complexity of client
45
computing through desktop virtualization, maximize the value of IT resources through
server consolidation and simplify operations and management through IT automation."
http://www.parallels.com/eu/
The department took into account adopting this new technology to the organization
considering their resources and the solution it offers however it did not match the
needs of the organization and it was way too expensive. This was a contemporary
issue related to computer engineering.
I have learned Asp.net and Sql from scratch from many sources over the internet.
Websites:
http://www.w3schools.com/aspnet/default.asp
http://www.asp101.com/lessons/
http://www.sqlcommands.net/
Tutorials:
ASP.NET Essential Training from Lynda.com
SQL Essential Training from Lynda.com
E - books:
Wrox Press Professional ASP.NET 3.5 In C# and VB
In short, Google was our best friend that was the most helpful to gather sources.
To conclude, we created a web based program named hardware tracing system using
Asp.NET and MS Sql. It is an important project because before the installation of our
program they were tracing the hardware using paperwork and there was a high
probability that trace of a hardware could be lost. Having the paperwork automated, the
organization staff is able to lend hardware to employees properly. The motivation
behind our work effort is related to our enthusiasm to learn new field technologies. We
have developed the project according to engineering basics, Initiation, Planning and
47
Designing, Implementing, Testing and Debugging, Presentation. My own contribution to
the project is considerable since the parts I have worked on are the backbone of the
project. There has been various knowledge and skills I learned in school that I was able
to apply to real-world problems during my summer training. The project we have
developed is a result of a successful teamwork. We have aided each other during
summer training whenever we encountered a problem. There were also several
seminars and presentations we attended at the organization. Economic, environmental,
societal and global impact of the engineering solutions in the projects developed at
your company were examined. During summer training I have done a lot of self
learning, most of our sources were found on the internet. There has been a lot of new
tools and technologies that we encountered and used during the summer training. In
short, the summer training that I have done was beyond useful.
48