Professional Documents
Culture Documents
REPORT Form
REPORT Form
COMPANY MANAGEMENT
SYSTEM
[An Asp.Net Website]
0/0/2014
Conjoinix, Chandigarh
71
Company Management System
A
Project Report
Submitted
In the partial fulfillment
For the award of degree of
Master of Computer Applications
(2011-2014)
Undertaken at
Conjoinix, Chandigarh
Submitted by
Under Supervision of
Declaration
I hereby declare that the project work entitled “Company Management System” is
Under the guidance of Mrs. Poonam (Project Officer, Conjoinix) (External Faculty
Advisor
Date: Signature: -
3
ACKNOWLEDGEMENT
It is a pleasure for us to find ourselves penning down these lines to express our sincere thanks to all
our coordinators to give me this opportunity of preparing this project, to enhance my
professional practice. I express my deep sense of gratitude to my project officer Mrs Poonam to
give us knowledge about the topic and concept related to this particular project. Without this guidance
we cannot imagine to complete our project on time.
I present my deepest gratitude to all our coordinators and teachers for always boosting
up our moral and providing us encouraging environment. In the last, we want to thank our
parents, without whom nothing was possible.
This application is the individual work of mine. Without helps of the particular
that mentioned above, I would face many difficulties while doing this project.
Name:
COMPANY MANAGEMENT SYSTEM 0/0/2014
INDEX
Sr.No. Tilte Page No.
1. Organization Overview 7-8
2. Introduction 9
3. Features of the Application 10
4. Hardware and Software to be used 11-12
5. Feasibility Analysis
6. Module in this project
7. Software Requirement Specification
8. System Design
9. Database Diagrams
10. ER diagram
11. Testing
12. Implementation
13. Project Legacy
14. Source Code of Activities
5
15. Source Code of aspx files
16. Snapshots
17. Conclusion
18. Biblography
COMPANY MANAGEMENT SYSTEM 0/0/2014
Organization Overview
About our services you can refer www.conjoinix.com. We are one of the Leading ISO 9001:2008
certified Companies in Chandigarh, North India. Conjoinix, with an aim to develop World-class,
competent High Quality solutions at competitive low cost price through its competent, focused,
dynamic, hard working and prosperous team of Professionals currently operates from Chandigarh, India
and has been listed amongst Top 100 Small Businesses of the Year 2011.
7
Conjoinix is pleased to announce 6 weeks Professional IT Foundation Programes at ñ XSCademy,
through which young talent shall get trained & benefited in their respective Careers. Conjoinix-
XSCademy is a unique Professional initiative by Conjoinix and will help your students in making a
bright future and get Professionaly Trained.
Programme Cycle:
Training Application & Selection ---> Training Confirmation ---> Training ---> Option for Part-time Job
during Training ---> Soft-skill Development ---> Finishing & Grooming Program ---> Placement --->
Job Selection ---> Job
Salient Features:
- 100% Live On-Job Training
- Multi-profiled Parrallel Programmes in the fields in Software / Web Development, Linux / Open
Source, Networking Security & Administration, System & Data Center Administration, and IT & ITeS
Services
- Guaranteed Exposure to Live Industry environment, Project Management & innovative Technologies
INTRODUCTION
This project ‘Company Management System’ is an Asp.Net website. As the name suggests, this
website helps to manage IT companies data in easy manner. It is very easy to use. InAdmin Panel of the
website the administrator of the company can check every single detail about company. Because of
security factor, administrator can provide certain privilages to different users. We can see our company’s
workin progress like Completed tasks, Incompleted tasks and pending tasks. We can see everey single
updation about company’s data in this website. Administartor can work as task manager, as he can
assign various tasks and can abandon these tasks, can also see progress of various tasks.
9
HARDWARE AND SOFTWARE TO BE USED
Software Environment:
Hardware Environment:
Technology Used:
1. Asp.Net
2. Code-Behind file –C#
COMPANY MANAGEMENT SYSTEM 0/0/2014
Technical Requirements
S. Name Description
No.
1. Microsoft Visual Studio 2008 A complete kit for developing Asp.Net sites
11
FEASIBILITY ANALYSIS
The feasibility study revolves around investigation and evaluation of the problem, identification and
description of candidate system, specification of performance and the cost of each system, and the final
selection of best system. The objective of the feasibility study is not to solve the problem but to acquire
a sense of its scope.
Feasibility study is broadly divided into the following categories. Each category attempts to cover all
the aspects of a civilized society and provide a clear understanding of all solutions chosen. These are:
Economic feasibility
Technical feasibility
Operational feasibility
Time feasibility
Let’s take each one of them separately and try to understand what these different types of feasibility
study cover:
Technical feasibility-
Technical feasibility determines whether the work for the project can be done with the existing
equipment, software technology and available personnel. Technical feasibility is concerned with
specifying equipment and software that will satisfy the user requirement. Open leaf is technically
feasible as the technical requirements are completely available in the present scenario.
All the above-mentioned requirements are available in the market thereby making Open Leaf
technical feasible.
COMPANY MANAGEMENT SYSTEM 0/0/2014
Economic Feasibility-
Economic feasibility determines whether there are sufficient benefits in creating to make the cost
acceptable, or is the cost of the system too high. This signifies cost-benefit analysis and savings. On the
behalf of the cost-benefit analysis, the proposed system is feasible and is economical regarding its pre-
assumed cost for making a system. The cost of the system is dependent upon the following factors:-
Personal costs
Computer usage
Supply and equipments costs
Cost of any new computer equipments and software.
Operational Feasibility-
It is mainly related to human organizational and political aspects. The points to be considered are:
Time Feasibility-
Time feasibility is a determination of whether a proposed project can be implemented fully within a
stipulated time frame. If a project takes too much time it is likely to be rejected.
13
Module in this project
Administrator
Employee
Administrator: -
Administrator has the full authority over the Application.
He/she can fully check the site on back end. And as well as he can update information if is
there is any change occurred in company schedule.
He/she checks incomplete tasks, complete tasks and pending tasks.which is assigned to
various employees.
Admin can check and edit profiles of different employees.
Employees: -
Employees can use it for according to their need.
Employee can edit his or her own profile only.
He/she can check its completed tasks ans pending tasks.
Employee can submit its completed tasks.
Employee can change its account login password.
COMPANY MANAGEMENT SYSTEM 0/0/2014
Introduction:
This requirement specification is for mentioning the detail view of “Company Management
System” website which is helpful in IT companies. This website is providing support to the
Administrator and Employees. It can give a good profitable dimension to that organization as the
number of employees will increase day by day in the company .This website is meant for
company, if we want to manage our company without company management software, then we have to
use varoius kind of tools like, different files for storing and visualizing data. but this software is only
meant for company management system. It make ease in managing company. All types of
functionalities of this Website have been mentioned here accordingly.
Overall Description:
In this Website Admin can easily add anything dynamically and use it accordingly.This website
contains all the functions or Data related to IT companies. Admin can add country names,state names,
departments, designation according to specific department, registration of employee,view any
employee’s profile, Task managing,assigning task and checking incomplete ,complete and pending task
of every employee. Employee can change its Password,view his/her profile,edit profile,submit
completed task,view pending and completed tasks.
Functionalities:
Employee’s can Login into their account and then their session starts and accordingly they can logout
from thir accounts whenever they want. Also any Employee can change his/her account’s password.
15
Employee’s Home Page:
Here he/she is provided with 4 options. There are facilities
System Design
FLOW CHARTS
A flowchart is a type of diagram that represents an algorithm or process, showing the
steps as boxes of various kinds, and their order by connecting them with arrows . This
diagrammatic [Knowledge representation and reasoning representation solution to a given problem
. Process operations are represented in these boxes and aerogram]]; rather, they are implied by
the sequencing of operations. Flowcharts are used in analyzing, designing, documenting or
managing a process or program in various fields.
Symbols Description
Off-Page Connector
Flow Lines
17
Admin Flow Chart
Add Country Names Country Names
Update/Delete
States Address
Add State Names
Update/Delete
FrontEnd Technology
Add FrontEnd Technology
Update/Delete
Task Manager
Update/Delete Tasks Name
Assigning Task
Incomplete tasks
Completed Tasks
Pending tasks
COMPANY MANAGEMENT SYSTEM 0/0/2014
Change Password
Edit Profile
Submitt Task
Employee
Login
View Completed Tasks
19
Data Flow Diagrams
A DFD, also known as “bubble chart” has the purpose of clarifying system requirements and
identifying major transformations that will become programs in system design. So it is the
starting point of the design phase that functionally decomposes the requirements specifications
down to the lowest level of detail. A DFD consists of a series of bubbles joined by lines. The
bubbles represent data transformations and the lines represent data flows in the system.
DFD Symbols:
1. Process
2. Data Flow
3. Data Store
4. External Entity
Context Diagram:
Context Diagrams Shows the system boundaries, external entities that interact with the
systems and major information flows between entities and the system.
COMPANY MANAGEMENT SYSTEM 0/0/2014
Admin
Data Base
21
1 Level DFD
Admin
Add Department
Add Designation
Database
Register
Employees
Assigning
tasks
COMPANY MANAGEMENT SYSTEM 0/0/2014
Entity-Relationship Diagram
Entity:
An entity is an object or concept about which you want to store information.
Key attributes:
A key attribute is the unique, distinguishing characteristic of the entity. For example, an
Employee's ID number.
Multi-valued attribute:
A multi-valued attribute can have more than one value. For example, an employee entity
can have multiple skill values.
Derived attribute:
A derived attribute is based on another attribute. For example, an Country ID
23
Relationships:
Relationships illustrate how two entities share information in the database structure.
Cardinality:
Cardinality specifies how many instances of an entity relate to one instance of
another entity.
COMPANY MANAGEMENT SYSTEM 0/0/2014
ER Diagram
Login
Admin
25
TESTING
Employee
In general, testing is finding out how well something works. In computer hardware
and software development, testing is used at key checkpoints in the overall
process to determine whether objectives are being met . Testing is a vital to
success of project. Project testing makes a logical
assumption that if all the parts of the project are Username Passwor
Username d
correct, the goalPasswor
will be successfully achieved .Inadequate
d
testing or non –testing leads to errors that may not appear until months later.
Structural Testing
Structural Data
testing is also known as ” White Box Testing”, Clear Box Testing and Glass Box
Testing. In structural testing, the test cases are decided entirely on the internal logic of the
program or module being tested. While white-box testing can be applied at the unit, integration and
system levels of the software testing process, it is usually done at the unit level.
COMPANY MANAGEMENT SYSTEM 0/0/2014
Levels of Testing
Unit testing
It is a method by which individual units of source code are tested to determine if they
are fit for use. Unit tests are created by programmers during the development process. The goal
of unit testing is to isolate each part of the program and show that the individual parts are
correct. Unit testing allows the programmer to restructure code at a later date, and make sure the
module still works correctly. Talking about the limitations unit testing cannot catch any integration
since it focuses on individual units.
Integration testing
In simple words integration testing is testing of combined parts of an application to
determine if they function together correctly. It is a phase in software testing in which individual
software modules are combined and tested as a group.
Some types of integration testing are: Big Bang, Top-Down, and Bottom- Up
In Big Bang approach all or most of the developed modules are coupled together to form a
complete software system or major part of the system and then used for integration testing
In Top-Down approach the top integrated modules are tested and the branch of the module is
tested step by step until the end of the related module
In Bottom-Up approach the lowest level components are tested first, then used to facilitate the
testing of higher level components. The process is repeated until the component at the top of the
hierarchy is tested.
System Testing
Testing the behaviour of the whole s oftware/system as defined in the SRS is known as
system testing. Its main focus is to verify that the customer requirements are fulfilled. System
testing falls within the scope of Black Box testing. System testing is done after integration testing is
complete. It should test functional and non functional requirements of the software.
27
Acceptance Testing
Acceptance testing is a final stage of testing that is performed on a system prior to the
system being delivered to a live environment. Acceptance testing is often made up of many
individual test cases which are Individually documented test scenarios.
Regression Testing
If a piece of software is modified for any reason testing needs to be done to
ensure that it works as specified and that it has not negatively impacted any functionality tha t
it offered previously. This is known as Regression Testing. Regression testing plays an important
role in any scenario where a change has been made to a previously tested software code.
Regression Testing is hence an important aspect in various software methodologies where software
changes enhancements occur frequently.
COMPANY MANAGEMENT SYSTEM 0/0/2014
IMPLEMENTATION
Implementation is a process, which is used for converting a new system into an operational one.
The new system may be totally new; replacing an existing manual or automated system, or it may a
major modification to an existing system. In the either case, proper implementation is essential to
provide a reliable system to meet organization requirements
Successful implementation may not guarantee improvement in the organization using the new system
(that is a design question) ,but improper will prevent it.
Implementation is the process of having systems personal check out and put new equipment to use,
train users, install the new application and construct any files of data needed to use it.
This phase is less creative than system design. Depending on the size of the organization that will be
involve in using the application and the risk involved in its use, system developer may choose to test the
operation in only one area of the firm with only one or two persons. Sometimes, they will run both old
and new system in parallel way to compare the results. In steel other situations, system developers stop
using the old systems one day and start using the new one the next.
The implementation of the web based or LAN base network project has some extra steps at the time
of implementation. We need to configure the system according the requirement of the software.
29
Conversion Plan
The conversion plan describes the strategies involved in converting data from an existing system to
another hardware or software environment. It is appropriate to reexamine the original system’s
functional requirements for the condition of the system before conversion to determine if the original
requirements are still valid.
Corrective Maintenance
Changes necessitated by actual errors (defects or residual "bugs") in a system are termed corrective
maintenance. These defects manifest themselves when the system does not operate as it was designed or
advertised to do. A defect or “bug” can result from design errors, logic errors and coding errors. Design
errors occur when for example changes made to the software are incorrect, incomplete, wrongly
communicated or the change request misunderstood. In the event of a system failure due to an error,
actions are taken to restore operation of the software system. The approach here is to locate the original
specifications in order to determine what the system was originally designed to do.
Adaptive Maintenance
Any effort that is initiated as a result of changes in the environment in which a software system must
operate is termed adaptive change. Adaptive change is a change driven by the need to accommodate
modifications in the environment of the software system, without which the system would become
increasingly less useful until it became obsolete.
The term environment in this context refers to all the conditions and influences which act from
outside upon the system, for example business rules, government policies, work patterns, software and
hardware operating platforms. A change to the whole or part of this environment will warrant a
corresponding modification of the software.
COMPANY MANAGEMENT SYSTEM 0/0/2014
Perfective Maintenance
This is actually the most common type of maintenance encompassing enhancements both to the
function and the efficiency of the code and includes all changes, insertions, deletions, modifications,
extensions, and enhancements made to a system to meet the evolving and/or expanding needs of the
user. A successful piece of software tends to be subjected to a succession of changes resulting in an
increase in its requirements. This is based on the premise that as the software becomes useful, the users
tend to experiment with new cases beyond the scope for which it was initially developed. Expansion in
requirements can take the form of enhancement of existing system functionality or improvement in
computational efficiency.
Though efforts have been made to develop error free systems, but no system is perfect, room for
improvement is always there. Thus proper documentation for the system has been done so that it will be
easy to handle any breakdown or any other type of system maintenance activity.
31
PROJECT LEGACY
Current Status of the Project
The target decided has been achieved successfully with all the core functionalities and user interface
requirements.
There is no clear and well defined boundary for a project which incorporates the term social.
Because the social means connecting people and this implies unlimited number of attractive features,
ease of use, good looking design and smooth and durable functionality.
This is a Social Application so its needs more attractive features to be embedded in order to attract
more and more audience, more robust and dignified user interface design, highly smooth and enhanced
user experience. All these factors turn this project a life time maintainable and the one which requires
undefined limits of improvement.
That’s why it’s more appropriate to mark the status of the project as underdevelopment. Project had
achieved its core functionality and features. As development process of the project is based on the agile
development model there are many regions with the sign of improvements.
Technical Lessons
Learned the basics of the web development components such as HTML,C#,Asp.Net,Sqlserver and
many others and get familiarized with its power and loopholes.
The market leading technology Asp.Net in web world, have an advanced experience with it.
Sqlserver Management Studio for our database at the backend.
COMPANY MANAGEMENT SYSTEM 0/0/2014
Managerial lessons
33
SOURCE CODE OF THE PROJECT
LIST OF FILES: -
{{{{
Snapshot}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
COMPANY MANAGEMENT SYSTEM 0/0/2014
namespace connection
{
public interface dbParm
{
string dbHostName
{
get;
set;
}
string dbName
{
get;
set;
}
string dbUserName
{
get;
set;
}
string dbPassword
{
get;
set;
}
}
35
string dbStrHostName, dbStrName, dbStrUserName, dbStrPassword;
public SqlConnection con;
{
dbStrPassword = value;
}
}
}
37
}
return false;
}
cmd.Dispose();
return returnDBIntValue;
}
else
return returnDBIntValue;
}
39
}
else
{
return dt;
}
}
module.cs File
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace module1
{
public class clsmodule
{
connection.getConnection cn = new connection.getConnection();
SqlCommand cmd;
DataTable dt;
//DataSet ds;
Int32 returnIntValue = 0;
string returnstring;
//string returnStrinValue = string.Empty;
// bool flag = false;
public Int32 addcountry(int op, int c_id, int country_id, string contry_name, string status, int
admin_id, int company_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@c_id", SqlDbType.Int).Value = c_id;
cmd.Parameters.Add("@country_id", SqlDbType.NVarChar, 50).Value = country_id;
cmd.Parameters.Add("@country_name", SqlDbType.NVarChar, 50).Value = contry_name;
cmd.Parameters.Add("@status", SqlDbType.NVarChar, 50).Value = status;
cmd.Parameters.Add("@admin_id", SqlDbType.Int).Value = admin_id;
cmd.Parameters.Add("@company_id", SqlDbType.NVarChar, 50).Value = company_id;
returnIntValue = cn.getDBInteger("country", cmd);
return returnIntValue;
}
catch (Exception ex)
{
41
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 addstate(int op, int state_id, string state_name, int country_id, int admin_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@state_id", SqlDbType.Int).Value = state_id;
cmd.Parameters.Add("@state_name", SqlDbType.NVarChar).Value = state_name;
cmd.Parameters.Add("@country_id", SqlDbType.NVarChar).Value = country_id;
cmd.Parameters.Add("@admin_id", SqlDbType.NVarChar).Value = admin_id;
returnIntValue = cn.getDBInteger("state", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int addCompany(string cmpny_name, string cmpny_username, string pwd, string address,
string contact, string pincode)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = 1;
cmd.Parameters.Add("@company_name", SqlDbType.NVarChar).Value = cmpny_name;
cmd.Parameters.Add("@cmpny_usrname", SqlDbType.NVarChar).Value = cmpny_username;
cmd.Parameters.Add("@password", SqlDbType.NVarChar).Value = pwd;
cmd.Parameters.Add("@Address", SqlDbType.NVarChar).Value = address;
cmd.Parameters.Add("@ContactNo", SqlDbType.NVarChar).Value = contact;
cmd.Parameters.Add("@Pincode", SqlDbType.NVarChar).Value = address;
43
}
finally
{
cn.closeConnection();
}
}
public int company_updating1(int op, int company_id, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@company_id", SqlDbType.Int).Value = company_id;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("company", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 add_department(int op, int dept_id, int admin_id, string dep_name, int ScompanyID)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("op", SqlDbType.Int).Value = 1;
cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = dept_id;
cmd.Parameters.Add("@admin_id", SqlDbType.Int).Value = admin_id;
cmd.Parameters.Add("@ScompanyID", SqlDbType.Int).Value = ScompanyID;
//cmd.Parameters.Add("@company_name", SqlDbType.NVarChar).Value = company_name;
cmd.Parameters.Add("@dept_name", SqlDbType.NVarChar).Value = dep_name;
// cmd.Parameters.Add("@company_id", SqlDbType.Int).Value = company_id;
returnIntValue = cn.getDBInteger("department", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
COMPANY MANAGEMENT SYSTEM 0/0/2014
{
cn.closeConnection();
}
}
public DataTable login(string username, string password)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@login_name", SqlDbType.NVarChar).Value = username;
cmd.Parameters.Add("@password", SqlDbType.VarChar).Value = password;
dt = cn.getDBDatatable("proc_login", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_country(int op, int c_id, int country_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@c_id", SqlDbType.Int).Value = c_id;
cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
dt = cn.getDBDatatable("country", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_country1(int op, int country_id)
{
try
45
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
dt = cn.getDBDatatable("country", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int country_row_deleting(int op, int c_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("country_id", SqlDbType.Int).Value = c_id;
returnIntValue = cn.getDBInteger("country", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int country_updating(int op, int c_id, int country_id, string c_name, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@c_id", SqlDbType.Int).Value = c_id;
cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
cmd.Parameters.Add("@country_name", SqlDbType.NVarChar).Value = c_name;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("country", cmd);
COMPANY MANAGEMENT SYSTEM 0/0/2014
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int country_updating1(int op, int c_id, int country_id, string c_name)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@c_id", SqlDbType.Int).Value = c_id;
cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = c_name;
returnIntValue = cn.getDBInteger("country", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_state(int op, int c_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@state_id", SqlDbType.Int).Value = c_id;
//cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
dt = cn.getDBDatatable("state", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
47
}
finally
{
cn.closeConnection();
}
}
public int state_row_deleting(int op, int c_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@state_id", SqlDbType.Int).Value = c_id;
returnIntValue = cn.getDBInteger("state", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int state_updating(int op, int s_id, string s_name, string status, int country)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@state_id", SqlDbType.Int).Value = s_id;
cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country;
cmd.Parameters.Add("@state_name", SqlDbType.NVarChar).Value = s_name;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("state", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
}
public int state_updating1(int op, int state_id, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@state_id", SqlDbType.Int).Value = state_id;
// cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("state", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_company(int op, int c_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@company_id", SqlDbType.Int).Value = c_id;
//cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
dt = cn.getDBDatatable("company", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_dept(int op, int d_id)
{
try
{
49
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = d_id;
//cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
dt = cn.getDBDatatable("department", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int dept_row_deleting(int op, int d_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("dept_id", SqlDbType.Int).Value = d_id;
returnIntValue = cn.getDBInteger("department", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int dept_updating(int op, int d_id, string d_name, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = d_id;
// cmd.Parameters.Add("@company_name", SqlDbType.NVarChar).Value = company_name;
cmd.Parameters.Add("@dept_name", SqlDbType.NVarChar).Value = d_name;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("department", cmd);
COMPANY MANAGEMENT SYSTEM 0/0/2014
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int dept_updating1(int op, int dept_id, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = dept_id;
// cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("department", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 add_designation(int op, int desig_id, int admin_id, string desig_name, int dept_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = 1;
cmd.Parameters.Add("@designation_id", SqlDbType.Int).Value = desig_id;
cmd.Parameters.Add("@admin_id", SqlDbType.Int).Value = admin_id;
// cmd.Parameters.Add("@ScompanyID", SqlDbType.Int).Value = ScompanyID;
//cmd.Parameters.Add("@company_name", SqlDbType.NVarChar).Value = company_name;
cmd.Parameters.Add("@designation_name", SqlDbType.NVarChar).Value = desig_name;
cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = dept_id;
//cmd.Parameters.Add("@company_id", SqlDbType.Int).Value = company_id;
returnIntValue = cn.getDBInteger("designation", cmd);
51
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_desig(int op, int d_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@designation_id", SqlDbType.Int).Value = d_id;
//cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = dept_id;
dt = cn.getDBDatatable("designation", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_desig1(int op, int dept_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
//cmd.Parameters.Add("@designation_id", SqlDbType.Int).Value = d_id;
cmd.Parameters.Add("@dept_id", SqlDbType.Int).Value = dept_id;
dt = cn.getDBDatatable("designation", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
finally
{
cn.closeConnection();
}
}
53
}
public int desig_updating1(int op, int desig_id, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@designation_id", SqlDbType.Int).Value = desig_id;
//cmd.Parameters.Add("@designation_name", SqlDbType.NVarChar).Value = desig_name;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("designation", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int add_frontend(int op, int front_id, string frontend_name)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@fronttech_id", SqlDbType.Int).Value = front_id;
cmd.Parameters.Add("@fronttech_name", SqlDbType.NVarChar).Value = frontend_name;
returnIntValue = cn.getDBInteger("fronttech", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_frontend(int op, int f_id)
{
try
{
COMPANY MANAGEMENT SYSTEM 0/0/2014
55
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int frontend_updating1(int op, int front_id, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@fronttech_id", SqlDbType.Int).Value = front_id;
// cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("fronttech", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int add_backend(int op, int backend_id, string backend_name)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@backtech_id", SqlDbType.Int).Value = backend_id;
cmd.Parameters.Add("@backtech_name", SqlDbType.NVarChar).Value = backend_name;
// cmd.Parameters.Add("@company_id", SqlDbType.Int).Value = company_id;
returnIntValue = cn.getDBInteger("backtech", cmd);
return returnIntValue;
}
catch (Exception ex)
{
COMPANY MANAGEMENT SYSTEM 0/0/2014
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_backend(int op, int b_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@backtech_id", SqlDbType.Int).Value = b_id;
//cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
dt = cn.getDBDatatable("backtech", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int backend_row_deleting(int op, int b_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("backtech_id", SqlDbType.Int).Value = b_id;
returnIntValue = cn.getDBInteger("backtech", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
57
public int backend_updating(int op, int b_id, string backend_name, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@backtech_id", SqlDbType.Int).Value = b_id;
cmd.Parameters.Add("@backtech_name", SqlDbType.NVarChar).Value = backend_name;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("backtech", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int backend_updating1(int op, int back_id, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@backtech_id", SqlDbType.Int).Value = back_id;
// cmd.Parameters.Add("@country_id", SqlDbType.Int).Value = country_id;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("backtech", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_empreg(int op, int emp_id)
{
try
{
COMPANY MANAGEMENT SYSTEM 0/0/2014
59
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 update_emp(int op, int empid, string firstname, string lastname, string address, string
email, string mobile, string hobbies)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@emp_id", SqlDbType.Int).Value = empid;
cmd.Parameters.Add("@First_name", SqlDbType.NVarChar).Value = firstname;
cmd.Parameters.Add("@Last_name", SqlDbType.NVarChar).Value = lastname;
cmd.Parameters.Add("@permanent_add", SqlDbType.NVarChar).Value = address;
cmd.Parameters.Add("@Email", SqlDbType.NVarChar).Value = email;
cmd.Parameters.Add("@Mobile", SqlDbType.NVarChar).Value = mobile;
cmd.Parameters.Add("@hobbies", SqlDbType.NVarChar).Value = hobbies;
returnIntValue = cn.getDBInteger("emp_registration", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 add_task(int op, int taskid, string taskname, string beinning, string ending)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@task_id", SqlDbType.Int).Value = taskid;
cmd.Parameters.Add("@Task_Name", SqlDbType.NVarChar).Value = taskname;
cmd.Parameters.Add("@Begining_Date", SqlDbType.VarChar).Value = beinning;
COMPANY MANAGEMENT SYSTEM 0/0/2014
dt = cn.getDBDatatable("Task_register", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
61
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
//---------------------------------------------------
// pas_change function
//---------------------------------------------------
public string change_pwd(int op, int empid, string pwd, string new_pwd)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@emp_id", SqlDbType.Int).Value = empid;
cmd.Parameters.Add("@pwd", SqlDbType.VarChar).Value = pwd;
cmd.Parameters.Add("@new_pwd", SqlDbType.VarChar).Value = new_pwd;
returnstring = cn.getDBString("change_pwd", cmd);
return returnstring;
COMPANY MANAGEMENT SYSTEM 0/0/2014
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int task_updating(int op, int t_id, string tskname, string begin, string end, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@task_id", SqlDbType.Int).Value = t_id;
cmd.Parameters.Add("@Task_Name", SqlDbType.NVarChar).Value = tskname;
cmd.Parameters.Add("@Begining_Date", SqlDbType.VarChar).Value = begin;
cmd.Parameters.Add("@Ending_Date", SqlDbType.VarChar).Value = end;
cmd.Parameters.Add("@Status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("Task_register", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public int task_updating1(int op, int taskid, string status)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@task_id", SqlDbType.Int).Value = taskid;
cmd.Parameters.Add("@status", SqlDbType.NVarChar).Value = status;
returnIntValue = cn.getDBInteger("Task_register", cmd);
return returnIntValue;
}
catch (Exception ex)
{
63
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_emp(int op, int emp_id)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@emp_id", SqlDbType.Int).Value = emp_id;
dt = cn.getDBDatatable("emp_registration", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_TaskRegister(int op, int tskid)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@task_id", SqlDbType.Int).Value = tskid;
dt = cn.getDBDatatable("task_register", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 add_TaskAssign(int op, int taskassignid, int taskid, int empid, string begin, string end)
COMPANY MANAGEMENT SYSTEM 0/0/2014
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@taskassign_id", SqlDbType.Int).Value = taskassignid;
cmd.Parameters.Add("@emp_id", SqlDbType.Int).Value = empid;
cmd.Parameters.Add("@task_id", SqlDbType.Int).Value = taskid;
cmd.Parameters.Add("@Begining_Date", SqlDbType.NVarChar).Value = begin;
cmd.Parameters.Add("@Ending_Date", SqlDbType.NVarChar).Value = end;
returnIntValue = cn.getDBInteger("taskAssign", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public DataTable select_taskAssign(int op, int taskAssignid, int empid)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@taskassign_id", SqlDbType.Int).Value = taskAssignid;
cmd.Parameters.Add("@emp_id", SqlDbType.Int).Value = empid;
dt = cn.getDBDatatable("taskAssign", cmd);
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 delete_row_taskasign(int op, int tskasnid)
{
try
{
65
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@taskassign_id", SqlDbType.Int).Value = tskasnid;
returnIntValue = cn.getDBInteger("taskAssign", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 update_image(int op,int eID, string img)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("@op", SqlDbType.Int).Value = op;
cmd.Parameters.Add("@emp_id", SqlDbType.Int).Value = eID;
cmd.Parameters.Add("@image", SqlDbType.VarChar).Value = img;
returnIntValue = cn.getDBInteger("emp_registration", cmd);
return returnIntValue;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cn.closeConnection();
}
}
public Int32 add_que(int que_id, string que_name, string opt_a, string opt_b, string opt_c, string
opt_d, string ans)
{
try
{
cmd = new SqlCommand();
cmd.Parameters.Add("queid", SqlDbType.NVarChar, (50)).Value = que_id;
cmd.Parameters.Add("@quename", SqlDbType.NVarChar, (50)).Value = que_name;
cmd.Parameters.Add("opt_a", SqlDbType.NVarChar, (50)).Value = opt_a;
cmd.Parameters.Add("opt_b", SqlDbType.NVarChar, (50)).Value = opt_b;
cmd.Parameters.Add("opt_c", SqlDbType.NVarChar, (50)).Value = opt_c;
COMPANY MANAGEMENT SYSTEM 0/0/2014
// ========================================================
// forgot_pwd
//========================================================
}
}
67
Admin
SuperAdminMaster.master.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
}
}
}
}
}
}
AddBackend.aspx.cs
69
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
}
else
{
status1 = "enable";
}
returnint = cmod.backend_updating1(4, backtech_id, status1);
if (returnint == 1)
{
lblmsg.Text = "succes";
}
bind_gridview();
}
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int b_id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint = cmod.backend_row_deleting(3, b_id);
if (returnint == 1)
{
lblmsg.Text = "deletd";
bind_gridview();
}
71
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int b_id=Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
TextBox b_name = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtback");
TextBox status=(TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatus");
returnint=cmod.backend_updating(1,b_id,b_name.Text,status.Text);
if (returnint == 1)
{
lblmsg.Text = "updated";
GridView1.EditIndex = -1;
bind_gridview();
}
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
bind_gridview();
}
}
7
[COMPANY MANAGEMENT SYSTEM] 3
AddCountry.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
}
if (!Page.IsPostBack)
{
bind_gridviw();
}
}
public void bind_gridviw()
{
dt = cmod.select_country(2, 0, 0);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
71
GridView1.DataBind();
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int coutryID = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
bind_gridviw();
}
}
else
{
status1 = "enable";
}
returnint = cmod.country_updating1(1, 2, country_id, status1);
if (returnint == 1)
{
lblmsg.Text = "succes";
}
bind_gridviw();
}
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
75
AddDepartment.apsx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
adminID = Convert.ToInt32(Request.QueryString["loginID"]);
companyID = Convert.ToInt32(Session["companyID"]);
int dept_id = 0;
returnint = cmod.add_department(1, dept_id, adminID,txtDept.Text, companyID);
if (returnint == 1)
{
lblmsg.Text = "success";
bind_gridviw();
}
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
bind_gridviw();
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "chngestatus")
{
int d_id = Convert.ToInt32(e.CommandArgument);
dt = cmod.select_dept(2,d_id);
if (dt.Rows.Count > 0)
{
string status = dt.Rows[0]["status"].ToString();
if (status == "enable")
{
status1 = "disable";
}
else
{
status1 = "enable";
}
returnint = cmod.dept_updating1(4, d_id, status1);
if (returnint == 1)
{
lblmsg.Text = "succes";
77
}
bind_gridviw();
}
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int dept_id=Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint = cmod.dept_row_deleting(3, dept_id);
if (returnint == 1)
{
lblmsg.Text = "deleted";
bind_gridviw();
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int deptid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
TextBox dept_name = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtdeptname");
TextBox status = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatus");
String d_name = dept_name.Text;
String dept_status = status.Text;
returnint = cmod.dept_updating(1,deptid,d_name,dept_status);
if(returnint==1)
{
lblmsg.Text = "suucess";
GridView1.EditIndex = -1;
bind_gridviw();
}
}
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
AddDesignation.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
79
public void bind_dropdownlist_department()
{
dt = cmod.select_dept(2, 0);
if (dt.Rows.Count > 0)
{
drp_dept.DataSource = dt;
drp_dept.DataValueField = "dept_id";
drp_dept.DataTextField = "dept_name";
drp_dept.DataBind();
}
else
drp_dept.Items.Clear();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
adminID = Convert.ToInt32(Request.QueryString["loginID"]);
dept_id = Convert.ToInt32(drp_dept.SelectedValue);
}
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int desig_id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint = cmod.desig_row_deleting(3, desig_id);
if (returnint == 1)
{
lblmsg.Text = "deleted";
bind_gridview();
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
bind_gridview();
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int desig_id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
DropDownList dept_name =
(DropDownList)GridView1.Rows[e.RowIndex].FindControl("drpdeptname");
TextBox desig_name = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtdesigname");
TextBox status = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatus");
string d_name = desig_name.Text;
string Status = status.Text;
returnint = cmod.desig_updating(1, desig_id,Convert.ToInt32(dept_name.SelectedValue), d_name,
Status);
if (returnint == 1)
81
{
lblmsg.Text = "updated";
GridView1.EditIndex = -1;
bind_gridview();
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if ((e.Row.RowState & DataControlRowState.Edit) > 0)
{
//DropDownList ddl = (DropDownList)e.Row.FindControl("drpcountryname");
//dt = cmod.select_country(2, 0, 0);
//if (dt.Rows.Count > 0)
//{
// ddl.DataSource = dt;
// ddl.DataTextField = "country_name";
// ddl.DataValueField = "country_id";
// ddl.DataBind();
//}
//DataRowView dr = e.Row.DataItem as DataRowView;
//ddl.SelectedValue = dr["country_id"].ToString();
}
}
}
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
AddEmployee.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
83
drp_dept.DataSource = dt;
drp_dept.DataValueField = "dept_id";
drp_dept.DataTextField = "dept_name";
drp_dept.DataBind();
}
else
drp_dept.Items.Clear();
}
public void bind_dropdownlist_designation()
{
}
public void bind_dropdownlist_fronttech()
{
dt = md.select_frontend(2, 0);
if (dt.Rows.Count > 0)
{
drp_front.DataSource = dt;
drp_front.DataValueField = "fronttech_id";
drp_front.DataTextField = "fronttech_name";
drp_front.DataBind();
}
}
public void bind_dropdownlist_backtech()
{
dt = md.select_backend(2, 0);
if (dt.Rows.Count > 0)
{
drp_back.DataSource = dt;
drp_back.DataValueField = "backtech_id";
drp_back.DataTextField = "backtech_name";
drp_back.DataBind();
}
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
System.DateTime myDate = new System.DateTime();
myDate = Calendar1.SelectedDate;
doj.Text = myDate.ToString("dd/MM/yyyy");
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
string savepath = "EmployeePics/";
string filename = FileUpload1.FileName;
savepath += filename;
FileUpload1.SaveAs(Server.MapPath(savepath));
string str = "";
COMPANY MANAGEMENT SYSTEM 0/0/2014
85
txtmobile.Text = "";
txtland.Text = "";
txtemail.Text = "";
txtpasswd.Text = "";
txtcnfrmpasswd.Text = "";
for (int i = 0; i < hobbies.Items.Count; i++)
{
if (hobbies.Items[i].Selected)
{
hobbies.Items[i].Selected = false;
}
}
}
protected void drp_dept_SelectedIndexChanged(object sender, EventArgs e)
{
dt = md.select_desig1(6,Convert.ToInt32(drp_dept.SelectedValue));
if (dt.Rows.Count > 0)
{
drp_desig.DataSource = dt;
drp_desig.DataValueField = "designation_id";
drp_desig.DataTextField = "designation_name";
drp_desig.DataBind();
}
else
drp_desig.Items.Clear();
}
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
AddFront.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
87
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
returnint = cmod.add_frontend(1, 0, txtfront.Text);
if (returnint == 1)
{
lblmsg.Text = "insertd";
bind_gridview();
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
string status1;
if (e.CommandName == "chngestatus")
{
int fronttech_id = Convert.ToInt32(e.CommandArgument);
dt = cmod.select_frontend(2, fronttech_id);
if (dt.Rows.Count > 0)
{
string status = dt.Rows[0]["status"].ToString();
if (status == "enable")
{
status1 = "disable";
}
else
{
status1 = "enable";
}
returnint = cmod.frontend_updating1(4, fronttech_id, status1);
if (returnint == 1)
{
lblmsg.Text = "succes";
}
bind_gridview();
}
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int f_id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint = cmod.frontend_row_deleting(3, f_id);
COMPANY MANAGEMENT SYSTEM 0/0/2014
if (returnint == 1)
{
lblmsg.Text = "deletd";
bind_gridview();
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int f_id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
TextBox f_name = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtfront");
TextBox status = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatus");
returnint = cmod.frontend_updating(1, f_id, f_name.Text, status.Text);
if (returnint == 1)
{
lblmsg.Text = "updated";
GridView1.EditIndex = -1;
bind_gridview();
}
}
}
89
AddState.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
dt = cmod.select_country(2, 0, 0);
if (dt.Rows.Count > 0)
{
drp_country.DataSource = dt;
COMPANY MANAGEMENT SYSTEM 0/0/2014
drp_country.DataValueField = "country_id";
drp_country.DataTextField = "country_name";
drp_country.DataBind();
}
else
drp_country.Items.Clear();
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int StateID = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint = cmod.state_row_deleting(3, StateID);
if (returnint == 1)
{
lblmsg.Text = "succeful";
bind_gridviw();
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
bind_gridviw();
//DropDownList ddl=
((DropDownList)GridView1.Rows[e.NewEditIndex].Cells[0].FindControl("drpcountryname"));
//dt = cmod.select_country(2, 0, 0);
//if (dt.Rows.Count > 0)
//{
// ddl.DataSource = dt;
// ddl.DataTextField = "country_name";
// ddl.DataValueField = "country_id";
// ddl.DataBind();
//}
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
91
int stateID = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
DropDownList country_name =
(DropDownList)GridView1.Rows[e.RowIndex].FindControl("drpcountryname");
TextBox s_name = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatename");
TextBox status = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatus");
returnint=cmod.state_updating(1,stateID,s_name.Text,status.Text,Convert.ToInt32(country_name.
SelectedValue));
if (returnint == 1)
{
lblmsg.Text = "suucess";
GridView1.EditIndex = -1;
bind_gridviw();
}
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
bind_gridviw();
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "chngestatus")
{
int st_id = Convert.ToInt32(e.CommandArgument);
dt = cmod.select_state(2, st_id);
if (dt.Rows.Count > 0)
{
string status = dt.Rows[0]["status"].ToString();
if (status == "enable")
{
status1 = "disable";
COMPANY MANAGEMENT SYSTEM 0/0/2014
}
else
{
status1 = "enable";
}
returnint = cmod.state_updating1(4, st_id, status1);
if (returnint == 1)
{
lblmsg.Text = "succes";
}
bind_gridviw();
}
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if((e.Row.RowState & DataControlRowState.Edit)>0)
{
//DropDownList ddl = (DropDownList)e.Row.FindControl("drpcountryname");
//dt = cmod.select_country(2, 0, 0);
//if (dt.Rows.Count > 0)
//{
// ddl.DataSource = dt;
// ddl.DataTextField = "country_name";
// ddl.DataValueField = "country_id";
// ddl.DataBind();
//}
//DataRowView dr = e.Row.DataItem as DataRowView;
//ddl.SelectedValue = dr["country_id"].ToString();
}
}
}
//public void chnge_index()
//{
// int cID=Convert.ToInt32(
//}
AddTaskAssign.aspx.cs
93
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
drp_emp.DataBind();
}
}
public void bind_drpTaskAssign()
{
dt = cmod.select_task(2, 0);
if (dt.Rows.Count > 0)
{
drp_taskassign.DataSource = dt;
drp_taskassign.DataTextField = "Task_Name";
drp_taskassign.DataValueField = "task_id";
drp_taskassign.DataBind();
}
}
protected void drp_taskassign_SelectedIndexChanged(object sender, EventArgs e)
{
int TaskNameID = Convert.ToInt32(drp_taskassign.SelectedValue);
dt = cmod.select_TaskRegister(2, TaskNameID);
if (dt.Rows.Count > 0)
{
txtbegin.Text = dt.Rows[0]["Begining_Date"].ToString();
txtend.Text = dt.Rows[0]["Ending_Date"].ToString();
}
else
{
txtbegin.Text = "";
txtend.Text = "";
}
}
public void bind_gridview()
{
dt = cmod.select_taskAssign(4, 0,0);
if(dt.Rows.Count>0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int tskassignID=Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint = cmod.delete_row_taskasign(3, tskassignID);
if (returnint == 1)
{
lblmsg.Text = "deleted";
95
bind_gridview();
}
}
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
AddTaskManager.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
if (Request.QueryString["loginId"] == null)
{
Response.Redirect("../login.aspx");
}
else
{
adminID = Convert.ToInt32(Request.QueryString["loginId"]);
}
if (!Page.IsPostBack)
{
bind_gridview();
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
returnint = cmod.add_task(1, 0, txtname.Text, txtbegin.Text, txtend.Text);
if (returnint == 1)
{
lblmsg.Text = "inserted";
97
bind_gridview();
}
}
public void bind_gridview()
{
dt = cmod.select_task(2, 0);
if(dt.Rows.Count>0)
{
GridView1.DataSource=dt;
GridView1.DataBind();
}
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
bind_gridview();
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "chngestatus")
{
int taskid = Convert.ToInt32(e.CommandArgument);
dt = cmod.select_task(2, taskid);
if (dt.Rows.Count > 0)
{
string status = dt.Rows[0]["status"].ToString();
if (status == "pending")
{
status1 = "complete";
}
else
{
status1 = "pending";
}
returnint = cmod.task_updating1(4, taskid, status1);
if (returnint == 1)
{
lblmsg.Text = "succes";
}
bind_gridview();
}
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
COMPANY MANAGEMENT SYSTEM 0/0/2014
int taskid=Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
returnint=cmod.task_row_deleting(3,taskid);
if(returnint==1)
{
lblmsg.Text="row deleted";
bind_gridview();
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int tskid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
TextBox t_name = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtname");
TextBox begin = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtbeginingdate");
TextBox end = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtendingdate");
TextBox status = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtstatus");
returnint = cmod.task_updating(1,tskid, t_name.Text, begin.Text, end.Text,status.Text);
if (returnint == 1)
{
lblmsg.Text = "suucess";
GridView1.EditIndex = -1;
bind_gridview();
}
}
}
99
viewEmployees.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
}
}
}
viewCompletedTask.aspx.cs
101
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
viewIncompleteTasks.apsx.cs
COMPANY MANAGEMENT SYSTEM 0/0/2014
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
viewPendingTasks.aspx.cs
103
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
Employee
COMPANY MANAGEMENT SYSTEM 0/0/2014
Dashboard.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
EmployeeMasterPage.master.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
Pwd.aspx.cs
using System;
107
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
}
COMPANY MANAGEMENT SYSTEM 0/0/2014
else
{
if (txt_new.Text == txt_cnfm.Text)
{
returnstring = cmod.change_pwd(2, Convert.ToInt32(Session["empID"]), null,
txt_new.Text);
lbl_msg.Text = "password updated";
}
else
{
lbl_msg.Text = "new password not match";
}
}
}
catch (Exception ex)
{
lbl_msg.Text = ex.Message;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
}
}
viewemployee.aspx.cs
109
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
}
protected void DetailsView1_ItemCommand(object sender, DetailsViewCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
DetailsView1.ChangeMode(DetailsViewMode.Edit);
}
}
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e)
{
}
protected void DetailsView1_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
empID = Convert.ToInt32(Session["empID"]);
TextBox Empname = (TextBox)(DetailsView1).FindControl("txtfname");
TextBox Lastname = (TextBox)(DetailsView1).FindControl("txtlname");
TextBox address = (TextBox)(DetailsView1).FindControl("txtaddress");
TextBox Email = (TextBox)(DetailsView1).FindControl("txtemail");
TextBox MobileNo=(TextBox)(DetailsView1).FindControl("txtmobile");
TextBox Hobbies = (TextBox)(DetailsView1).FindControl("txthobbies");
returnint = cmod.update_emp(1, empID, Empname.Text, Lastname.Text , address.Text ,
Email.Text , MobileNo.Text , Hobbies.Text);
if (returnint == 1)
{
DetailsView1.ChangeMode(DetailsViewMode.ReadOnly);
bind_employee();
}
}
}
viewPendingTask.aspx.cs
111
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
viewCompletedTask.aspx.cs
COMPANY MANAGEMENT SYSTEM 0/0/2014
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
viewtask.aspx.cs
113
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
}
public void bind_employee()
{
// string currentdate = DateTime.Now.ToString("dd/MM/yyyy");
//string enddate = ViewState["end_date"].ToString();
dt = cmod.select_task_emp(5, 0,Convert.ToInt32(Session["empID"]));
if (dt.Rows.Count > 0)
{
drp_taskcompleted.DataSource = dt;
drp_taskcompleted.DataTextField = "Task_Name";
drp_taskcompleted.DataValueField = "taskassign_id";
drp_taskcompleted.DataBind();
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
dt1 = cmod.select_task_emp(5, Convert.ToInt32(drp_taskcompleted.SelectedValue),
Convert.ToInt32(Session["empID"]));
string status = dt1.Rows[0]["Status"].ToString();
int taskID=Convert.ToInt32(dt1.Rows[0]["task_id"]);
COMPANY MANAGEMENT SYSTEM 0/0/2014
if(status=="pending")
{
string status1;
status1 = "complete";
returnint = cmod.task_updating1(4, taskID, status1);
if (returnint == 1)
{
lblmsg.Text = "updated";
}
GridView1.DataBind();
}
}
protected void drp_taskcompleted_SelectedIndexChanged(object sender, EventArgs e)
{
dt1 = cmod.select_task_emp(5, Convert.ToInt32(drp_taskcompleted.SelectedValue),
Convert.ToInt32(Session["empID"]));
if (dt1.Rows.Count > 0)
{
ViewState["end_date"] = dt1.Rows[0]["Ending_Date"].ToString();
GridView1.DataSource = dt1;
GridView1.DataBind();
}
}
}
<div class="niceform">
<fieldset>
<dl>
<dt><label for="email">Backend_technology:</label></dt>
</dl>
<dl class="submit">
onclick="btnSubmit_Click"/>
</dl>
</fieldset>
</div>
</td>
</tr>
<tr>
COMPANY MANAGEMENT SYSTEM 0/0/2014
<td>
DataKeyNames="backtech_id" CssClass="rounded-corner"
CellPadding="4" onrowcancelingedit="GridView1_RowCancelingEdit"
onrowcommand="GridView1_RowCommand" onrowdeleting="GridView1_RowDeleting"
onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="backtech_name">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
117
<asp:TemplateField HeaderText="change_status">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
COMPANY MANAGEMENT SYSTEM 0/0/2014
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</asp:Content>
AddCountry.aspx
119
<%@ Page Language="C#" MasterPageFile="~/Admin/SuperAdminMaster.master"
AutoEventWireup="true" CodeFile="AddCountry.aspx.cs" Inherits="SuperAdmin_Default2"
Title="Untitled Page" %>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<div class="niceform">
<fieldset>
<dl>
</dl>
<dl class="submit">
onclick="btnSubmit_Click"/>
</dl>
COMPANY MANAGEMENT SYSTEM 0/0/2014
</fieldset>
</div>
</td>
</tr>
<tr>
<td>
DataKeyNames="country_id" onrowcancelingedit="GridView1_RowCancelingEdit"
onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing"
onrowupdating="GridView1_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="Country_Name">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="status">
<EditItemTemplate>
121
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="change_status">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
COMPANY MANAGEMENT SYSTEM 0/0/2014
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</asp:Content>
AddDepartment.aspx
123
<%@ Page Language="C#" MasterPageFile="~/Admin/SuperAdminMaster.master"
AutoEventWireup="true" CodeFile="AddDepatment.aspx.cs" Inherits="SuperAdmin_Default"
Title="Untitled Page" %>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<div class="niceform">
<fieldset>
<dl>
</dl>
<dl class="submit">
onclick="btnSubmit_Click"/>
<tr> <td>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="dept_id" CssClass="rounded-corner"
CellPadding="4" onrowcancelingedit="GridView1_RowCancelingEdit"
onrowcommand="GridView1_RowCommand" onrowdeleting="GridView1_RowDeleting"
onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="Dept_name">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
125
</asp:TemplateField>
<asp:TemplateField HeaderText="change_status">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
</asp:GridView> </td></tr></table>
</asp:Content>
127
AddEmployee.aspx
<%@ Page Language="C#" MasterPageFile="~/Admin/SuperAdminMaster.master"
AutoEventWireup="true" CodeFile="AddEmployee.aspx.cs" Inherits="SuperAdmin_Default"
Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<tr>
<td>
</td>
</tr>
<tr>
<td>
<div class="niceform">
<fieldset>
<dl><dt><label for="email">ImageUpload:</label></dt>
</dl>
<dl>
<dt><label for="email">FirstName:</label></dt>
</dd>
</dl>
<dl>
COMPANY MANAGEMENT SYSTEM 0/0/2014
<dt><label for="email">LastName:</label></dt>
</dd>
</dl>
<dl>
<dt><label for="email">DateOfBirth:</label></dt>
ControlToValidate="DOB"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
ControlToValidate="txtFather"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
129
<dd><asp:TextBox ID="txtmother" runat="server" CssClass="NFText"></asp:TextBox>
ControlToValidate="txtmother"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
AutoPostBack="True"
onselectedindexchanged="drp_dept_SelectedIndexChanged">
</asp:DropDownList>
ControlToValidate="drp_dept"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
AutoPostBack="True" AppendDataBoundItems="true">
</asp:DropDownList>
COMPANY MANAGEMENT SYSTEM 0/0/2014
ControlToValidate="drp_desig"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
<dt><label for="email">FrontEnd_Technology:</label></dt>
AutoPostBack="True" AppendDataBoundItems="true">
</asp:DropDownList>
ControlToValidate="drp_front"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
<dt><label for="email">BackEnd_Technology:</label></dt>
AutoPostBack="True" AppendDataBoundItems="true">
</asp:DropDownList>
131
ControlToValidate="drp_back"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
</dd>
</dl>
<dl>
<dt><label for="email">Date_Of_Joining:</label></dt>
onselectionchanged="Calendar1_SelectionChanged"></asp:Calendar></dd>
</dl>
<dl>
<dt><label for="email">Experiance:</label></dt>
</dd>
</dl>
<dl>
<dt><label for="email">Address:</label></dt>
TextMode="MultiLine"></asp:TextBox>
ControlToValidate="txtaddress"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
COMPANY MANAGEMENT SYSTEM 0/0/2014
</dd>
</dl>
<dl>
<dt><label for="email">MobileNo:</label></dt>
ControlToValidate="txtmobile"
ErrorMessage="mandatory"></asp:RequiredFieldValidator>
ValidationExpression="^[0-9]{10}"></asp:RegularExpressionValidator>
</dd>
</dl>
<dl>
</dl>
<dl>
<dt><label for="email">EmailID:</label></dt>
</dl>
<dl>
<dt><label for="email">Gender:</label></dt>
133
<dd><asp:RadioButtonList ID="gender" runat="server">
<asp:ListItem Value="female"></asp:ListItem>
</asp:RadioButtonList></dd>
</dl>
<dl>
<dt><label for="email">Hobbies:</label></dt>
<asp:ListItem Value="dancing"></asp:ListItem>
<asp:ListItem Value="music"></asp:ListItem>
</asp:CheckBoxList></dd>
</dl>
<dl>
<dt><label for="email">Password:</label></dt>
TextMode="Password"></asp:TextBox></dd>
</dl>
<dl>
TextMode="Password"></asp:TextBox>
COMPANY MANAGEMENT SYSTEM 0/0/2014
ControlToCompare="txtcnfrmpasswd" ControlToValidate="txtpasswd"
ErrorMessage="no match"></asp:CompareValidator>
</dd>
</dl>
<dl class="submit">
onclick="btnSubmit_Click"/>
</dl>
</fieldset>
</div>
</td>
</tr>
</table>
</asp:Content>
135
AddTaskAssign.aspx
<tr>
</td>
</tr>
<tr>
<div class="niceform">
<fieldset>
<dl><dt><label for="email">Select Employee:</label></dt>
</asp:DropDownList></dd>
</dl>
<dl>
onselectedindexchanged="drp_taskassign_SelectedIndexChanged"
AppendDataBoundItems="true">
</asp:DropDownList></dd>
COMPANY MANAGEMENT SYSTEM 0/0/2014
</dl>
<dl>
<dt><label for="email">beginning_Date:</label></dt>
</dl>
<dl>
</dl>
<dl class="submit">
onclick="btnSubmit_Click"/>
</dl>
</fieldset>
</div>
</td>
</tr>
<tr>
Height="10px" Width="420px"
onrowdeleting="GridView1_RowDeleting">
137
<Columns>
<asp:TemplateField HeaderText="Emp_name">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Task_Name">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Beginning_Date">
<EditItemTemplate>
</EditItemTemplate>
COMPANY MANAGEMENT SYSTEM 0/0/2014
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ending_Date">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
139
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField> </Columns>
</asp:GridView>
</td>
</tr>
</table>
</asp:Content>
COMPANY MANAGEMENT SYSTEM 0/0/2014
Conclusion
“Company Management System” project has done successfully. The main reason has to
developed this project was to provide the full knowledge of IT company.Admin having all the
privilages .He/she can give privileges to employee’s. In this way save the time of Employees.
Employee’s know the exact modules and their time in which the module should be complete. This
Website give details of each and every single information related to Employee in company. And
the modules which are assigned to Employee. Administrator can do any change at the back-end as well
as at the front-end.
141
BIBLIOGRAPHY
www.w3school.com
www.codeproject.com
stackoverflow.com
Asp.Net Book