MONO-ANDROID EMPLOYEE TIME-OFF MOBILE SERVICE

snortfearServers

Dec 4, 2013 (3 years and 11 months ago)

88 views






MONO
-
ANDROID

EMPLOYEE TIME
-
OFF MOBILE SERVICE








A
Project




Presented to the faculty of
the

D
epartment of Computer Science

California State University, Sacramento




Submitted
in

partial

satisfaction of


the
r
equirements for the degree

of




MASTER OF SCIENCE



in



Computer Science









b
y


Komal Chopra



SPRING

2
0
13


ii









































© 2013


Komal Chopra

ALL RIGHTS
RESERVED


iii





MONO
-
ANDROID
EMPLOYEE TIME
-
OFF MOBILE SERVICE






A
Project



by



Komal Chopra












Approved by:


__________________________________,

Committee Chair

Dr. Jinsong Ouyang




__________________________________, Second Reader

Dr.

Mary Jane Lee



____________________________

Date






iv














Student:
Komal Chopra



I certify that this student has met the requirements for format contained in the University format
manual, and that this
project

is suitable for shelving in the Library and c
redit is to be awarded for
the project
.





________
__________________,
Graduate Coordinator

___________________

Dr. Behnam Arad







Date









Department of
Computer Science



v








Abstract


of


MONO
-
ANDROID
EMPLOYEE TIME
-
OFF MOBILE SERVICE




by


Komal Chopra




The

objective

of
the

project

is

to
develop

the
Employee Time
-
Off A
ndroid mobile
service

that
enables

an
E
mployee

to

submit

leave of absence

remotely
. In addition,

the
a
pplication
enable
s
a

S
upervisor to

approve

or not

approve
a

leave

of
absence
. Further,
t
he a
pplication

keep a

record
of
each

request and status of leave

within
the

company
’s
database
and generates

leave of absence tracking reports
for

an
Employee and
Superv
isor
using Android

mobile devices
.

The

n
-
tier Service Oriented Architecture based Mono
-
Android
application

is

created

for

E
mployees

and

S
upervisor
s

to
track

an
E
mployee
’s
leave

of
absence
.
The

functionalities
provided

for

an
E
mployee

are

Submit Leave of Absence, Track
monthly

Leave Status
and

Leave Report
generation

on a
timely

basis
.
The

functionalities
provided

f
o
r

a
supervisor

are

Leave Approval
and

Employee’s

Leave Report
generation

on a
vi




timely

basis
.

Further

extension

of
the

project

includes

service

to
cloud

system
;

i
n
addition,

the

service

can
integrate

available

clouds

and
can
extend to

cross
-
platform
application
.


_______________________, Committee Chair

Dr. Jinsong Ouyang



_______________________

Date



vii





ACKNOWLEDGEMENTS



I would
like

to
thank

to Dr.
Jinsong

Ouyang, my
project

advisor;
for

giving

me an
opportunity

to
work

with him on
the

latest

technology. I
appreciate

his feedback
and

patience

throughout
the

project
. His
support

and

encouragement

has
helped

me in
completing

this

project

successfully
. I would

also

like

to
thank

Dr. Mary Jane Lee
for

being

the

second

reader

in
this

project
.
Lastly
, I would
like

to
thank

all
the

people

who

have

directly

or

indirectly

supported

me on my
project
.

viii




TABLE OF CONTENTS











Page


Acknowledgments
................................
................................
................................
......


vii

List of
Figures

................................
................................
................................
.............


xi

Chapter

1. INTRODUCTION

................................
................................
................................
....
1



1.1
Problem Statement

................................
................................
......................

1

2
.
SYSTEM REQUIREMENTS

................................
................................
..................
2



2
.1
S
ystem Requirements
................................
................................
...................
2




2
.1.1
Operating Environment

................................
................................

2




2
.1.2
Web
-
Service

................................
................................
.................

2




2.1.3

.Net Framework

................................
................................
...........

3




2.1.4

Database

................................
................................
.......................

3



2
.2
Functional
Requirements

................................
................................
.............
3




2.2
.1
Users

................................
................................
............................

3




2.2
.2
Roles

................................
................................
............................

4




2.2.3

Functionalities

................................
................................
..............

4




2.2.4

Assumptions and Dependenci
es

................................
..................

4



2
.3 Employee Interface Process

................................
................................
.........
5




2.3
.1
Leave Submission

................................
................................
........

6




2.3
.2
Leave Status

................................
................................
.................

8




2.3.3

Employee Report

................................
................................
.......

10



2.4
Supervisor Interface Process

................................
................................
......
13




2.4
.1
Request Leave

................................
................................
............

14




2.4
.2
Supervisor Report

................................
................................
......

18

ix




3
.

SYSTEM ARCHITECTURE

................................
................................
................
22



3
.1
Overview on

Mono
-
Android Technology

................................
.................
2
2




3.1
.1
Android Background

................................
................................
..

2
2




3.1
.2
Android Architecture

................................
................................
.

2
2




3.1.3

Mono for
Android

................................
................................
......

2
3



3.2

Overview on

Cross Platform Technology
................................
..................
2
4



3.3

Overview on Service Oriented Architecture

................................
.............

2
5




3.3.1

Restful Web
-
Service

................................
................................
..

25




3.3.2

SOAP Web
-
Service

................................
................................
...

2
5



3.4

Overview on

Project Architecture

................................
.............................
2
6



3.5

Component Design
................................
................................
.....................
2
7




3.5.
1

Insert Leave

................................
................................
................

2
7




3.5.2

Leave Status

................................
................................
...............

2
8




3.5.3

Leave Report

................................
................................
..............

32




3.5.4

Supervisor Leave Approval

................................
.......................

36




3.5
.5

Supervisor Employee Leave Report

................................
..........

41



3.6

Overview on

Database Design

................................
................................
...
46

4
.

SYSTEM IMPLEMENTATION

................................
................................
...........
48



4
.1
Interface Design

................................
................................
.........................
48




4
.1
.1
Login Interface

................................
................................
...........

48




4
.1
.2
Employee Menu Interface

................................
..........................

49




4
.1.3

Insert Leave Interface

................................
................................

50




4.1.4

Leave Status Interface

................................
................................

55




4.1.5

Employee Leave List Interface

................................
..................

56




4.1.6

Employee Leave Detail Interface

................................
...............

58




4.1.7

Employee Report

Interface

................................
........................

59




4.1.8

Employee Date Report

Interface

................................
................

60

x







4.1.9


Employee Week Report

Interface

................................
............

