<%@ Page Language="C#"  Theme="Default" MasterPageFile="~/Dialog/DialogMaster.Master"  AutoEventWireup="true" CodeBehind="CustomerTypeList.aspx.cs" Inherits="OAWeb.crm.customer.CustomerTypeList"  EnableViewState="true" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div style="width: 600px; height:400px; margin-left:auto; margin-right:auto;">
        <div class=" TypeList " style=" text-align:left; margin-top:15px; font-size:15px;margin-left: 5px; margin-bottom:15px;">
            <asp:LinkButton ID="LinkButton3" runat="server" onclick="LinkButton3_Click">添加分类</asp:LinkButton> 
            <a style=" margin-left:10px;" href="javascript:void(0)" onclick="CloseReload();">返回</a>
            
        </div>
        <table class="search-view" cellspacing="1" cellpadding="3" style="width: 95%; margin-bottom: 10px;
            margin-left: 5px;" id="tbAdd"  runat="server" visible="false">
            <tr runat="server" id="searchpanel">
                <td bgcolor="#ffffff"  align="left">
                    <table width="100%" class="" >
                        <tr>
                            <td align="center" class="" width="15%">
                                分类名称
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="txtTypeName" runat="server" Width="435px" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="" width="15%">
                                分类描述
                            </td>
                            <td colspan="3">
                                <asp:TextBox TextMode="MultiLine" ID="txtRemark" runat="server" Height="77px"
                                    Width="435px" Text=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="" colspan="4">
                                <asp:Button ID="Button1" runat="server" Text="确定" onclick="Button1_Click" CssClass="btn_77px" />
                                <asp:Button ID="Button2" runat="server" Text="取消" onclick="Button2_Click" CssClass="btn_77px" />
                                <asp:HiddenField ID="HiddenField1" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvMath" runat="server" AutoGenerateColumns="False" DataKeyNames=""
            Width="99%" OnRowDataBound="gvMath_RowDataBound" 
            onrowcommand="gvMath_RowCommand">
            <HeaderStyle Wrap="False" CssClass="title"></HeaderStyle>
            <Columns>
                <asp:TemplateField HeaderText="分类">
                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# Eval("TypeName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="描述">
                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# Eval("remark")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="lbtnEdit" CommandArgument='<%# Eval("Id") %>'>编辑</asp:LinkButton>
                        <asp:LinkButton ID="lbtnDel" OnClientClick="return confirm('此分类下的客户将设置到未分类，是否继续?')" runat="server"  CommandName="lbtnDel" CommandArgument='<%# Eval("Id") %>' >删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>