Разработка системы распределённой обработки данных управления учебным процессом типа «Деканат»

Автор работы: Пользователь скрыл имя, 24 Июня 2012 в 15:42, курсовая работа

Описание работы

Заданием на курсовой проект является разработка информационный системы «Деканат». Информационные системы, подобные данной, в качестве хранилища информации выбирают базы данных т.к. информационный поток в них, легко представляется в виде таблиц. Следовательно, первым этапом построения будущей системы является разработка и создание базы данных, как основного каркаса будущей среды.

Содержание работы

1. Задание на курсовой проект…………………………………………………..3
2. Описание структуры данных………………………………………… ………4
2.1. Создание базы данных «Деканат»…………………………………….….4
2.2. Создание таблиц данных БД «Деканат»…………………………………5
2.2.1. Дизайн таблицы «Студенты»…………………………………….…6
2.2.2. Дизайн таблицы «Преподаватели»…………………………………6
2.2.3. Дизайн таблицы «Кафедры»………………………………………..7
2.2.4. Дизайн таблицы «Группы»………………………………………….7
2.2.5. Дизайн таблицы «Учебные дисциплины»……………………...….8
3. Описание назначения и особенностей реализации механизмов и процедур по всем выполненным пунктам задания……………………………………..9
4. Алгоритмическое описание реализованных механизмов и структур….…12
5. Листинг всех процедур………………………………………………………17
5.1. Разметка страниц……………………………………………………..…..17
5.2. Логика работы страницы поиска……………………………………..…25
6. Заключение…………….……………………………………………………..29
Список литературы…………………………………………………………..….30

Файлы: 1 файл

Отчет по БД Деканат.docx

— 145.33 Кб (Скачать файл)

        InsertCommand="INSERT INTO [Groups] ([GroupName], [DepartmentName]) VALUES (@GroupName, @DepartmentName)"

        OldValuesParameterFormatString="original_{0}"

        UpdateCommand="UPDATE [Groups] SET [GroupName] = @GroupName, [DepartmentName] = @DepartmentName WHERE [GroupID] = @original_GroupID AND [GroupName] = @original_GroupName AND [DepartmentName] = @original_DepartmentName">

        <DeleteParameters>

            <asp:Parameter Name="original_GroupID" Type="Int32" />

            <asp:Parameter Name="original_GroupName" Type="String" />

            <asp:Parameter Name="original_DepartmentName" Type="String" />

        </DeleteParameters>

        <InsertParameters>

            <asp:Parameter Name="GroupName" Type="String" />

            <asp:Parameter Name="DepartmentName" Type="String" />

        </InsertParameters>

        <UpdateParameters>

            <asp:Parameter Name="GroupName" Type="String" />

            <asp:Parameter Name="DepartmentName" Type="String" />

            <asp:Parameter Name="original_GroupID" Type="Int32" />

            <asp:Parameter Name="original_GroupName" Type="String" />

            <asp:Parameter Name="original_DepartmentName" Type="String" />

        </UpdateParameters>

    </asp:SqlDataSource>

    <p>

    <asp:Button runat="server" ID="AddGroup" Text="Добавить группу"

            onclick="AddGroup_Click"></asp:Button>

    </p>

</asp:Content> 