62




4.1.10

Employee Month Report

Interface

................................
...........

63




4.1.11

Employee
Quarter Report

Interface

................................
.........

64




4.1.12

Employee Yearly Report

Interface

................................
..........

65




4.1.
13

Employee Report
List
Interface

................................
...............

66




4.1.
14

Supervisor Menu

Interface

................................
.......................

70




4.1.
15

Supervisor Leave

Request

Interface

................................
........

72




4.1.
16

Supervisor Urgent Leave Selection

Interface

..........................

73




4.1.
17

Supervisor Leave Approval

Interface

................................
......

76




4.1.
18

Supervisor Leave Dis
-
Approval

Interface

..............................

78




4.1.19

Supervisor Employee Report
Interface

................................
....

79




4.1.20

Supervisor Employee Report List
Interface

.............................

82

5
.

SUMMARY AND FUTURE WORK

................................
................................
...
84

Appendix A
. Initial Steps of Development

................................
...............................

85

Bibliography

................................
................................
................................
................
93





xi





LIST OF FIGURES

Figures

Page



1.

Use
-
Case Diagram of Employee Module

................................
...........................

6

2.

Flow Chart

of Insert Leave Functionality

................................
...........................

7

3.

Sequ
ence Diagram of Insert Leave

Functionality

................................
..............


8

4.

Flow Chart

of Leave Status Functionality

................................
..........................

9

5.

Sequence Diagram of Leave Status Functionality

................................
............

10

6.

F
low Chart

of Employee Report

................................
................................
.......

12

7.

Sequence Diagram of Employee Leave Report Functionality

..........................

13

8.

Use
-
Case

Diagram of Supervisor Module

................................
........................

14

9.

Flow Chart

o
f Pending Leave Functionality

................................
.....................

16

10.

Flow Chart

of Urgent Leave Functionality

................................
.......................

17

11.

Sequence Diagram of Supervisor Leav
e Approval

................................
...........

18

12.

Flow Chart

of Employee Report Functionality

................................
.................

20

13.

Sequence Diagram of Employee Leave Report Functionality

.........................


21

14.

Cross Platform Architecture

................................
................................
.............

24

15.

Component Diagram of Insert Leave Interface

................................
................

27

16.

Component Diagram of Accrued Leave Interface

................................
............

28

17.

Component

Diagram of Insert Leave Detail

................................
.....................

28

18.

Component Diagram of Leave Stat
us Selection Menu

................................
.....

29

19.

Component Diagram of Leave Status

Selection Menu Functionality

..............

30

20.

Component

Diagram of Leave Status Menu

................................
.....................

30

21.

Component Diagram of Leave Status Interface

................................
................

3
1

xii




22.

Component
Diagram of Leave Status Functionality

................................
.........

31

23.

Component Diagram of Employee Report Interface

................................
.......


32

24.

Component Diagram of Employee Report Menu

................................
.............

33

25.

Component D
iagram of Leave
-
Lookup Selection Menu

................................
..

34

26.

Component Di
agram of Leave
-
Lookup Interface

................................
.............

35

27.

Componen
t Diagram of

Employee Leave
-
Lookup Functionality

....................

35

28.

Compon
ent Diagram of Pending Leave Interface

................................
............

37

29.

Compon
e
nt Diagram o
f Pending Leave Functionality

................................
.....

38

30.

Component Diagram of Pending L
eave Interface

................................
............

38

31.

Component Diagram of Employee Leave Approval

................................
.......


39

32.

Component Diagram
of Employee Leave Detail

................................
..............

39

33.

Component Diagram of

Employee

Leave Approval Functionality

..................

40

34.

Component Diagram of Leave Update Interface

................................
..............

40

35.

Component Diagram of Urgent Leave Interface

................................
..............

41

36.

Component Diagram
of Urgent Leave Fun
ctionality

................................
.......

41

37.

Component Di
agram of
Leave Selection Menu
................................
................

42

38.

Component Diagram of Leave

Selection Menu Functionality

.........................

43

39.

Component Diagram of Employee Leave Report

................................
.............

44

40.

Component Diagram of Employee Leave Report Functionality

......................

45

41.

Component Diagram of

Employee

Leave Interface Functionality

...................

45

42.

Comp
onent Diagram
of
Employ
ee Leave Detail Functionality

.......................

46

43.

Database

Design
................................
................................
................................

47

44.

Interface Design of Login Functionality

................................
...........................

48

45.

Login API code

................................
................................
................................
.

49

46.

Interface Design o
f Employee Menu Functionality

................................
..........

50

47.

Interface Design of
Insert Leave Functionality

................................
................

51

48.

LeaveData API code

................................
................................
.........................

52

xiii




49.

LeaveInsert API code

................................
................................
........................

52

50.

LeaveInsert Service

................................
................................
...........................

53

51.

LeaveInsert Data

................................
................................
...............................

54

52.

LeaveInsert Stored Procedure

................................
................................
...........

55

53.

Interface Design of Employee Leave S
tatus Selection Functionality

...............

56

54.

Interface Design of Employee Leave List

Functionality

................................
..

57

55.

LeaveData API code

................................
................................
.........................

58

56.

Interf
ace Design of Employee Leave Detail Functionality
..............................


59

57.

Interfa
ce Design of Employee Report

Functionality

................................
........

60

58.

Interfa
ce Design of Employee Date Report

Functionality

................................

61

59.

Interfa
ce Design of Employee Week Report

Functionality

..............................

62

60.

Interfa
ce Design of Employee
Month Report

Functionality
.............................

63

61.

Interfa
ce Design of Employee Quarter Report
Functionality

...........................

64

62.

Interfa
ce Design of Employee Yearly Report

Functionality

............................

65

63.

GetYear API code

................................
................................
.............................

66

64.

Interfa
ce Design of Employee Report List

Functionality

................................
.

67

65.

GetEmpReport API code

................................
................................
..................

68

66.

Get
EmpReportData Service Layer

................................
................................
...

68

67.

GetEmpReport

Data Layer

................................
................................
...............

6
9

68.

GetEmpReport Stored Procedure

................................
................................
......

70

69.

Interfa
ce Design of Supervisor Menu

Functionality

................................
.........

71

70.

Interfa
ce Design of Supervisor Leave Request

Functionality

..........................

72

71.

Interfa
ce Design of Urgent Leave Selection

Func
tionality
...............................

74

72.

UpdateSupPref API code

................................
................................
..................

74

73.

UpdateSupPref Service Layer

................................
................................
...........

75

74.

