<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="pg_ExamResaultSet.aspx.cs" Inherits="rl_teachers_pg_ExamResaultSet" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">
    <div class="contentDiv">
        <table border="0" cellpadding="0" cellspacing="0" >
            <tr id="Tr1">
                <td id="rightTableData" valign="top">
                    <div id="linksPanel" style="margin-right:15px; margin-top : 10px;">
                        <table id="tblpanel" border="0" cellpadding="0" cellspacing="0" style="width:200px;">
                            <tr>
                                <td id="panelheadright" class="panelheadright">
                                </td>
                                <td id="panelheadrepeat" class="panelheadrepeat" align="center" style="width:160px;">
                                    <asp:Label ID="lblpanelHead" runat="server" Text="منوی سایت" style="color:White; font-weight:bold; "></asp:Label>
                                </td>
                                <td id="panelheadleft" class="panelheadleft">
                                </td>
                            </tr>
                            <tr>
                                <td id="panelmarginright" class="panelmarginright">
                                </td>
                                <td valign="top" class="panelcontentback" style="background-image:none; background-color : White; "> <!-- ************ Content Place !-->
                                    <div class="panelcontent" style="margin-top:17px;">
                                        <asp:Panel ID="panelMenues" runat="server">
                                        </asp:Panel>
                                    </div>
                                </td>
                                <td id="panelmarginleft" class="panelmarginleft" align="left">
                                </td>
                            </tr>
                            <tr>
                                <td id="panelbottomright" class="panelbottomright" align="right" >
                                </td>
                                <td id="panelbottomrepeat" class="panelbottomrepeat" style="width:160px;">
                                </td>
                                <td id="panelbottomleft" class="panelbottomleft" align="left";>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td id="contentTableData" style="width:100%; padding-right : 10px;" align="right"; valign="top"; >
                     <div id="frameContainer" style="padding:10px 10px 25px 10px;">
                        <table id="Table2" border="0" cellpadding="0" cellspacing="0" style="width:100%;">
                            <tr>
                                <td id="Td92" class="panelheadright">
                                </td>
                                <td id="Td102" class="panelheadrepeat" align="center" >
                                    <asp:Label ID="lblFrameTitle" runat="server" Text="تعیین نتایج آزمون" style="color:White;"></asp:Label>
                                </td>
                                <td id="Td112" class="panelheadleft">
                                </td>
                            </tr>
                            <tr>
                                <td id="Td122" class="panelmarginright">
                                </td>
                                <td valign="top" class="panelcontentback" > <!-- ************ Content Place !-->
                                    <div id="divRoleType" class="panelcontent" style="text-align:center; " runat="server">
                                        <asp:GridView ID="GridView1" runat="server" style="width:100%;" 
                                            AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                                            CssClass="grid" PageSize="15" PagerStyle-CssClass="gridPager" 
                                            DataKeyNames="studentId" DataSourceID="SqlDataSource1" 
                                            onrowdatabound="GridView1_RowDataBound" >
                                            <Columns>
                                                <asp:TemplateField HeaderText="حضور" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell" ItemStyle-Width="100px">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPresent" Checked="true" runat="server" Font-Names="Tahoma" Font-Size="8pt" Text="حاضر" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="عکس دانشجو" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell" ItemStyle-Width="100px">
                                                    <ItemTemplate>
                                                        <asp:Image ID="Image1" runat="server" ImageUrl='<%#FindImageUrl(Eval("studentId")) %>' Width="56px" Height="75px" 
                                                            AlternateText="عکس یافت نشد" BorderStyle="None" GenerateEmptyAlternateText="True" ImageAlign="Middle"/>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="studentId" HeaderText="کد دانشجو" InsertVisible="False" ReadOnly="True" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell"/>
                                                <asp:BoundField DataField="fullName" HeaderText="نام و نام خانوادگی" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell" />
                                                <asp:BoundField DataField="melliCode" HeaderText="کد ملی" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell" />
                                                <asp:TemplateField HeaderText="نمره" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell">
                                                    <ItemTemplate>
                                                        <table>
                                                            <tr>
                                                                <td align="center">
                                                                    <asp:Label ID="Label1" runat="server" Text="نمره :" ForeColor="Gray"></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center">
                                                                    <asp:TextBox ID="tbGrade" runat="server" Font-Names="Tahoma" Font-Size="8pt" Width="50px"></asp:TextBox>
                                                                    <asp:RegularExpressionValidator ID="validExpAmount" runat="server" ErrorMessage="عدد" ControlToValidate="tbGrade" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center">
                                                                    <asp:Label ID="Label2" runat="server" Text='<%#FindMaxGrade() %>' ForeColor="Gray"></asp:Label>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="وضعیت" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell">
                                                    <ItemTemplate>
                                                        <asp:DropDownList ID="cmbStatus" runat="server" Font-Names="Tahoma" Font-Size="8pt" Width="50px">
                                                            <asp:ListItem></asp:ListItem>
                                                            <asp:ListItem>مردود</asp:ListItem>
                                                            <asp:ListItem>قبول</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="وضعیت" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridCell">
                                                    <ItemTemplate>
                                                        <table>
                                                            <tr>
                                                                <td align="center">
                                                                    <asp:Label ID="Label3" runat="server" Text="توضیحات :" ForeColor="Gray"></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center">
                                                                    <asp:TextBox ID="tbStatements" runat="server" Font-Names="Tahoma" Font-Size="8pt" Width="80px" Height="60px" TextMode="MultiLine"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <PagerStyle CssClass="gridPager"></PagerStyle>
                                        </asp:GridView>
                                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                            ConnectionString="<%$ ConnectionStrings:ASPNETDB_ConnectionString %>"
                                            ProviderName="System.Data.SqlClient" 
                                            SelectCommand="SELECT t_Students.studentId, t_Students.fullName, t_Students.melliCode, t_Students.studentPhotoUrl FROM t_ClassStudents INNER JOIN t_Students ON t_ClassStudents.studentId = t_Students.studentId WHERE (t_ClassStudents.classId = 2)"></asp:SqlDataSource>
                                    </div>
                                </td>
                                <td id="Td132" class="panelmarginleft" align="left">
                                </td>
                            </tr>
                            <tr>
                                <td id="Td142" class="panelbottomright" align="right" >
                                </td>
                                <td id="Td152" class="panelbottomrepeat" >
                                </td>
                                <td id="Td162" class="panelbottomleft" align="left";>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" style="padding-top:5px;">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td align="center" valign="top">
                                                <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <asp:LinkButton ID="btnOk" runat="server"  Height="25px" style="margin-top : 10px;"
                                                            Width="100px" CssClass="buttons" onclick="btnOk_Click" >تأیید</asp:LinkButton>
                                                        <div id="divProgressOkButton" style="width:40px; height:40px; vertical-align:middle; text-align:center;">
                                                        <asp:UpdateProgress ID="UpdateProgressOkButton" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
                                                            <ProgressTemplate>
                                                                <asp:Image ID="Image3" runat="server" ImageUrl="~/images/loading1.gif" Width="40px" Height="40px"/>
                                                            </ProgressTemplate>
                                                        </asp:UpdateProgress>
                                                        </div>
                                                        <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel> 
                                            </td>
                                            <td align="left" valign="top" width="70px">
                                                <asp:LinkButton ID="btnBack" runat="server"  Height="35px" style="position:relative; top: 0px; right: 0px;"
                                                    Width="70px" CssClass="backbutton" onclick="btnBack_Click" ></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

