<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserCompet_List.aspx.cs" Inherits="RM.Web.Training.ExamCompet.UserCompet_List" %>

<%@ Register Src="~/UserControl/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>

<!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><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ExamPlan_ksjhlist")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
     <link href="/Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
     <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>    
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <style type="text/css">
    
    .div-body table{ border:1px solid #ccc; padding:5px; margin:5px; width:80%; }
    .div-body tr,td,th{padding:5px; margin:5px;}
    .div-body td span{/*background-color: #05b600;border: 1px solid #05a700;color: White;font-size: 18px;height: 30px;line-height: 30px;*/display: block;margin: 0;padding: 0;width: 50px;}
    .div-body td span a{/*background-color: #05b600;border: 1px solid #05a700;font-size: 18px;height: 30px;line-height: 30px;*/color:Blue;display: block;margin: 0;padding: 0;width: 50px;}
    .grid a:link {color:Blue;}
    .grid a:visited {color:Blue;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ExamCompet_ksjhlist")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: right">

        </div>
    </div>
    <%--<div class="div-body">
        <%if (list != null && list.Count > 0){ %>
        <% foreach(TKS_Base.Models.TKS_ExamCompet model in list ){ %>
        <table>
        <tr><th style="text-align:right;width:30%; " >竞赛名称：</th><td><%=model.Exam_Plan_ExamName %></td></tr>
        <tr><th style="text-align:right;width:30%;">竞赛介绍：</th><td><%=model.ExamCompet_Description %></td></tr>
        <tr><th style="text-align:right;width:30%;">竞赛名额：</th><td><label id="lbl_<%=model.ExamCompet_Id%>"><%=model.ExamCompet_XueFen %></label></td></tr>
        <tr><th style="text-align:right;width:30%;">已报名人数：</th><td><label id="lbl<%=model.ExamCompet_Id%>"></label></td></tr>
        <tr>
            <td colspan="2" align="center"><span id="<%=model.ExamCompet_Id %>"></span>
                <script  type="text/javascript">
                    $("#<%=model.ExamCompet_Id %>").load('/Training/ExamCompet/UserCompet_List.aspx?type=1&key=<%=model.ExamCompet_Id %>');

                    $("#lbl<%=model.ExamCompet_Id %>").load('/Training/ExamCompet/UserCompet_List.aspx?type=2&key=<%=model.ExamCompet_Id %>');
                </script>
                </td></tr>
        </table>
        <%}} %>
    </div>--%>
    
    <div class="div-body">
        <%=TableHtml %>
    </div>

    <script src="/Themes/Scripts/jQuery.lightMenu-1.0.0.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/CreateContextJs.js" type="text/javascript"></script>
    <script type="text/javascript">var Mywindows = 'TKS_ExamCompetList';</script>


    <uc1:PageControl ID="PageControl1" runat="server" />

    </form>

    <script type="text/javascript">
        $(function () {
            //把分页定位到屏幕下面
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 121);
        })
        //添加
        function add() {
            var url = "/Training/ExamCompet/ExamCompet_Form.aspx";
            window.location = url;
        }
        //编辑
        function edit() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                var url = "/Training/ExamCompet/ExamCompet_Form.aspx?key=" + key;
                //                top.openDialog(url, 'ExamPlan_Form_Edit', '考试计划 - 编辑计划', 750, 550, 50, 50);
                window.location = url;
            }
        }
        
        //详细
        function detail() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                var url = "/Training/ExamCompet/ExamPlan_ListDetail.aspx?epid=" + key;
                //op.openDialog(url, 'Plan_Form_edit', '培训计划 - 编辑课件', 700, 400, 50, 50);
                window.location = url;
            }
        }
        //删除
        function Delete() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                //var delparm = 'action=Virtualdelete&module=<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("DataList_ExamPlan")%>&tableName=TKS_ExamPlan&pkName=ExamPlan_Id&pkVal=' + key;
                //delConfig('/Ajax/Common_Ajax.ashx', delparm);
                var parm = "action=delete&planid=" + key;
                showConfirmMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("exam_zhuhsz")%>', function (r) {
                    if (r) {
                        getAjax('/Training/ExamCompet/ExamPlan_List.aspx', parm, function (rs) {
                            //                            if (parseInt(rs) > 0) {
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Role_List_delr")%>！', 2000, 4);
                            windowload();
                            //                            } else if (parseInt(rs) == 0) {
                            //                                showTipsMsg("删除失败，0 行受影响！", 3000, 3);
                            //                            }
                            //                            else {
                            //                                showTipsMsg("<span style='color:red'>删除失败，请稍后重试！</span>", 4000, 5);
                            //                            }
                        });
                    }
                });

            }
        }

        function biaoming(key) {
            if (jQuery("#lbl_" + key + "").html() <= jQuery("#lbl" + key + "").html()) {
                showTipsMsg("报名人数已满！", 3000, 3);
                return;
            } else {
                var url = "/Training/ExamCompet/compet_Form.aspx?key=" + key;
                top.openDialog(url, 'Plan_List_set', '竞赛计划 - 竞赛报名', 750, 450, 50, 50);
            } 
        }

    </script>
</body>
</html>