UpdateSupPref Data Layer

................................
................................
...............

75


xiv




75.

UpdateSupPref Stored Procedure

................................
................................
.....

7
6

76.

Interfa
ce Design of Supervisor Leave Approval

Functionality

........................

77

77.

SupEmpLeaveDetail API code

................................
................................
.........

77

78.

Interfa
ce Design of Supervisor

Leave Dis
-
Approval

Functionality

.................

79

79.

Interface Design of Supervisor Employee Report Functionality

......................

81

80.

GetEmpName API code

................................
................................
....................

81

81.

Interface Design of Supervisor Employee Report List Functionality

...............

83

82.

GetSupReport API code

................................
................................
....................

83

83.

IIS Se
rver Configuration Properties
................................
................................
..

88

84.

Snapshot of the IIS Server

................................
................................
................

89

85.

Snapshot
of Database Connection String

................................
..........................

90

86.

Snapshot of Database Manager

................................
................................
.........

90




1



C
hapter 1

INTRODUCTION

1.1

Problem Statement


In
today
’s
world
, there are
various

modes

of
communication

like
mobile
, internet,
telephone

etc. through which
it

has
become

very

easy

for

employees
’ to
inform

the

organization

about their
absence
.
However
, through
external

software
applications
, an
absence

record

of
the

employee

is
hard

to
maintain

and

retrieve
.
Thus
,
employee

Time
-
off
service

was developed
.

The

objective

of
the

project

was

to
develop

an
automated

service

that
keeps

track

of
the

employee’s

leave

of
absence
,
regularly
, through Android
mobile

devices
, with
extensible
features

for

internet
devices
.

Employee
's

Time
-
off
mobile

service

has five functionalities. Three functionalities

implemented

for

employee
s

and

the

two

functionalities are designed
for

supervisor
s
.
An
employee

can
submit

a
leave

application

using

a
mobile

device
.
He

can
also

keep

track

of
the

submitted

leave

on a
monthly

basis
.
The

report

module
for

an
employee

is
provided

so

that

the

employee

can
retrieve

his/her
approved

leave

applications
. On
the

supervisor
’s
side
,
the

leave

application

service

has
a
similar

repor
t

module
so

that

the

supervisor

can
also

check

the

employee
’s
leave

details
.
The

interface provides the supervisor

with the
capability

to
approve
or

not
approve

an

employee
’s
leave

using

a
mobile

device
.
In
addition
,
the

interface to
analyze

all

employees

leave

details

is
also

part

of
the

supervisor

functionality.



2



Chapter
2

SYSTEM
REQUIREMENT
S


2.1
System Requirements

T
he system requirements for the Mono
-
Android Employee Time
off

Mobile Service

are presented below
.

2.1.1
Operating

Environment


The operating environment
defined as software

that communicates with the hardware
allowing the application to
run
.

In this project Xamarin

s Mono
-
Android operating
environment is used to develop the application.

Xamarin

s Mono
-
Android was released
in
January 2012.

In this project Xamarin

s trial version has been used.

The soft
ware
deployed and tested on
ARM

processor
having

API level 10/17 and designed

to run on
Android
version

4.0 Operating System.

An Internet Connection
is
required

to download
the

Ap
plication.

2.1.2
Web
-
Service



Web Service
defined as

a method of communication between two electronic devices
over the
web
.
The
Service Oriented Architecture based
design

was

adopted

to
develop

the

project
.
Restful

Web
-
Service integrated
the

interfaces of
the

Mono
-
Android Application.
The
JSON
open

standard

designed

for

data
interchange

between Web
-
Service
and

Android Interfaces

was utilized
.

The .Net framework used in this project to develop web
-
services has been downloaded from Microsoft [4
].



3



2.1.3
.Net
Framework


.Net
Framework

is a

software framework provided by Microsoft that includes large
library and provides language interoperability across several programming
languages [
4]
.

T
he
Business
process

was
automated
using

C#
.
Net

3.5
f
ramework
.
The
Business

Logic
of Web
-
Service

was
written

using

Visual Studio 2008
editor
.
The

business

Logic of
Mono
-
Android Interfaces

was

written

using

Visual Studio 2010
editor
.
The Visual Studio
2010 was used to develop the Android Interfaces. The
business logic for the interfaces
was written using in C#.Net 4.0 framework.

2.1.4
Database

The database of a project defined as

an organized collection of
data [
4]
. The project
database

was
designed

using

SQL SERVER
-
2008.
The
Data

Layer was used to

store

the
procedures

written
.
The
Data

Layer
interacted

with
the

SQL SERVER
-
2008
and

the
Restful

Web
-
Services
IIS
-
7 Server
deployed

the
database as
well

as

the

Web
-
Services.


2.2 Functional
R
equirements


The functional requirement
s

of an appl
ication/service in
a project

are

defined as
the
function of software components. It describes the behavior of the
application
.

2.2.1 Users


There are two
types

of users within
this

project

a
Supervisor

and an
Employee
.



4



2.2.2

Roles

The role of a supervisor within the application is
to Approve or Not
A
pprove the
pending leave r
equest submitted by an employee and t
he role of an employee within the
application is to submit a request a leave of absence from work.

2.2.3

Functionalities


The

application in total provides five functionalities to the users.
The t
hree
functionalities
implemented

for

an
employee

are:

Leave

Submission
,
Leave Sta
tus

and
Employee Leave Report.
The two

functionalities
implemented

for

the

supervisor are:

Supervisor

Request Leave
and
Employees Leave Report
s.


2.2.4
Assumptions

and

Dependencies


The assumptions and dependencies for the project

are

identified as:
The
Employee
Information is
present

in
the

database,
The
Supervisor Information is
present

in
the

database,

The
Supervisor
and

Employee Login
use

pre
-
assigned Login Id
and

Password,
The
User

cannot
use

the

Back
button
.
The
u
ser

has must

use

the
menu

key

for

navigation
.
The total number of leaves that an employee can take in an annual ca
lendar year is a

maximum of 30 days. The number of leaves if less than 30 will not be carried forward to
the next calendar year. For eg. If an employee has taken a total of 29 day
s leaves in 2011,
the balance leave of 1 day

will not be carried for
ward to the next calenda
r year of 2012.



5



2.3

Employee

Interface Process



After Employee logs into
the

system
,
the
Employee
is
Menu
displayed
.

The
Employee Menu
connects

the

Employee
side

functionality
,
Leave

Submission, L
eave
Status and
Employee Report. The
Leave Submission functionality
helps

the
user to
submit

