<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="charge_group_sort.aspx.cs" Inherits="VA.Modules.JDingMember.consume.charge_group_sort" %>

<%@ Import Namespace="System.Data"%>

<!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>
<title>项目组套排序</title>    
    <!--#include virtual="/include/css/editlist.aspx"-->
    <!--#include virtual="/include/js/editlist_s.aspx"--> 
    <script type="text/javascript">

        function saveSortIndex() {
            var requestType = "POST";
            var url = pageName + "?act=save";  //pageName在BasePage中注册到的客户端；
            var dataType = "html";
            var data = $("form").eq(0).serialize();
            var successFN = function (data, textStatus) {
                if (data == "ok") {
                    showActResult("保存成功！", true);
                } else if (data.indexOf("01|") != -1) {
                    showActResult(data, false);
                }
                else {
                    showActResult("保存失败：" + data, false);
                }
            };
            ajaxRequest(requestType,
                url,
                dataType,
                data,
                successFN,
                errorFN
                );
        }

        function showActResult(actDesc, actResult) {
            if (actResult) {
                $.messager.alert('操作结果', actDesc, 'info', function () {
                    try {                        
                        reload();
                    } catch (e) { }
                });
            } else {
                $.messager.alert('操作结果', actDesc, 'warning')
            }
        }

        //取消
        function cancel() {
            window.parent.closeFrameWindow();
            try {
                window.parent.refreshGroups();
            } catch (e) { }
        }

        $(function(){                   
            initListPage();
        });
    </script>

</head>
<body>
<!--说明：该页面是以 employee_editlist_nofresh_5.aspx 为原型封装的结果-->
<form id="Form1" method="post" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<div id="pageWrapper" class="pageWrapper">   
    
    <div id="toolBar">                          
        <%--<a href="javascript:saveSortIndex()" class="jtongui-toolbarbutton" icon="icon-add">保存排序</a>--%>
        <a href="javascript:refresh()" class="jtongui-toolbarbutton" icon="icon-reload">刷新</a>            
    </div><!--toolBar.END-->   
                     
    <div id="searchBar">
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
                
        <asp:TextBox ID="txtKeyWords" runat="server"
            CssClass="input keywords"
            Width="150px" />
              
        <asp:Button ID="btnSearch" runat="server" 
             CssClass="simpleBtn"
             Text="查询" 
             Onclick="btnSearch_Click" />
        
        </ContentTemplate>
        </asp:UpdatePanel>

    </div><!--searchBar.END-->    

    <div id="dataBar">

    <!--MainList.Start-->    
    <div class="jtongui-smartlisttable" id="jtongui-smartlisttable">

    <table cellpadding="3" cellspacing="0" class="tableheader" id="tb1_header" >
    <thead>
    <tr>
        <%--<td style="width:30px;text-align:center;"><input type="checkbox" id="ckb_selectAll"/></td>--%>
        <td style="width:30px;text-align:center;">No.</td>
        <td style="width:50px;text-align:center;">排序值</td>
        <td style="width:300px;text-align:center;">组套名称</td>  	       	          	    	         
        <td></td>
    </tr>    
    </thead>
    </table>

    <div id="dataBody">
    <asp:Repeater ID="myRepeater" Runat="server" EnableViewState="False"  >
    <HeaderTemplate>
    <div class="bodyContainer">
    <% = base.ShowNoRecordInfo() %>    
    <table cellpadding="3" cellspacing="0" class="tablebody" tbHeader="tb1_header">
    </HeaderTemplate>
    <ItemTemplate>
    <tr>
        <%--<td style="text-align:center;"><input type="checkbox" name="ckb_dataItem" value="<%# Eval("RID")%>" /></td>--%>
        <td align="center"><%# Container.ItemIndex + 1%></td>
        <td align="center">
            <input type="hidden" name="txtRID" value="<%# Eval("RID")%>" />
            <input type="text" name="txtSortIndex" class="input" value="<%# Eval("Sort_Index")%>" style="width:40px;" />
        </td>
        <td align="left"><%# Eval("Group_Name")%></td>
        <td></td>
    </tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </div><!--bodyContainer.END-->        
    
    <input type="hidden" name="chkNum" value="<%=chkNum%>" />

    </FooterTemplate>
    </asp:Repeater>    
    </div><!--dataBody.END-->

    </div><!--jtongui-smartlisttable.END-->        
    <!--MainList.End-->  

    </div><!--dataBar.END-->

    <div id="bottomToolBar">             
        <input type="button" id="btnSave" class="btn" style="width:100px" onclick="saveSortIndex()" value="保存排序" />
        <input type="button" id="btnCancel" class="btn" style="width:100px" onclick="cancel()" value="关闭" />
    </div><!--toolBar.END-->      
    
</div>

</form>
</body>
</html> 