<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="studentevaluationlogmanage.aspx.cs" Inherits="Us.Web.admin.evaluation.studentevaluationlogmanage" %>



<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <asp:Literal ID="LiteralTitle" runat="server"></asp:Literal>
    </title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
    <%=ImportScriptStr %>
     
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#topURLul").children().click(function () {
                $(this).siblings().removeClass().end().addClass("divURLed");
                $("#mypanel").children().css("display", "none");
                $("#d" + this.id).css("display", "");

                //alert(this.id);
            });
            $("#topURLul").children().hover(
              function () {
                  $(this).addClass("divURLon");
                  //akon(this);
              },
              function () {
                  if ($(this).attr("class") != "divURLed") {
                      $(this).removeClass("divURLon");
                  }
              }
            );
        });
    </script>


    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("[name^='Careff_']").click(function () {
                //alert($(this).attr("id"));
                getAllDateCount();
            });
            $("[name^='Careff_']").blur(function () {
                //alert($(this).attr("id"));
                getAllDateCount();
            });
            getAllDateCount();
            $("#btnSubmit").click(function () {
                var UserID = $(".tableTBig b").html();
                var aSum = $("#divsum").html();

                return window.confirm("您确实要提交对[" + UserID + "]的评价数据吗？\n当前您的评价总分为[" + aSum + "]分！");
            });
        });

        function getAllDateCount() {
            var Ctype = "";
            var aSum = 0;

            var aOne = 0;

            $("[name^='Careff_']").each(function (index, domEle) {
                Ctype = $(domEle).attr("type");
                //alert(Ctype + " " + $(domEle).attr("id")+" " + $(domEle).val());
                if (Ctype == "radio") {
                    if ($(domEle).attr("checked") == true) {
                        aOne = toFloat($(domEle).val());
                        aSum = aSum + aOne;

                        var eID = ($(domEle).attr("name"));
                        eID = eID.replace("Careff_", "");




                    }
                }
                else {
                    aOne = toFloat($(domEle).val());
                    if (aOne == 0) {
                        $(domEle).val(0);
                    }


                    //判断超过了最大值吗
                    if ("text" == Ctype) {
                        if ($(domEle).attr("emaxvalue") == undefined) {
                            return true;
                        }

                        var emaxvalue = toFloat($(domEle).attr("emaxvalue"));
                        var eminvalue = toFloat($(domEle).attr("eminvalue"));

                        //var aOneMax = toFloat($(domEle).attr("title"));

                        if (emaxvalue < aOne) {
                            aOne = emaxvalue
                            $(domEle).val(aOne);
                            alert("本项最大可输入数为[" + emaxvalue + "]");
                        }

                        if (eminvalue > aOne) {
                            aOne = eminvalue
                            $(domEle).val(aOne);
                            alert("本项最小可输入数为[" + eminvalue + "]");
                        }
                    }

                    aSum = aSum + aOne;

                    var eID = ($(domEle).attr("name"));
                    eID = eID.replace("Careff_", "");



                }
            });
            //alert(aSum);
            $("#divsum").html(aSum.toFixed(2));

        }
        function toFloat(src) {
            var ret = parseFloat(src);
            if (isNaN(ret)) {
                return 0;
            }
            return ret;
        }
    </script>