the
leave

application. The
Status of Leave functionality
helps

user to
check

the

status

of
the
l
eave

application. The
Leave Report functionality
helps

the
user to
check

his
Leaves
-

Period
wise
, Weekly
, Monthly, Quarterly, Yearly
basis
.
F
igure 1

is
the

use

case

diagram

of
employee

side

module, which

explains the three functionalities for the
employee.



6




Figure 1
:

Use
-
C
ase Diagram of Employee Module

2.3.1
Leave

Sub
mission


An
Employee
uses

this

functionality

for submission of a leave application.
An
employee
,
enters

the
start

and
end

date
,
selects

the

type

of
leave
,
mentions

the

note

(reason for leave of absence from work)

and

submits

the

leave for approval. The
Leave
Submission module validates

the

start

and

end

date
.



7




The

validation for the functionality

is as below:

1.

The Start
date

should be
less

than
the

End
date
.

2.

The Start
date

and

the

End
date

should be of
the

current

year
.

3.

Start
date
, End
date

and

Leave Note
field

should not be
blank
.

4.

Accrued Leave should be
greater

than “0”.

5.

Absence
days

should be
less

than Accrued Leave.

Figure 2 and Figure 3
are

the flow chart

and the sequence diagram
respectively for

the Insert Leave functionality, which involves the user to insert leave
.




Figure
2
: Flow Chart

of

Insert Leave Functionality



8






Figure 3:
Sequence Diagra
m of Insert Leave Functionality


2.3.2
Leave

Status



An Employee
uses

this

leave

status

functionality

to check the status of the leave
application submitted for approval
.
After an Employee
enters

in
the

functionality,
the

selection

menu

appears

with Pending, Approve,
and Disapprove

and
All Leave
option
s
.
On
selecting

the

Pending
option
, all
the

pending
leaves

display
.
On
selecting

the

Approve
option
,
all

the

approved

leaves

by
the

supervisor

display
.
On
selecting

the

Not approve

option
,
all

the

leaves

Not approve
d by
the

Supervisor
display
. On
selecting
,
all

leave

option

all

the

leaves

submitted

by an
employee

in
the

present

month

displays
.
The user
interface
provides

a
partial

search
,
sort

and

count

facility
.

With
the

help

of
sort

facility
,
the

leaves

display

in
an
ascending

or

descending

manner
.
The

count

functionality
provides

the

total

number

of
leaves

submitted

by
the

user.

Figure 4 and



9



Figure 5

is

the flow chart

and sequence diagram respectively of the Leave
Status

Functionality, which shows an employee the status of a leave request submitted with sort
facility.


Figure 4
: Flow Chart

of Leave Status Functionality



10





Figure 5:

Sequence Diagra
m of Leave Status

Functionality


2.3.3
Employee Report


An

employee

uses this

functionality

to check

and to
analyze the leave taken by the
employee
-

period wise, weekly, monthly, quar
terly, yearly basis.
This interface displays
the period wise, weekly, monthly, quarterly,

yearly basis selection. On clicking, the
period button and entering the start and end date the details of leaves taken by an
employee in the selected period displays. On

clicking the weekly button, the calendar
shows
up. On

selecting the date from the cal
endar displayed, all the leaves taken in that



11



week show up.

On click

the month
ly button, the drop
down

menu
display
s

all the months

of the calendar year

from Jan
uary

until Dec
ember
.
The u
ser

selects
the month

and the
leave
s

taken by the employee in that

particular month shows up.

On clicking the quarterly
button, the drop down menu displays the four quarters of the year (Jan
-
Mar, April
-
June,
July
-
Sept,
and Oct
-
Dec). The user selects the quarter and the leaves taken by the
employee in that quarter shows u
p.

On selecting, the yearly button, the drop
down menu

displays the given years.
The user selects on the required

year and the leave detail
appears.

Similar to the Employee Status module, the Employee Report interface provides a
search, sort and count
functionality.

The search functionality helps the employee to
partially search for leaves taken. The date entered in “mm/ dd /yyyy” format.
The user
enters

a

single numeric character in the date, and the application displays all the leaves
for the entered
numeric
character. The

sort functionality displays

the leaves
in an

ascending or descending order by date.

The
Coun
t functionality gives the number
of
Absence leaves.

Figure 6 and Fi
gure 7 show the flow chart

and the sequence diagram

respectively
of the Employee report functionality.



12




Figure 6:
Flow Chart

of Employee
Report



13





Figure 7
:
Sequence Diagram of

Employee Leave Report

Functionality


2.4

Sup
ervisor Interface Proces
s



After
the Supervisor Logs into the system, the Supervisor Menu
displays. This
interface

connects the user to the supervisor side functionality.
The Request Leaves and
the Employee Reports functionality connected to this menu.
The request leaves
functionality helps the user (supervisor) check the leaves
submitted by

an

employee to
the supervisor. The employee reports functionality helps the
user (
supervisor)

to check
the list of all the employees, the leaves submitted with corresponding dates and reason for
leave of absence of
work.

Figure 8
is
the

use

case

diagram

of
supervisor




14



side

module, which

explains the two functionalities for the supervisor.


Figure 8:
Use
-
Case D
iagram of the Supervisor Module

2.4.1

Request Leave


A

supervisor
uses this
functionality

to check the request of leaves submitted by an
employee
.
It displays the list of pending leave applications of all the reporting employees
.
On clicking a

particular leave, the details of

the selected

leave displays.



15



The request will display the employee’s name, dates’ of leave, reason of leave and
note

(
reason for leave of absence).
T
he supervisor can approve or
not approve

the request
for leave. On approving the leave, the status of the leave changes from pending to
approved.

On

dis
-
approving
the leave, the status of leave will change from pending to
not
approve
. The supervisor mentions the reason of dis
-
approval.

The functionality has partial search, sort and count facility
.

It also has the facility to
check the urgent leave requests submitted. The interface provided to the supervisor
selects the urgency
of the leave. The urgency interface selects leaves within 0
-
7 days
from the current date. O
n clicking, the Pending Leave

button

the interface displays

the
list of pending
leaves.
O
n clicking, the Urgent Leave button the
i
nterface displays the
urgent l
eave
criteria. After

setting, the Urgent Leave criteria the user can

either

log out
or
return

to the List of Pending

Leave
Functionality.

Figures 9 and 10
is

the flow chart

of
pending leave and urgent leave

functionality respectively and
Figure 11 is the sequen
ce
diagram of supervisor leave approval
.



16




Figure 9:
Flow Chart