<%@ Page Title="Результаты поиска" Language="C#" AutoEventWireup="true" CodeBehind="Results.aspx.cs" MasterPageFile="~/Site.master" Inherits="DeaneryWebApp.Results" %> 

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="StudentsGridView" runat="server" AutoGenerateColumns="False"

        Width="700px" >

        <Columns>

            <asp:BoundField DataField="LastName" HeaderText="Фамилия"

                SortExpression="LastName" />

            <asp:BoundField DataField="FirstName" HeaderText="Имя"

                SortExpression="FirstName" />

            <asp:BoundField DataField="MiddleName" HeaderText="Отчество"

                SortExpression="MiddleName" />

            <asp:BoundField DataField="GroupName" HeaderText="Группа"

                SortExpression="GroupName" />

        </Columns>

    </asp:GridView>

    <asp:SqlDataSource ID="StudentsByFirstNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [LastName], [FirstName], [MiddleName], [GroupName] FROM [Students] WHERE ([FirstName] LIKE '%' + @FirstName + '%')">

        <SelectParameters>

            <asp:Parameter Name="FirstName" Type="String" />

        </SelectParameters>

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="StudentsByLastNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [LastName], [FirstName], [MiddleName], [GroupName] FROM [Students] WHERE ([LastName] LIKE '%' + @LastName + '%')">

        <SelectParameters>

            <asp:Parameter Name="LastName" />

        </SelectParameters>

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="StudentsByMiddleNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [LastName], [FirstName], [MiddleName], [GroupName] FROM [Students] WHERE ([MiddleName] LIKE '%' + @MiddleName + '%')">

        <SelectParameters>

            <asp:Parameter Name="MiddleName" />

        </SelectParameters>

    </asp:SqlDataSource> 

    <asp:GridView ID="TeachersGridView" runat="server" AutoGenerateColumns="False" Visible="False" Width="700px">

        <Columns>

                <asp:BoundField DataField="LastName" HeaderText="Фамилия"

                    SortExpression="LastName" />

                <asp:BoundField DataField="FirstName" HeaderText="Имя"

                    SortExpression="FirstName" />

                <asp:BoundField DataField="MiddleName" HeaderText="Отчество"

                    SortExpression="MiddleName" />

        </Columns>

    </asp:GridView>

    <asp:SqlDataSource ID="TeachersByFirstNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [LastName], [FirstName], [MiddleName] FROM [Teachers] WHERE ([FirstName] LIKE '%' + @FirstName + '%')">

        <SelectParameters>

            <asp:Parameter Name="FirstName" />

        </SelectParameters>

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="TeachersByLastNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [LastName], [FirstName], [MiddleName] FROM [Teachers] WHERE ([LastName] LIKE '%' + @LastName + '%')">

        <SelectParameters>

            <asp:Parameter Name="LastName" />

        </SelectParameters>

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="TeachersByMiddleNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [LastName], [FirstName], [MiddleName] FROM [Teachers] WHERE ([MiddleName] LIKE '%' + @MiddleName + '%')">

        <SelectParameters>

            <asp:Parameter Name="MiddleName" />

        </SelectParameters>

    </asp:SqlDataSource> 

    <asp:GridView ID="GroupsGridView" runat="server" Visible="False" Width="700px"

        AutoGenerateColumns="False">

        <Columns>

            <asp:BoundField DataField="GroupName" HeaderText="Группа" />

            <asp:BoundField DataField="DepartmentName" HeaderText="Кафедра" />

        </Columns>

    </asp:GridView>

    <asp:SqlDataSource ID="GroupsByNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [GroupName], [DepartmentName] FROM [Groups] WHERE ([GroupName] LIKE '%' + @GroupName + '%')">

        <SelectParameters>

            <asp:Parameter Name="GroupName" />

        </SelectParameters>

    </asp:SqlDataSource> 

    <asp:GridView ID="DepartmentsGridView" runat="server" Visible="False"

        Width="700px" AutoGenerateColumns="False">

        <Columns>

            <asp:BoundField DataField="DepartmentName" HeaderText="Кафедра" />

        </Columns>

    </asp:GridView>

    <asp:SqlDataSource ID="DepartmentByNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [DepartmentName] FROM [Departments] WHERE ([DepartmentName] LIKE '%' + @DepartmentName + '%')">

        <SelectParameters>

            <asp:Parameter Name="DepartmentName" />

        </SelectParameters>

    </asp:SqlDataSource>   

    <asp:GridView ID="SubjectsGridView" runat="server" Visible="False"

        Width="700px" AutoGenerateColumns="False">

        <Columns>

            <asp:BoundField DataField="SubjectName" HeaderText="Предмет" />

            <asp:BoundField DataField="GroupName" HeaderText="Группа" />

        </Columns>

    </asp:GridView> 

    <asp:SqlDataSource ID="SubjectByNameDataSource" runat="server"

        ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

        SelectCommand="SELECT [SubjectName], [GroupName] FROM [Subjects] WHERE ([SubjectName] LIKE '%' + @SubjectName + '%')">

        <SelectParameters>

            <asp:Parameter Name="SubjectName" />

        </SelectParameters>

    </asp:SqlDataSource>   

</asp:Content> 

<%@ Page Title="Студенты" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"

    CodeBehind="Students.aspx.cs" Inherits="DeaneryWebApp._Students" %> 

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent"> 

    <asp:GridView ID="StudentsGridView" runat="server" AllowPaging="True"

    AllowSorting="True" AutoGenerateColumns="False" DataSourceID="StudentsDataSource"

    Width="741px" DataKeyNames="StudentID">

        <Columns>

            <asp:BoundField DataField="LastName" HeaderText="Фамилия"

                SortExpression="LastName" />

            <asp:BoundField DataField="FirstName" HeaderText="Имя"

                SortExpression="FirstName" />

            <asp:BoundField DataField="MiddleName" HeaderText="Отчество"

                SortExpression="MiddleName" />

            <asp:BoundField DataField="GroupName" HeaderText="Группа"

                SortExpression="GroupName" />

            <asp:CommandField DeleteText="" EditText=""

                ShowDeleteButton="True" ShowEditButton="True" ButtonType="Image"

                CancelImageUrl="~/Images/cancel.png" CancelText=""

                DeleteImageUrl="~/Images/delete.png" EditImageUrl="~/Images/edit.png"

                UpdateImageUrl="~/Images/update.png" UpdateText="" />

        </Columns>

    </asp:GridView>

<asp:SqlDataSource ID="StudentsDataSource" runat="server"

    ConnectionString="<%$ ConnectionStrings:DeaneryConnectionString %>"

    SelectCommand="SELECT * FROM [Students]" ConflictDetection="CompareAllValues"

        DeleteCommand="DELETE FROM [Students] WHERE [StudentID] = @original_StudentID AND [LastName] = @original_LastName AND [FirstName] = @original_FirstName AND [MiddleName] = @original_MiddleName AND [GroupName] = @original_GroupName"

        InsertCommand="INSERT INTO [Students] ([LastName], [FirstName], [MiddleName], [GroupName]) VALUES (@LastName, @FirstName, @MiddleName, @GroupName)"

        OldValuesParameterFormatString="original_{0}"

        UpdateCommand="UPDATE [Students] SET [LastName] = @LastName, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [GroupName] = @GroupName WHERE [StudentID] = @original_StudentID AND [LastName] = @original_LastName AND [FirstName] = @original_FirstName AND [MiddleName] = @original_MiddleName AND [GroupName] = @original_GroupName">

    <DeleteParameters>

        <asp:Parameter Name="original_StudentID" Type="Int32" />

        <asp:Parameter Name="original_LastName" Type="String" />

        <asp:Parameter Name="original_FirstName" Type="String" />

        <asp:Parameter Name="original_MiddleName" Type="String" />

        <asp:Parameter Name="original_GroupName" Type="String" />

    </DeleteParameters>

    <InsertParameters>

        <asp:Parameter Name="LastName" Type="String" />

Информация о работе Разработка системы распределённой обработки данных управления учебным процессом типа «Деканат»