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

<%@ Register src="US_MainAdminChecker.ascx" tagname="US_MainAdminChecker" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width:100%;">
        <tr>
            <td style="text-align: left" colspan="3">
                <asp:Label ID="Lbl_Title" runat="server" CssClass="LabelHeaader" 
                    Text="ایجاد انبار"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                &nbsp;</td>
            <td style="text-align: right">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_WareHouseDesc" runat="server" CssClass="Label1" 
                    Text="عنوان انبار"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_WarhouseTitle" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Txt_WarhouseTitle" 
                    ErrorMessage="ورود عنوان انبار الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: left">
                &nbsp;</td>
            <td>
                <asp:Button ID="Btn_Insert" runat="server" CssClass="ButtonAdd" 
                    onclick="Btn_Insert_Click" Text="ایجاد انبار" ValidationGroup="11" />
            </td>
            <td>
                <asp:Label ID="Lbl_Error" runat="server" CssClass="LabelError"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="text-align: right" colspan="3">
                <uc1:US_MainAdminChecker ID="US_MainAdminChecker1" runat="server" />
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" Width="700px" 
                    ValidationGroup="11" />
            </td>
        </tr>
        <tr>
            <td style="text-align: center" colspan="3">
                <asp:GridView ID="Grd_WareHouse" runat="server" CssClass="mGrid" 
                    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                    DataKeyNames="WarwHouseID" DataSourceID="LinqDts_WareHouse" PageSize="20">
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True">
                            <ItemStyle Width="70px" />
                        </asp:CommandField>
                        <asp:BoundField DataField="WarwHouseID" HeaderText="کد انبار" 
                            InsertVisible="False" ReadOnly="True" SortExpression="WarwHouseID">
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="WarHouseDescription" HeaderText="عنوان انبار" 
                            SortExpression="WarHouseDescription" />
                    </Columns>
                    <HeaderStyle ForeColor="#E4E4E4" />
                </asp:GridView>
                <asp:LinqDataSource ID="LinqDts_WareHouse" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" EnableDelete="True" 
                    EnableUpdate="True" OrderBy="WarwHouseID desc" TableName="tblWareHouseNames">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