of Pending Leave Functionality



17




Figure 10:
Flow Chart

of Urgent Leave F
unctionality



18




Figure 11:
Sequence Diagram of

Supervisor Leave Approval


2.4.2

Supervisor Report


This
functionality is similar to the Employee

Report functionality provided o
n the
Employee
side. The

I
nterface helps the supervisor
select an employee from list of
employee’s. On

entering the Supervisor Menu,
the
Employee leave lookup functionality
allows the
user (
supervisor) to enter Leave Selection Menu
functionality. Through

this,
the user selects the name of an employee, the leave period and the leave type.

The user
can select the leaves on period
-
wise
, weekly, monthly, quarterly

and yearly basis.

19



The ap
plication displays the list of the employee’s name, the number of leaves taken
and a count of the leaves taken by all the
employees. On clicking the name of an
employee, the supervisor directed to the selected employee report functionality, which
displays
the leave report of the selected employee.

The supervisor report interface has a partial
search, sort

and count functionality. This
functionality
helps the

user (
supervisor) to search employees based on their names. On
entering,

the first
letters of an em
ployee’s name

all the names starting with that letter
display. On

selecting
the required

employee, the leave detail report
of that

employee
displays. In addition, the sort functionality is provided through which the list of the
employees sorted in an ascen
ding order or descending order. The

count functionality
shows the total number
of leaves

taken by an employee in that period.
Figure 12 and
Fi
gure 13 are the flow chart

and the sequence diagram of the Supervisor Report
functionality.



20




Figure
12:

Flow
Chart

of Employee Report Functionality



21





Figure 13:
Sequence Diagram of Empl
oyee Leave Report Functionality




22



Chapter
3

SYSTEM ARCHITECTURE

3.1

Overview On Mono
-
Android

T
echnology


Mono
-
Android is
an

android development framework provided by the company
called Xamarin
[1]
. It is compatible with .Net framework, C# compiler and a Common
Language Runtime.

3.1.1

Android

Background


An
Android is the mobile operating system developed by Android
Inc. The

Op
erating
System is on Linux 2.6 kernel. It is the open source application of about 12 million lines
of code. The Lower layer of the Operating System written in C. This layer interacts with
the Linux kernel. The application layer of Android Operating System

developed in java.
Android has the Google market for application distribution. It supports a
multitude of
different
devices [
2]
.

3.1.2
Androi
d Architecture


Android Ar
chitecture formed of Linux Kerne
l, Libraries, Application
Framework,
and Android

Applications
.

T
he Android Architecture

is formed of :

1.

Linux Kernel: Android Architecture is the basic hardware abstraction
layer [
2]
.


2.

Libraries: Android Architecture contains various
libraries [
2]
.


3.

Application Framework: It contains application
framework having Activity
Manager, Window Manager, Content Provider
s, View System,
and Package

Manager.



23



4.


Telephony Manager, Resource Manager, Location Manager and Notification
Manager [
2]
.

5.

Android Applications: It contains various
applications bundled

to
gether and
distrib
uted together. Basic Android Application Programming Interface

levels
correspond with the version of the
Android [
2]
.

3.1.3
Mono for Android


It is the alternative
to Java

for develop
ing Android Apps using C# and .N
et
framework
using Mono

Develop or V
isual
S
tudio
2010 Integrated Development
Environment
.Mono is

the runtime that runs on any Operating System
. Mono is the part
of
the .Net framework having
.Net runtime.Mono for Android is a framework built on top of
mono. It wraps almost the en
tire Android
Software Development
Kit
. It

does not compile
down to native code.
It goes back and forth
between DALVIK Virtual Machine and
Mono Virtual Machine
.
Mono for android runs on windows or OSX.
Many wrappers and
bindings
built on top of Linux Kernel
and this made the Andro
id Operating System
.Mono
Virtual Machine

is just like
the
.Net virtual Machine.
DALVIK
Virtual Machine

is just
like

the

Java virtual Machine. These virtual Machines are able to communicate with

each
other using bindings and w
rappings

It uses mono
-
runtime for compiling the code and run
on Linux
kernel. Android

Binding uses many wrappers

that use Android Software
Development

Kit. When

something

is done

in Android Software
Development

Kit
, it
marshal’s and send some data across DALVIK
Vi
rtual Machine
. Thus, all the .Net code
converts into Java code and compiled on DALVIK
Virtual Machine
[2]

and
vice versa
.



24



3.2

Overview
O
n

C
ross

P
latform

T
echnology


Before, the application
developed
in java language

for androids
.
An a
pplication for
iPhone

coded in C
-
O
bjective. In addition, windows phone application
coded in Microsoft
.net

Technology. Now, the code
wr
itten in C #, .NET framework and it is possible to
share the code by android, iPhone,

and Windows
phone with their own platform User
Int
erface

and device capabilities.
This defines Cross Platform
Technology.

The cross
p
latform
t
echnology helps create the application that allows the code to

share across
multiple platforms.
“XAMARIN” provi
des the technology that helps
build the Cross
Platfor
m Application.
Following are some of the services provided by “XAMARIN” to
build app
licatio
s.
The
Model View
Controller (
MVC
)

design pattern based application
built so that the
v
iews are separate from Model and Controller. It

provides SQLLite .Net
database
for local storage of
data. It

provides mobile libraries fo
r accessing device
capabilities. It

also provides features
for Networking, Web
-
Services, Input Output

and
more

[
1]
.

Figure
:
14 shows

the Cross Platform
Architecture [
1].

IOS Interface

IPhone
Interface

Windows Interface

Business Layer

Service Layer

Data Access Layer

Data Layer


Figure 14
: Cross

Platform Architecture




25



3.3

Overview

O
n

S
ervice

O
riented

A
rchitecture


The
Web Services built on principles and design philosophies for designing and
developing the software in the form of interoperable service defined as Service Oriented
Architecture (SOA).
The service
-
oriented architecture help build applications that are
exten
sible.
Some of the famo
us design philosophies are
SOAP
1

and

REST
2
[3]
.

3.3.1
Restful Web
-
Service

Restful Web Service embraces
Http
3

as the transport used throughout the system. It
does not try to achieve the transport neutrality. Restful design uses the Http as the
commonly used
protocol. The

Restful Web
-
Service concept
model service as a resource
and gives

a unique Identifier in the
form of
URI’s
4
. Then
URI’s

can be interacted with
the help of the resource using standard interface. Various Http protocol like GET, POST,
PUT, DELETE, HEAD forms the service contract. It is useful to build highly scalable
services. In addition, it is usef
ul to obtain performance and scalability improvements.
The
r
esources represented as
XML
5
,
JSON
6
, and
RSS
7

