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

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width:100%;">
        <tr>
            <td colspan="3">
                <asp:Label ID="Lbl_Title" runat="server" CssClass="LabelHeaader" 
                    Text="ثبت نام نوع کاربر"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Lbl_UserType" runat="server" CssClass="Label1" 
                    Text="نوع کاربر:"></asp:Label>
                        </td>
            <td>
                <asp:TextBox ID="Txt_UserType" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Txt_UserType" ErrorMessage="ورود نوع کاربر الزامی است" 
                    ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                            <asp:Button ID="Btn_Save" runat="server" CssClass="ButtonAdd" 
                                onclick="Btn_Save_Click" Text="ثبت نوع کاربر" 
                    ValidationGroup="11" />
                        </td>
            <td>
                <asp:Label ID="Lbl_Error" runat="server" CssClass="LabelError"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                                ValidationGroup="11" />
                        </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:GridView ID="Grd_UserType" runat="server" AutoGenerateColumns="False" 
                    CssClass="mGrid" DataKeyNames="UserTypeID" DataSourceID="LinqDt_Type">
                    <Columns>
                        <asp:CommandField HeaderText="حذف" ShowDeleteButton="True">
                            <ItemStyle Width="100px" />
                        </asp:CommandField>
                        <asp:BoundField DataField="UserTypeID" HeaderText="کد نوع کاربر" 
                            InsertVisible="False" ReadOnly="True" SortExpression="UserTypeID">
                            <ItemStyle Width="150px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="UserTypeDescription" HeaderText="نوع کاربر" 
                            SortExpression="UserTypeDescription" />
                        <asp:CommandField HeaderText="ویرایش" ShowEditButton="True">
                            <ItemStyle Width="100px" />
                        </asp:CommandField>
                    </Columns>
                </asp:GridView>
                <asp:LinqDataSource ID="LinqDt_Type" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" EnableDelete="True" 
                    EnableUpdate="True" OrderBy="UserTypeID desc" TableName="tblUserTypes">
                </asp:LinqDataSource>
            </td>
        </tr>
    </table>
</asp:Content>