</head>
<body onload="win_onLoadSize(1004);">
    <form id="Form1" method="post" runat="server">
        
        
        
        <div id="tbMain">
            <div class="divTbg">
                <div class="divTbgL"></div>
                <div class="divTbgInfo">
                    <div class="divTbgTitle"><span class="tableTBig">学生评价-<b><%=sUserName %></b></span></div>
                </div>
            </div>
            <div class="divTbgF"></div>
            <div class="divTNavBG" id="topURL">
                <ul id="topURLul">
                    <li class="divURLed" id="div1">
                        <div>
                            <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" />
                            基本信息</div>
                    </li>
                    <li id="div2">
                        <div>
                            <img src="../style/green/images/mini_icons_046.gif" width="10" height="10" />
                            评价指标</div>
                    </li>
                </ul>
            </div>
            <div id="mypanel">
                <div id="ddiv1">
                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        课程信息
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist">
                            <tr>
                                <td align="center" class="tablisttitle">开课编号 </td>
                                <td align="center" class="tablisttitle">课程名称 </td>
                                <td align="center" class="tablisttitle">开课院系 </td>
                                <td align="center" class="tablisttitle">开课班级 </td>
                                <td align="center" class="tablisttitle">开课学期 </td>
                                <td align="center" class="tablisttitle">开课教师 </td>
                                <td align="center" class="tablisttitle">课程学时 </td>
                                <td align="center" class="tablisttitle">课程学分 </td>
                            </tr>
                            <tr>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                                </td>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal2" runat="server"></asp:Literal>
                                </td>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal3" runat="server"></asp:Literal>
                                </td>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal4" runat="server"></asp:Literal>
                                </td>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal5" runat="server"></asp:Literal>
                                </td>
                                <td align="center" class="tabmanagertr"><span id="userid">
                                    <asp:Literal ID="Literal6" runat="server"></asp:Literal></span>
                                </td>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal7" runat="server"></asp:Literal>
                                </td>
                                <td align="center" class="tabmanagertr">
                                    <asp:Literal ID="Literal8" runat="server"></asp:Literal>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div id="ddiv2">

                <div class="divInfo">
                    <div class="divInfoblack">
                        <div class="divInfoTopList">
                            <div class="listLeft">
                                <div class="navtitle">学生评价指标体系</div>
                            </div>
                            <div class="listRight">
                                <ul>
                                    <li class="navstyle1">
                                        <input type="checkbox" name="chkselect" id="chkselect" onclick="skySelectCheckList();" />
                                        <label for="chkselect">全选</label>
                                    </li>
                                    <li class="navstyle2">
                                        <asp:LinkButton ID="LnkBAdd" runat="server" OnClick="SkyLnkBAMD_Click" Enabled="false">添加</asp:LinkButton>
                                    </li>
                                    <li class="navstyle3">
                                        <asp:LinkButton ID="LnkBEdit" runat="server" OnClick="SkyLnkBAMD_Click" Enabled="false">编辑</asp:LinkButton>
                                    </li>
                                    <li class="navstyle4">
                                        <asp:LinkButton ID="LnkBDelete" runat="server" OnClick="SkyLnkBAMD_Click" Enabled="false">删除</asp:LinkButton>
                                    </li>
                                    <li class="navstyle5">
                                        <asp:LinkButton ID="LnkBExcel" runat="server" OnClick="SkyLnkBAMD_Click" Enabled="false">导出</asp:LinkButton>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="divInfo">
                    <div style="font: 2px; line-height: 2px;">&nbsp;</div>
                    <asp:GridView ID="gvInfo" runat="server" AutoGenerateColumns="False" BorderStyle="None"
                        CellPadding="0" CellSpacing="1" GridLines="None" Width="100%" CssClass="tablist"
                        HorizontalAlign="Center" OnRowDataBound="gvInfo_RowDataBound">
                        <RowStyle CssClass="tablisttr" HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" CssClass="tablisttitle"></HeaderStyle>
                        <Columns>
                            <asp:BoundField DataField="id" HeaderText="序号">
                                <ItemStyle CssClass="itemStyle1" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SkyGName" HeaderText="指标大类" Visible="false" />
                            <asp:BoundField DataField="SkySName" HeaderText="指标小类" />
                            <asp:BoundField DataField="DName" HeaderText="指标名称" HtmlEncode="False">
                                <ItemStyle HorizontalAlign="Left" Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DInfo" HeaderText="考评细则" HtmlEncode="False" />
                            <asp:BoundField DataField="DValue" HeaderText="评价数据" HtmlEncode="False">
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="MaxValue" HeaderText="最大分数" />
                            <asp:BoundField DataField="MinValue" HeaderText="最小分数" />
                            <asp:TemplateField HeaderText="单条说明">
                                <ItemTemplate>
                                    <asp:TextBox ID="txtInput" runat="server" Text='<%#Eval("Einfo") %>' MaxLength="50" Width="100px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <div>
                        <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tablist">
                            <tr>

                                <td width="100" align="center" valign="middle" class="tablisttitle">评价总分</td>
                                <td width="100" align="center" valign="middle" class="tablisttitle">
                                    <div id="divsum" class="fontred">0</div>
                                </td>
                                <td width="100" align="center" valign="middle" class="tablisttitle">评价留言</td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEInfo" runat="server"
                                        TextMode="MultiLine" Width="100%"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="center" valign="middle" class="tablisttitle">辅助信息</td>
                                <td class="tabmanagertr" colspan="3">课程类型:
                <asp:Literal ID="Literal9" runat="server"></asp:Literal>
                                    您的角色:
                <asp:Literal ID="Literal10" runat="server"></asp:Literal>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="divInfoColor" style="display: none;">
                        <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" OnPageChanged="Pager_PageChanged"
                            ShowCustomInfoSection="Left" ShowPageIndexBox="Always" ShowPageIndex="False"
                            CustomInfoHTML="共 <B>%PageCount%</B> 页，当前为第 <B>%CurrentPageIndex%</B> 页，每页 <B>%PageSize%</B> 条"
                            SubmitButtonText="" FirstPageText="首页" LastPageText="尾页" LayoutType="Table" NextPageText="后一页"
                            PrevPageText="前一页" ShowMoreButtons="False" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到"
                            CustomInfoTextAlign="Left" HorizontalAlign="Right">
                        </webdiyer:AspNetPager>
                    </div>
                </div>
            </div>
            <div class="divSave">
                <asp:Button ID="btnSubmit" runat="server" Text="保存(S)" CssClass="SkyButtonFocus"
                    OnClick="btnSubmit_Click" AccessKey="S" CommandName="save"></asp:Button>
                <asp:Button ID="btnSubmitClose" runat="server" CommandName="saveclose" CssClass="SkyButtonFocus"
                    OnClick="btnSubmit_Click" Text="取消(C)" />
            </div>
        </div>
        <asp:Literal ID="LiteralScript" runat="server" EnableViewState="False"></asp:Literal>
    </form>
</body>
</html>