[3]
.

3.3.2

SOAP Web
-
Service

The primary goal of SOAP service is to achieve Transport neutrality.

SOAP used for web
-
development [
3]. The lighter versi
on of soap used for mobile
.




1

SOAP
”,

Simple Object Access Protocol
.

2 “REST”
, Representational State Transfer.

3 “Http” or “HHTP”, Hypertext Transfer Protocol is an application protocol for information systems.

4 “URI”, Uniform Resource Identifier identifies resource on the internet.

5

“XML”,Extended Markup Language allows user to define their own customized markup language

6 “JSON”, JavaScript Object Notation is a lightweight data interchange format.

7 “RSS”, Really Simple Syndication is a lightweight data interchange format.





26



3.4

O
verview

O
n

P
roject Architecture


The target of the project is to build the Mobile Application for Android
Users. The

project
designed using Service Oriented Architecture. It

was n
-
tie
r application developed
using .Net 3.5 framework.
The
Mobile Service
designed using Restful service, which
integrated SQL
-
SERVER 2008 database with Mobile Service and integrated mono
-
android interfaces with Mobile Service.ADO.net helped to integrate with t
he SQL
-
SERVER database. Resources of restful service respected in JSON format.
“HTTPWEBREQUEST” mechanism helped grabbing JSON objects from Restful
Service. Visual

Studio 2008 Integrated Development Environment

helped writing
bus
iness logic of restful
serv
ice.

Visual

Studio 2010 Integrated Development
Environment

helped writing interfaces of Mono
-
Android Application.IIS
-
7 server
deployed the Service.

IIS
-
7 database manager deployed the database designed in SQL
-
SERVER 2008 and stored
procedures. The

applicat
ion
deployed and tested on emulator
supporting
A
pplication

P
rotocol
I
nterface

level 10/14 on ARM processor. Further

extension of the project can shape the service to cloud
system. In

addition, the service can
integrate available
clouds.

The service can fur
ther extend to cross
-
platform application.
The

s
olution of the project is possible using Monolithic Approach using SQ
L
Lite
database
too. However
, focusing on further extension,
the project

was designed using
SOA
architecture.

The

s
ervice design is also pos
sible using SOAP 1.1 over HTTP and
.ASMX configuration.



27



3.5

Component Design


The objective of component design is to provide a design for an adaptable component

that satisfies product requirements in accordance with the product

architecture.

3.5.
1

Insert
Leave

On clicking the


Insert Leave


button
,

the


Employee

Id


passes

from

Employee
Menu


to

Insert Leave


Interface.

The
Leaves Accrued by the Employee

is obtained from
database and displayed on the

Leave Insert Interface

.

An Employee

fill
s

out the In
sert
Leave form and
submits

into the database.

Figure

15 and Figure 16
show the component
diagram of

Insert Leave Interface


and Accrued Leave Interface
respectively and

Figure

17

shows the
Insert Leave Detail
.



Figure
15
:

Component D
iagram of Insert
Leave Interface



28




Figure 16:
Component Dia
gram of Accrued Leave Interface


Figure 17:
Component D
iagram of Insert Leave Detail

3.5.
2

Leave Status


On clicking Leave Status button,

the

Employee Id


passes

from

Employee Menu


to

Leave Status


Interface.

O
n clicking

Leave
button, the

Leave Status Selection Menu


appears.

Figure

18 show the component diagram of

Leave Status Selection Menu


the


Leave Status Selection Menu


has

Pending Leave

,

Approved Leave

,


Rejec
ted
Leave


and

All Leave


button
.

Figure 19 show the component diagram of

Leave Status
Selection Menu


Functionality. By

clicking, button on

Leave Status Selection
Menu

, the




29




Leave Status
’ Interface

appears.
The

S
tatus Id


and


Employee Id


passe
s

from

Leave
Status S
electi
on Menu


to

Leave
Status’. Figure

20 and Figure 21 show the component
diagram of

Leave Status Menu
’ Interface

and ‘Leave Status’
Interface. The


Leave
Status


Interface displays the list of Leaves taken by an employee in present month.


Leave Status


Int
erface formed of Employee Monthly Leaves, Search Leave, Sort
Leaves and Count Leave functionality.

Figure 22
shows

the component diagra
m of
Leave Status Functionality.


Figure 18
: Component Diagram of Leave Status Selection Menu


30




Figure 19
:
Component
Diagram of Leave Status Selection Menu

Functionality


Figure 20:
Compone
nt Diagram of Leave Status Menu


31




Figure

21
:

Component Di
agram of Leave Status Interface


Figure 22:

Compon
ent Diagra
m of Leave Status Functionality



32



3.5.3

Leave Report

The

Employee Id


passed from

Employee Menu
’ to ‘Employee
Report


I
nterface.

Employee

Report
Menu


has

Period

,

Week

,

Month

,

Quarter


and

Year


button.
Figure

23 and Figure 24 show the component diagram of

Employee Repor
t’
Interface
and ‘Employee
Report
Menu


respectively.


Employee Report


Selection passes

Employee Id


from

Employee Menu

.
Figure 25 is

the component diagram of
‘Leave
Lookup Selection


Menu.

List of the Employee Leaves obtained from database
and
displayed. Figure

26 is the comp
onent

diagram of ‘Employee Leave
Lookup


Interface.

The

Employee Le
ave
Lookup


formed of, the List of Employee Leaves,
Search, Sort and Leave Count
functionality. Figure

27 is the component diagram of

Employee Leave Lookup


Functionality.


Fig
ure 23:
Component Diagram
of Employee Report Interface

33




Figure 24:
Component
Diagram of Employee Report Menu



34





Figure 25:
Component Diagram

of Leave
-
Lookup Selection Menu



35




Figure 26
:
Component Diagram

of Leave
-
Lookup Interface



Figure 27:

Component Diagram
of Employee

Leave
-
Lookup

Functionality



36



3.5
.4

Supervisor Leave Approval


On clicking Pending
Leave
button, the

Supervisor

Id


passed from ‘Pending
Leave


to

Employee Leave
Approval’
Interface.

Figure 28

is the component diagram of



Pending Leave


Interface.

Employee

Leave Approval


Interface has a list of Pending
Employee Leaves coming from the
database. Figure

29

is the component diagram of
Pending Leave List

Pending Leave Interface formed of, the List of Pending Leaves,
Search, So
rt, Leave Count and Urgent Leave functionality


