Mailing System
Mailing System
Mailing System
Mailing system is a very useful application that is used for the communication purposes of educational institutions. The application is developed using ASP.Net and C#, with sql server as the back end. There are two modules in this application. They are users and administrators. The administrators have full access to the application i.e. the administrator can access all of the modules in the application, while the users have restricted access that is they can use only some of the modules. The purpose of this project is to create an application for a university. So that communication among different departments is possible. The proposed system is to create a mailing system such that each user (Employee of the university) will have communicate with other users in the university. This project comprises of two modules: 1. Administrator module. 2. User module. 1. Administrator Module: This application deals with database maintenance and differentiating users according to their roles, the administrator has privileges to delete any user at any point of time. 2. User module: In this module, the users (Employee of the university) will create own mail-ids and can have all mailing facilities. Each module in their application consists of their own authentication and can view/enter the details as when required. This application also deals with the security in order to make the application secured. It uses the authentication techniques to provide role-based security. In order to make the database consistent, necessary steps are taken while creating the database. The exception handling techniques are used to provide code based security to prevent the application from abnormal termination.
2
access to the
application according to their roles, create their own mail-ids and can use this id to
SYSTEM SPECIFICATIONS
The selection of hardware is very important in the existence and proper working of any software. When selecting hardware, the size and requirements are also important.
Project will be done in ASP. NET with C# as front end and SQL Server 2005 as back end. Microsoft .NET is framework that connects information, people, systems and devices. It spans clients, servers and developer tools and consists of:
The .NET Framework programming model that enables developers to build Webbased applications which expose their functionality programmatically over a network using standard protocols such as HTTP.
Developer tools such as Microsoft Visual Studio .NET, which provide a rapid application integrated development environment for programming with the .NET Framework. Client software such as Windows XP, Windows CE and Microsoft Office XP that helps developers deliver a deep and compelling user experience across a family of devices and existing products.
The .NET Framework is the programming model of the .NET environment for building, deploying and running Web- based applications, smart client applications and XML Web services. It manages much of the plumbing, enabling developers to focus on writing the business logic code for their applications. The .NET Framework includes the common language runtime and class libraries.
ORGANIZATIONAL PROFILE
Krishna University largely caters to the higher educational needs of people in Krishna District in particular and Andhra Pradesh in general. Krishna district was one of the oldest British administered areas of Andhra Pradesh. It was formerly called Masulapatnam district, and in1859 when the then Guntur district was delinked, certain taluks, thereof, were added to this, which was renamed as Krishna district, after the mighty river Krishna. This district is endowed
6
with a rich variety of soils, and occupies an important place in agriculture. This district is also known for the availability of mineral sources like Chromites, Diamonds, Iron ore, Limestone, Mica and Sulphur. This district has a geographical area of 8727 Sq Mt with a population of around 42 lakhs. This District is endowed with one of the largest fresh water lakes called Kolleru Lake. Krishna University is established in a great historic coastal town called Machilipatnam, which are the head quartos of Krishna district of Andhra Pradesh. Machilipatnam is a city and a special grade municipality in Krishna district in Indian state of Andhra Pradesh Krishna University is presently located at Andhra Jateeya kalasala, a famous first grade college in Machilipatnam. The university will function from the academic year 2008-09 in the academic blocks of A.J Kalasala Campus allotted for this purpose.
SYSTEM ANALYSIS
4.1 DEFINITION
System Analysis is the detailed study of the various operations performed by the system and their relationships within and outside the system. Analysis is the process of breaking something into its parts so that the whole may be understood. System analysis is concerned with becoming aware of the problem, identifying the relevant and most decisional variables, analyzing
8
and synthesizing the various factors and determining an optimal or at least a satisfactory solution. During this a problem is identified, alternate system solutions are studied and recommendations are made about committing the resources used to design the system
4.3 ADVANTAGES
Speed: As the application is developed on Local Net, the messages are delivered instantly resulting fast communication. Easy to prioritize: Since the mails have subject lines, it is easy to prioritize them and ignore unwanted mails. Reliable and secure: Constant efforts are being taken to improve the security in electronic mails. Thus making it one of the secured ways of communication. Informal and conversational: The language used in e-mails is generally simple and thus makes the communication informal. Sending and receiving e-mails takes less time, so it can be used as a tool for interaction.
be relatively cheap and done at the earliest possible time. Depending on the study, the decision is made whether to go ahead with a more detailed analysis. When a new project is proposed, it normally goes through feasibility assessment. Feasibility study is carried out to determine whether the proposed system is possible to develop with available resources and what should be the cost consideration. Facts considered in the feasibility analysis were. Technical Feasibility Economic Feasibility Behavioral Feasibility
Thus feasibility study should center along the following points: Improvement resulting over the existing method in terms of accuracy, timeliness. Cost comparison Estimate on the life expectancy of the hardware Overall objective Our project is economically feasible. It does not require much cost to be involved in the overall process. The overall objectives are in easing out the requirement processes.
11
SYSTEM DESIGN
5.1 DEFINITION
The most creative and challenging face of the system development is System Design. It provides the understanding and procedural details necessary for implementing the system recommended in the feasibility study. Design goes through the logical and physical stages of development. In designing a new system, the system analyst must have a clear understanding of the objectives, which the design is aiming to fulfill. The first step is to determine how the output is to
12
be produced and in what format. Second, input data and master files have to be designed to meet the requirements of the proposed output. The operational phases are handled through program construction and testing. Design of a system can be defined as a process of applying various techniques and principles for the purpose of defining a device, a process or a system in sufficient detail to permit its physical realization. Thus system design is a solution to how to approach to the creation of a new system. Thus important phase provides the understanding and the procedural details necessary for implementing the system recommended in the feasibility study. The design step provides a data design, architectural design, and a procedural design.
major approach to input design is the menu and the prompt design. In each alternative, the users options are predefined. The data flow diagram indicates logical data flow, data stores, source and destination. Input data are collected and organized into a group of similar data. Once identified input media are selected for processing. In this software, importance is given to develop Graphical User Interface (GUI), which is an important factor in developing efficient and user-friendly software. For inputting user data, attractive forms are designed. User can also select desired options from the menu, which provides all possible facilities. Also the important input format is designed in such a way that accidental errors are avoided. The user has to input only just the minimum data required, which also helps in avoiding the errors that the users may make. Accurate designing of the input format is very important in developing efficient software. The goal or input design is to make entry as easy, logical and free from errors.
The first level produces system design, which defines the components needed for the system, and how the components interact with each other. It focus is on depending on in which that modules are needed for the system, the specification of these modules and how the module should be interconnected.
15
Using the above mentioned diagrams we can show the entire system regarding the working of the system or the flow of control and sequence of flow the state of the system and the activities involved in the system.
16
real people can use. A little stick figure is used to identify an actor the ellipse represents usecase.
17
An object diagram shows the objects and their relationships with one another. A collaboration Diagram is an extension of the object diagram. In addition to the associations among objects, the collaboration diagram shows the messages the objects and each other.
USE-CASE DIAGRAM
18
Registratio n
Login
Inbox
Reply
Use r
Compose
Mail
Sent Mail
Settings
Sign Out
19
Login
Inbox
Compose Mail
Administrator
Users Profile
Sign Out
CLASS DIAGRAM:
20
The object model, represented in UML with Class diagrams, Describes the structure of system in terms of objects, attributes, associations. The UML enables us to model the classes in a system and their relationships via class diagrams. In a class diagram, each class is modeled as a rectangle. This rectangle can be divided into three parts. The top part contains the name of the class. The middle part contains the classs attributes. The bottom contains the classs operations. The UML defines object diagrams which are similar to class diagrams except that they model objects and links-links are relationships between objects. Object diagrams present a snapshot of the structure while the system is running this provides information about which objects are participating in the system at a specific point in time.
21
LOGIN Public SqlConnection con Public SqlCommand cmd Public int i Button3_Click(object sender, EventArgs e) Button2_Click(object sender, EventArgs e) LinkButton1_Click(object sender, EventArgs e) Page_Load(object sender, EventArgs e)
INBOX Public SqlConnection con Public DataSet ds Public SqlCommand cmd Page_Load(object sender, EventArgs e) c1_CheckedChanged(object sender, EventArgs e) GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
22
Linkbutton1_Command(object sender, CommandEventArgs e) Linkbutton10_Command(object sender, CommandEventArgs e) GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) LinkButton4_Click(object sender, EventArgs e)
ADMIN_LOGIN
Protected Page_Load(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e) Protected Button2_Click(object sender, EventArgs e)
REGISTRATION Public string g Public SqlConnection con Public SqlCommand cmd Protected Button1_Click(object sender, EventArgs e) Protected DropDownList1_SelectedIndexChanged(object sender, EventArgs e) Protected DropDownList3_SelectedIndexChanged(object sender, EventArgs e) Protected Page_Load(object sender, EventArgs e) Protected Button3_Click(object sender, EventArgs e) Protected Button2_Click(object sender, EventArgs e)
23
INBOX Public SqlConnection con Public DataSet ds Public SqlCommand cmd Protected Page_Load(object sender, EventArgs e) Protected c1_CheckedChanged(object sender, EventArgs e) Protected GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) Protected Linkbutton1_Command(object sender, CommandEventArgs e) Protected Linkbutton10_Command(object sender, CommandEventArgs e) Protected GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) Protected LinkButton4_Click(object sender, EventArgs e)
24
ADMIN_COMPOSE_MAIL Public SqlConnection con Public SqlCommand cmd Protected Button1_Click(object sender, EventArgs e)
COMPOSE_MAIL Public SqlConnection con Public SqlCommand cmd Protected LinkButton3_Click(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e) Protected Button3_Click(object sender, EventArgs e)
SENT_MAIL Public SqlConnection con Public SqlCommand cmd Public SqlDataReader dr Public DataSet ds Protected Page_Load(object sender, EventArgs e)
25
FEED Public SqlConnection con Pulic SqlCommand cmd Protected Page_Load(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e) Protected Button2_Click(object sender, EventArgs e) Protected LinkButton1_Click(object sender, EventArgs e)
MESSAGE
REPLY Public SqlConnection con Public SqlCommand cmd Public SqlDataAdapter da Protected Button1_Click(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e)
26
VIEWPROFILE Public SqlConnection con Public SqlCommand cmd Public DataSet ds Public SqlDataAdapter da Protected Page_Load(object sender, EventArgs e)
PASSWORD_RECOVERY Public SqlConnection con Public SqlCommand cmd Public SqlDataReader dr Public string ans, pwd Protected Button2_Click(object sender, EventArgs e) Protected Button3_Click(object sender, EventArgs e)
27
SETTINGS Public SqlConnection con Public SqlCommand cmd Public SqlDataReader dr Public DataSet ds Protected LinkButton3_Click(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e) Protected LinkButton4_Click(object sender, EventArgs e)
ADMIN_INBOX Public SqlConnection con Public SqlDataAdapter da public DataSet ds Protected Page_Load(object sender, EventArgs e)
USER_S_PROFILE Public SqlConnection con Public SqlCommand cmd Public DataSet ds Protected Page_Load(object sender, EventArgs e) Protected GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
28
ADMIN_COMPOSE_MAIL Public SqlConnection con Public SqlCommand cmd Protected Button1_Click(object sender, EventArgs e)
ADMINMESSAGE
Protected Page_Load(object sender, EventArgs e) Protected LinkButton3_Click(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e)
ADMINREPLY Public SqlConnection con Public SqlCommand cmd Public SqlDataAdapter da public DataSet ds Protected Page_Load(object sender, EventArgs e) Protected Button1_Click(object sender, EventArgs e)
29
SEQUENCE DIAGRAM
Sequence diagrams describe behavior as a sequence of messages exchanges among se toff objects. The sequence diagrams consists of objects represented in the usual way as named rectangles with underlined, messages represented as solid-line arrows and time represented as a vertical progress.
U:user
1. Login
w:Website
D:Database
6. Sending message 7. Change the Info & Update 10. Sign out 8. Store s the mail details 9.Stored
30
DATABASE SPECIFICATION
Table: Members
31
Field Name First Name Last Name UserID Password DOB Department Designation Gender Mobile No Telephone No Address Security Question Answer Type
Data Type Varchar Varchar Varchar Varchar Varchar Varchar Varchar Varchar Bigint Bigint Varchar Varchar Varchar Varchar
Size 50 50 50 50 50 50 100 50
Constraints
Primary Key
50 300 50 50 50
Table: Mails
32
Field Name
From mail MailTo Subject BodyOfTheMessage Cc Bcc FileName
Data Type
Varchar Varchar Varchar Varchar Varchar Varchar Varchar
Size
50 50 50 600 50 50 50
Table : admin
Size 50 50 50 50
33
IMPLEMENTATION
34
</tr> <tr> <td class="style3"> <b style="color: #800080"> <asp:Label ID="Label2" runat="server" Text="Password" ForeColor="#0066CC"></asp:Label> </b> </td> <td> <b> <asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox> </b> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="Password shoud not be empty">Enter the Password</asp:RequiredFieldValidator> <asp:Label ID="Label3" runat="server"></asp:Label> </td> </tr> <tr> <td class="style3"> <b></b> </td> <td> <b> <asp:CheckBox ID="CheckBox3" runat="server" Text=" Remember me" /> </b></td> </tr> <tr> <td class="style3"> <b> <asp:Button ID="Button3" runat="server" Text="signin" Height="28px" Width="142px" onclick="Button3_Click" /> </b> </td> <td> <b> <asp:Button ID="Button2" runat="server" Text="cancel" Height="28px" Width="142px" onclick="Button2_Click" /> </b> </td> </tr> <tr> <td class="style3"> <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" CausesValidation="False">Forgot
36
37
<asp:TemplateField > <HeaderTemplate >SUBJECT</HeaderTemplate> <ItemTemplate><asp:LinkButtonID="lsub"runat="server"OnCommand="Linkbutton1_C ommand"Text='<%#Eval("Subject")%>'CommandArgument='<%#Eval("Subject") %>'/></ItemTempe> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate >ATTACHMENTS</HeaderTemplate> <ItemTemplate><asp:LinkButtonID="lattach" OnCommand="Linkbutton10_Command" runat="server" Text ='<%#Eval("Filename") %>' CommandArgument ='<%#Eval("Filename") %>' ></asp:LinkButton></ItemTemplate> </asp:TemplateField> </Columns> <PagerTemplate > <asp:Button ID ="c1" runat ="server" Text ="First" CommandArgument ="first" CommandName ="page" /> <asp:Button ID ="c2" runat ="server" Text ="Previous" CommandArgument ="Prev" CommandName ="page" /> <asp:Button ID ="c3" runat ="server" Text ="Next" CommandArgument ="next" CommandName ="page" /> <asp:Button ID ="c4" runat ="server" Text ="Last" CommandArgument ="last" CommandName ="page" /> </PagerTemplate> </asp:GridView> </td></tr> </table> <br></br> <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Any Feedback</asp:LinkButton> </asp:Content>
39
<HeaderTemplate >ATTACHMENTS</HeaderTemplate> <ItemTemplate><asp:LinkButtonID="lattach" OnCommand="Linkbutton10_Command" runat="server" Text ='<%#Eval("Filename") %>' CommandArgument ='<%#Eval("Filename") %>' ></asp:LinkButton></ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> </table> </asp:Content>
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; using System.Data.SqlClient; public partial class Login : System.Web.UI.Page { int i; protected void Button3_Click(object sender, EventArgs e) { SqlConnectioncon=newSqlConnection(ConfigurationManager.Con nectionStrings["con"].ToString()); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "select count(*) from Members where UserID='" + TextBox3.Text +Label4.Text + "' and Password='" + TextBox2.Text + "'"; con.Open(); int i = Convert.ToInt32(cmd.ExecuteScalar()); if (i == 0) { Label3.Text = "Invalid User Id/Password"; } else { FormsAuthentication.Authenticate(TextBox3.Text, TextBox2.Text); FormsAuthentication.GetAuthCookie(TextBox3.Text, CheckBox3.Checked); Session["uid"] = TextBox3.Text + Label4 .Text ; Session["pwd"] = TextBox2.Text; Response.Redirect("Inbox.aspx"); } con.Close(); cmd.Dispose(); } protected void Button2_Click(object sender, EventArgs e) { TextBox3.Text = "";
42
TextBox2.Text = ""; } protected void LinkButton1_Click(object sender, EventArgs e) { Response.Redirect("Password Recovery.aspx"); } protected void Page_Load(object sender, EventArgs e) { TextBox3.Focus(); } }
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; using System.Data.SqlClient; public partial class Inbox : System.Web.UI.Page { SqlConnectioncon=newSqlConnection(ConfigurationManager.ConnectionStrings["c on"].ToString()); DataSet ds = new DataSet(); SqlCommand cmd = new SqlCommand(); protected void Page_Load(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand("select count(*) from Mails where MailTo='" + Session["uid"] + "' and status='U'", con); con.Open(); int i = Convert .ToInt32 ( cmd.ExecuteScalar()); Menu Menu3 = (Menu)Master.FindControl("Menu2"); Menu3.Items[1].Text = "Inbox(" + i.ToString() + ")"; con.Close(); cmd.Dispose(); if (Page.IsPostBack == false) { con.Open(); SqlDataAdapterda=newSqlDataAdapter("selectFromMail,MailTo,Subject,Filena me,Status from Mails where Mailto='" + Session["uid"] + "'", con); DataSet ds = new DataSet(); da.Fill(ds, "hi"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); con.Close(); int d = 0; for (d = 0; d < GridView1.Rows.Count; d++) { GridViewRow R = GridView1.Rows[d]; if (ds.Tables["hi"].Rows[d][4].ToString() == "U") { R.BackColor = System.Drawing.Color.BlueViolet ;
44
} else { R.BackColor = System.Drawing.Color.White ; } } } } protected void c1_CheckedChanged(object sender, EventArgs e) { GridViewRow r = GridView1.HeaderRow; CheckBox c1 = (CheckBox)r.Cells[1].Controls[1]; if (c1.Checked == true) { foreach (GridViewRow R in GridView1.Rows) { CheckBox c2 = (CheckBox)R.FindControl("c2"); c2.Checked = true; } } else if (c1.Checked == false) { foreach (GridViewRow R in GridView1.Rows) { CheckBox c2 = (CheckBox)R.FindControl("c2"); c2.Checked = false; } } } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridViewRow r = GridView1.Rows[e.RowIndex]; LinkButton lfrom = (LinkButton)r.Cells[4].Controls[0]; string s = lfrom.Text; SqlCommand cmd = new SqlCommand("delete from Mails where Subject='" + s + "'",con ); con.Open(); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapterda=newSqlDataAdapter("select FromMail,MailTo,Subject,Filename,Status from Mails where Mailto='" + Session["uid"] + "'", con); DataSet ds = new DataSet(); da.Fill(ds, "chaitu"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind();
45
} protected void Linkbutton1_Command(object sender, CommandEventArgs e) { string sub = e.CommandArgument.ToString(); string comd = "update mails set status='R' where Subject='" + sub + "'"; SqlCommand cmd = new SqlCommand(comd, con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapter da = new SqlDataAdapter("select BodyOfTheMEssage from Mails where Subject='" + sub + "'", con); DataSet dx = new DataSet(); da.Fill(dx, "body"); string body = dx.Tables[0].Rows[0][0].ToString(); Response.Redirect("Message.aspx?sub=" + body); } protected void Linkbutton10_Command(object sender, CommandEventArgs e) { if (e.CommandArgument.ToString() == "No Attachments") { } else { string attach = e.CommandArgument.ToString(); Response.WriteFile("~/upload/" + e.CommandArgument.ToString()); } } protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; SqlDataAdapterda=new SqlDataAdapter("select FromMail,MailTo,Subject,Filename,Status from Mails where Mailto='" + Session["uid"] + "'", con); DataSet ds = new DataSet(); da.Fill(ds, "chaitu"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } protected void LinkButton1_Click(object sender, EventArgs e) { Response.Redirect("Feed.aspx"); } protected void LinkButton3_Click(object sender, EventArgs e) {
46
SqlCommand cmd = new SqlCommand("delete from Mails where MailTo='"+Session ["uid"]+"' ", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapter da = new SqlDataAdapter("select * from mails where MailTo='" + Session["uid"] + "'", con); DataSet ds = new DataSet(); da.Fill(ds, "chaitu"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } }
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq;
47
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; using System.Data.SqlClient; public partial class Admin_Inbox : System.Web.UI.Page { SqlConnectioncon=newSqlConnection(ConfigurationManager.ConnectionStrings["con "].ToString()); SqlDataAdapter da; protected void Page_Load(object sender, EventArgs e) { con.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from admin", con); DataSet ds = new DataSet(); da.Fill(ds, "hi"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); con.Close(); if (Page.IsPostBack == false) { con.Open(); da = new SqlDataAdapter("select * from admin where Mailto='" + Session["uid"] + "'", con); da.Fill(ds, "hi"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); con.Close(); int d = 0; for (d = 0; d < GridView1.Rows.Count; d++) { GridViewRow R = GridView1.Rows[d]; if (ds.Tables["hi"].Rows[d][4].ToString() == "U") { R.BackColor = System.Drawing.Color.BlueViolet; } else { R.BackColor = System.Drawing.Color.White; }
48
} } } protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; SqlDataAdapter da = new SqlDataAdapter("select * from admin",con ); DataSet ds = new DataSet(); da.Fill(ds, "chaitu"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } protected void c1_CheckedChanged(object sender, EventArgs e) { GridViewRow r = GridView1.HeaderRow; CheckBox c1 = (CheckBox)r.Cells[1].Controls[1]; if (c1.Checked == true) { foreach (GridViewRow R in GridView1.Rows) { CheckBox c2 = (CheckBox)R.FindControl("c2"); c2.Checked = true; } } else if (c1.Checked == false) { foreach (GridViewRow R in GridView1.Rows) { CheckBox c2 = (CheckBox)R.FindControl("c2"); c2.Checked = false; } } } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridViewRow r = GridView1.Rows[e.RowIndex]; string s = r.Cells[1].Text; string command = "delete from admin where Frommail='" + s + "'" ; command = command + "delete from admin where Frommail='" + s + "'"; SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = command; con.Open(); cmd.ExecuteNonQuery(); con.Close();
49
SqlDataAdapter da = new SqlDataAdapter("select * from admin ", con); DataSet ds = new DataSet(); da.Fill(ds, "chaitu"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } protected void Linkbutton1_Command(object sender, CommandEventArgs e) { string sub = e.CommandArgument.ToString(); string comd = "update admin set status='R' where Subject='" + sub + "'"; SqlCommand cmd = new SqlCommand(comd, con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapter da = new SqlDataAdapter("select BodyOfTheMEssage from admin where Subject='" + sub + "'", con); DataSet dx = new DataSet(); da.Fill(dx, "body"); string body = dx.Tables[0].Rows[0][0].ToString(); SqlDataAdapter da1=new SqlDataAdapter ("select Frommail from Admin where Subject='"+sub +"'",con); da1.Fill (dx,"admin"); Session ["admin"]=dx.Tables ["admin"].Rows [0][0].ToString (); Response.Redirect("adminmessage.aspx?sub=" + body); } protected void Linkbutton10_Command(object sender, CommandEventArgs e) { if (e.CommandArgument.ToString() == "No Attachments") { } else { string attach = e.CommandArgument.ToString(); Response.WriteFile("~/upload/" + e.CommandArgument.ToString()); } } protected void LinkButton4_Click(object sender, EventArgs e) { Response.Redirect("Feed.aspx"); } protected void LinkButton3_Click(object sender, EventArgs e) {
50
SqlCommand cmd = new SqlCommand("delete from Mails where MailTo='" + Session["uid"] + "' ", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapter da = new SqlDataAdapter("select * from mails where MailTo='" + Session["uid"] + "'", con); DataSet ds = new DataSet(); da.Fill(ds, "chaitu"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { } }
51
TESTING
Testing is a process to show the correctness of the program. Testing is needed to show completeness, improve the quality of the software and to provide the maintenance aid. Some testing standards are therefore necessary reduce the testing costs and operation time. Testing software extends throughout the coding phase and it represents the ultimate review of configurations, design and coding. Based on the way the software reacts to these testing, we can decide whether the configuration that has been built is study or not. All components of an application are tested, as the failure to do so many results in a series of bugs after the software put to use.
52
In Black box testing software is exercised over a full range of inputs and outputs are observed for correctness.
53
The first level of test is unit testing. The purpose of unit testing is to ensure that each program is fully tested. The second step is integration testing. In this individual program units or programs are integrated and tested as a complete system to ensure that the software requirements are met. Acceptance Testing involves planning and the execution of various types of tests in order to demonstrate that the implemented software system satisfies the requirements. Finally our project meets the requirements after going through all the levels of testing.
54
DEMONSTRATION
Home Page
55
Login Page
56
Admin Login
57
Registration page
58
About Us page
59
Contact us page
60
Inbox page
61
ComposeMail
62
SentMail
63
Settings page
64
65
AdminComposepage
66
67
View profile
68
69
CONCLUSION
70
The Mailing System was developed with an aim of making the communication faster among different departments in bigger institutions. It meets the needs of several facilities not only passing messages but also sending larger files from one location to another through a local area network, thus by resulting time saving and accuracy.
71
APPENDIX
72
73
code is stored and executed locally but internet- distributed or executed remotely. and versioning conflicts. To provide a code execution environment that guarantees safe execution of code,
problem of scripted or interpreted environments. To make the developer experience consistent across widely types of application, such as windows based applications and web based applications. To build all communication on industry standards to ensure that code based on the .NET framework can integrate with any other code. The .NET framework has two main components: the common language runtime and the .Net framework class library. The common language runtime is the foundation of the .NET framework. You can think of the runtime as an agent that manages code at execution time, and remoting while also enforcing strict type safely and other forms of code accuracy that ensure security and robustness in fact the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as un managed code. The class library, the other main component of the .NET frameworks is a comprehensive, object-oriented collection reusable types that you can use to develop applications ranging from traditional command line or graphical user interface (FGUI) applications to application base d on the latest innovations provided by ASP.NET, such as web forms and XML web services. The .NET framework can be hosted by unmanaged component that load the common language runtime into their processes and initiate the execution of managed code. ASP.NET works directly with the runtime to enable ASP.NET application and XML web services, both of which are discussed later in this topic, Internet explorer is an example of unmanaged application that hosts the runtime (in the form of a MIME type extension). Using internet explorer to the host runtime enables you to embed managed components or windows forms controls in HTML documents. Hosting the runtime in this way makes mobile code 9similar to Microsoft Active Xr controls) possible, but with significant improvement that only managed code can offer, such as semi-trusted execution and secure isolated file storage.
75
The following illustration shows the relationship of the common language runtime and the class library to your application and to the overall system. The illustration also shows how managed code operated with in a larger architecture. We can use the .NET framework to develop the following types of application and services: Console applications Web applications XML Web services Windows Forms Applications
76
ASP.NET
ASP.NET is a set of Microsoft.NET framework technologies used for building web applications and XML Web services. ASP.NET page execute on the server and generate mark up such as HTML, WML or XML that is sent to a desktop or mobile browser. ASP.NET pages use a compiled, event-driven programming model that improves performance and enables the separation of application logic and user interface. Both ASP.NET pages and ASP.NET web services files contain server-side (as opposed to client side logic) written in Visual basic .NET, C#.NET or any .NET compatible language, Web applications and XML Web Services take advantage of the features of the common language runtime, such as type safety, inheritance, language, interoperability, versioning, and integrated security.
IIS
Microsoft Internet Information S4ervices (IIS; formerly called Server is a set of Internet-based services for servers using Microsoft Windows. It is the worlds second most popular web server in terms of overall websites. As of September 2007 it served 34.94% of all websites and 36.63% of all active websites according to Net craft. The servers currently include FTP, SMTP, NNTOP, and HTTP/HTTPS.
ADO.NET
ADO.NET provides consistent access to data sources such a Microsoft SQL Server and XML, as well as to data sources exposed through OLE DB and ODBC. Data sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, manipulate and update the data that they contain. ADO.NET separates data access from data manipulation into discrete components that can be used separately or in tandem. ADO.NET includes .NET Frame work data providers for connecting to a database, executing commands and retrieving results. Those results are either processed directly, placed in and ADO.NET Dataset objects in order to be exposed to the used in an ad hoc manner, combined with data from multiple sources or remoted between tiers.
77
The ADO.NET Dataset object can also be used independently of a .NET Framework data provider to manage data local to the application or sourced from XML. The ADO.NET classes are found in System.Data.dll and are integrated with the XML classes found in System.Xml.dll. When compiling code that uses the System. Data, namespace reference both System.Data.dll and System.Xml.dll. ADO.NET provided functionality to developers writing managed code similar to the functionality provided to native component object model (COM) developers by ActiveX Data Objects (ADO).
ADO.NET COMPONENTS
There are two components of ADO.NET that you can use to access and manipulate data: .NET Framework data providers. The Dataset
78
THE DATASET
The ADO.NET Dataset is explicitly designed for data access independent of any data source. As a result, it can be used with multiple and differing data sources used with XML data or used to manage data local to the application. The Dataset contains a collection n of one or more Data Table objects made up to rows and columns of data as well as primary key, foreign key, constraint and relation information about the data in the Data Table objects.
BENEFITS OF ADO.NET
ADO.NET offers several advantages over previous versions of ADO and over other data access components. These benefits fall into the following categories: 1. Interoperability 2. Maintainability 3. Programmability 4. Salability
79
BIBLIOGRAPHY
Windows programming
80
Vikas Gupta
ASP. NET Unleashed Visual C#.NET Black Book Professional ASP. NET Web services
81