Employee Id


and

Supervisor
Id


passed from

Employee Leave


to

Employee Leave
Detail

. Figure

30
, Figure

31
,
Figure

32

is the component diagram of

Pending Leave


Functionality,

Employee
Leave
Approval


and

Employee Leave Detail


Respectively.


Employee Leave Detail


gets the
detail of Employee Leave from the database.

Figure 33 and Figure 34

is the

Employee
Leave Approval
’ Functionality and ‘Leave
Update Interface


Respectively
through


Employee Leave
Approval


Interface, the

Supervisor can Approve or

Not approve

Leave
.

Update database through Leave Approval or Leave Dis
-
Approval
message. By

clicking

Urgent Leave


button on

Employee Leave Approval

, the Urgent Leave date
setting
done. Figure

35

is
the

component diagram of ‘Urgent
Leave


Interface.

Urgent

Leaves obtained from the database on making Urgent Leave
Selection.

Figure

36

is
the
component diagram of

Urgent
Leave


Functionality.



37




Figure 28
:
Component Diagram of Pendin
g Leave Interface



38




Figure 29
:
Component Diagram

of Pending Leave Functionality



Figure 30
:
Component Diagram

of Pending Leave Interface



39




F
igure 31
:
Component Diagram of Employee Leave Ap
p
roval


Figure 32:
Component D
iagram of Employee Leave Detail



40




Figure 33
:

Component Diagram of Employe
e Leave Approval Functionality


Figure 34
:
Component Di
agram of Leave Update Interface



41




Figure
3
5
:

Component Di
agram of Urgent Leave Interface


Figure 36
:
Component Diagra
m of Urgent Leave Functionality

3.5
.5

Supervisor Employee
Leave
Report


Su
pervisor clicks on the ‘EmployeeLeave
Report


button and
the

Supervisor Id


passed from ‘EmployeeLeave
Report
’ to ‘LeaveSelection
Menu

. Figure

37

is the
component diagram of
‘LeaveSelection
Menu

.

Employee

Leave
Selection
Menu


formed
of

Period Wise

,

Weekly

,

Monthly

,

Quarterly

,

Yearly


Leave Selection
button.
Figure

38

is the component diagram of
‘LeaveSelection
Menu


Functionality.



42



‘Supervisor Leave
Selection

passes the Employee Id

and the Supervisor Id from the


SupervisorLeave
Selection


menu to the
‘SupEmpLeave
Report

. Figure

39

is th
e
component diagram of ‘EmployeeLeave
Report


Functionality.


Employee
Leave
Report


interface formed of the
‘Listof
Employees

,

Search
Leaves’
, Sort and Count
Functionality.

Figure 40

is the component diagram of
‘EmployeeLeave
Report


Functionality. List of Employee Leaves
obtained from database and displayed.

Figure 41

is the component diagram of

Employee Leave Interface


Functionality.


Employee

Leave
Detail


Interface displays the de
tail of an Employees
Leave.

Figure

42

is th
e
component diagram of ‘EmployeeLeave
Detail


Functionality.


Figure
37
:

Component
Diagram of Leave Selection Menu

43





Figu
re 38
:

Component Diagram of Lea
ve Selection Menu Functionality



44




Figure 39
:

Component Diagram
of Employee Leave Report



45




Figure 40
:
Component Diagram of Emplo
yee Leave Report Functionality


F
igure 41
:
Component Diagram of Employe
e Leave Interface Functionality



46





Figure
42
:

Component Diagram of Employee Leave D
etail
Functionality

3.6

O
verview on

Database Design



In this project, Sql Server
2008 used

for database
design. There

are four tables within
the database design
diagram.


Supervisor


Table stores information of the Supervisor.

Table formed of three column’s
‘Supervisor
No
’, ‘Supervisor
Name
’ and ‘Email
Address

.

‘SupervisorNo’

forms the primary key of the table.


Employee


Table stores information
of the Employee.

Table formed of eight
columns
-

‘Emp
No
’, ‘Supervisor
No
’, ‘
Name
’,

Address
’,’ Email
Address
’, ‘Phone
No
’ and ‘
DaysAccure'
.

‘EmpNo’

forms the primary
key of the table and ‘SupervisorNo’

forms the foreign key of the table.


Leave


Table
stores information of the
Leave.



47




Table

has nine columns within that ‘Leave
No
’, ‘Emp
No
’, ‘Submission
Date

,

Start
Date

,
‘End
Date

,

Absenc
e
Days

,
‘Leave
Type

,

Note

,

Status


and

Reason

.

‘Leave
No’

forms the primar
y key of the table and ‘EmpNo’

forms the foreign key of the
table.
Figure: 43

describe

the Database Design of Mono
-
Android Employee Time
-
off Service.


Figure

43
:

Database Design

48



Chapter
4

SYSTEM
IMPLEMENTATION

4.1

Interface

D
esign

Interface Design defined as an Interface Engineering of Software Applications with
focus on user experience and I
nteraction between the users
.

4.1.1

Login Interface

Figure 44
, is a snapshot of the login interface for both the users of the application.
The Employee and Supervisor use this form to log into the application form.

Steps to use login Interface

1.

The u
ser enters the email address

2.

The u
ser enters the password

3.

The u
ser clicks on Login


Figure 44
:

Interfac
e Design of Login Functionality

49



Mono
-
A
ndroid code behind the

login interface


When the user logs into the
interface, the

codes behind

Logi
n.axml


and

Login.cs


files

are called.

Web
-
Service code of the login
Interface

As illustrated in Figure 45
,

the ‘
login


API code
,
t
he e
mail

address
and

the
pa
ssword
of the user
passed from the
login interface to

the

login API of the
web
-
service

in JSON
format.


[
WebGet
(UriTemplate =
"Login/{Email}/{Password}"
,

BodyStyle =
WebMessageBodyStyle
.WrappedRequest,

ResponseFormat =
WebMessageFormat
.Json)]

[
OperationContract
]


string

LoginObject(
string

Email,
string

Password);



Figure 45 : Login API code


In the Service Layer of Web
-
Service, ‘Login Object’ method called to get
data. In
the Data Layer of Web
-
Service, ‘GetLoginId’ method called to get data. The

GetLoginId’
Stored Procedure
'

is call
ed to extract data from database.


4.1.2 Employee Menu Interface

Figure 46
, is a snapshot of the

Employee Menu


inte
rface for
the Emp
loyee. The
Employee
use
s

this form to log into the
Employee side functionality
.



50



Steps to use Employee Menu

Interface

1.

Employee uses this
Interface to navigate to Insert Leave functionality.

2.

Employee uses Employee Menu Interface to navigate
to Leave

Status
.

3.


On clicki
ng, Leave Report button the application
navigates to Leave Report
functionality.


Figure
46
:

Interface Design of Em
p
loyee Menu Functionality

Mono
-
A
ndroid code of
the

Employee Menu

I
nterface


When the user enters employee interface,

EmployeeMenu
'
.axml


and

EmpMenu.cs


the code behind files are called.

Logout.xml file is used for navigation.

Insert Leave

Interface
.

4.1.3 Insert Leave Interface

Figure 4
7,
is a snapshot of the Employee Leave Insert Interface for the Employee.
The Employee
uses

this form to
insert

a
Leave
.

51



Steps to use Employee

Leave Insert

Interface

1.

The e
mployee uses this
Interface to
Insert

Employee Leave functionality.

2.

The employee

enters the
Start Date and End Date

3.

The Employee
selects Leave Type
:
Vacation or Sick Leave.

4.

The employee e
nters the note
(reason for leave)


5.

The user clicks on
submit

to send leave on the application.



Figure 47
:

Interface Desig
n of Insert Leave
Functionality

Mono
-
A
ndroid code
of
the

Accrued

Leave

I
nterface

When the user logs into the interface
,
the codes behind Leave.axml and Leave.cs
files
are called.

52




Web
-
Service code of the
Accrued

Leave

Interface


As illustrated in Figure 48


LeaveData


API
code,

the Login Id of the
user is passed
from the ‘AccruedL
eave


interface to

the ‘L
eave
Data’

API of the web
-
service in JSON
format.

The EmpSelMenu.xml file is used for navigation.


[
WebGet
(UriTemplate =
"LeaveData/{LoginId}"
,

BodyStyle =
WebMessageBodyStyle
.WrappedRequest, ResponseFormat =
WebMessageFormat
.Json)]

[
OperationContract
]

ILeaveData

GetLeaveDataObject(
string

LoginId);



Figure 48: LeaveData API code

In Servi
ce Layer of Web
-
Service
,


GetLeaveDataObject


method is called to get
data.
In

Data Layer
,

of Web
-
Service

GetEmpLeaveInfo

method is called to get
data. The


Get
EmpLeaveInfo


Stored Procedure is call
ed to extract data from database.


Web
-
Servi
ce code of the
I
nsert

Leave
Interface

As illustrated in Figure 49
,
‘Leave
Insert


API
code, the

login id, start
date, end

date,
leave
days, reasons

and note are passed from

LeaveInsert


interface to the LeaveInsert
API of the web
-
service in JSON format.
This API Inserts Employee Leave into the
Database.


[
WebGet
(

UriTemplate =
"LeaveInsert/{LoginId}/{StartDate}/{EndDate}/{LeaveDays}/{Reason}/{Note}"

BodyStyle =
WebMessageBodyStyle
.WrappedRequest, ResponseFormat =
WebMessageFormat
.Json)]

[
OperationContract
]

string

LeaveInsert(
string

LoginId,
string

StartDate,
string

EndDate,
stri
ng

LeaveDays,
string

Reason,
string

Note);



Figure 49
: LeaveInsert API code



53



As illustrated in F
igure 50
,
In Service Layer of Web
-
Service
,


LeaveInsert


method is
called to
insert

data. The


login Id

,

Start Date

,

End Date

,

Leave dates

,

Reason


and

Note


values are passed from the
‘Leave
Insert


Interface to the

Leave
Insert


Service
Layer. The values are stored in

Leave
Insert


data object of

Leave Insert Service Data


class.
In the Service Layer values of date are manipulated from dummy value
s to ‘/’.The

EmpLeaveInsert


object is created of

EmpLeaveInfoGet


data layer class.


public

string

LeaveInsert(
string

LoginId,
string

StartDate,
string

EndDate,
string

LeaveDays,
string

Reason,
string

Note)

{

ILeaveInsert

LeaveInsert =
new

ILeaveInsert
();

LeaveInsert.ILoginId = LoginId;

LeaveInsert.IStartDate = StartDate;

LeaveInsert.IEndDate = EndDate;

LeaveInsert.ILeaveDays = LeaveDays;LeaveInsert.IReason = Reason;

LeaveInsert.INote = Note;

LeaveInsertServiceData

LeaveInserData =
new

LeaveInsertServic
eData
(); LeaveInserData.LoginId =
LeaveInsert.ILoginId;

LeaveInserData.StartDate = LeaveInsert.IStartDate.Replace(
'S'
,
'/'
);

LeaveInserData.EndDate = LeaveInsert.IEndDate.Replace(
'E'
,
'/'
);

LeaveInserData.LeaveDays =
Convert
.ToInt32(LeaveInsert.ILeaveDays);

LeaveInserData.Reason = LeaveInsert.IReason;

LeaveInserData.Note = LeaveInsert.INote;

EmpLeaveInfoGet

EmpLeaveInsert =
new

EmpLeaveInfoGet
();

string

LeaveRes = EmpLeaveInsert.InsertEmpLeave(LeaveInsertData);

return

LeaveRe
s; }



Figure
50
:
LeaveInsert
Service

Layer



54



As illustrated in F
igure 51
, the

Data Layer of Web
-
Service, ‘
InsertEmpLeave’

method called to insert data. In

the

Layer values are passed from service
layer
.

LeaveInsertData


object to data layer,

LeaveRes

.
The SQL connection is formed
and the retrieved value
s are passed to store procedure

InsertEmpLeave

.



public

string

InsertEmpLeave(
LeaveInsertServiceData

LeaveSerData)

{

SqlCommand

cmd =
new

SqlCommand
(
"InsertEmpLeave"
, SqlConn);

cmd.CommandType =
CommandType
.StoredProcedure;

cmd.Parameters.AddWithValue(
"@EmpNo"
, LeaveSerData.LoginId);

cmd.Parameters.AddWithValue(
"@StartDate"
, LeaveSerData.StartDate);

cmd.Parameters.AddWithValue(
"@EndDate"
, LeaveSerData.EndDate);

cmd.Parameters.AddWithValue(
"@Absenc
eDays"
, LeaveSerData.LeaveDays);

cmd.Parameters.AddWithValue(
"@LeaveType"
, LeaveSerData.Reason);

cmd.Parameters.AddWithValue(
"@Note"
, LeaveSerData.Note);


try

{

SqlConn.Open();

Try

{