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

<%@ Register src="UC_AdminOperatoChecker.ascx" tagname="UC_AdminOperatoChecker" 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>
                </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderName" runat="server" CssClass="Label1" 
                    Text="نام:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderName" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="100"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Txt_ProviderName" 
                    ErrorMessage="ورود نام الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderSName" runat="server" CssClass="Label1" 
                    Text="نام خانوادگی:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderSName" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="100"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="Txt_ProviderSName" 
                    ErrorMessage="ورود نام خانوادگی الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderEmail" runat="server" CssClass="Label1" 
                    Text="آدرس ایمیل:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderEmail" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="100"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="Txt_ProviderEmail" 
                    ErrorMessage="ورود آدرس ایمیل الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="Txt_ProviderEmail" 
                    ErrorMessage="قالب آدرس ایمیل وارد شده صحیح نمی باشد" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="11">*</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderEmail0" runat="server" CssClass="Label1" 
                    Text="تلفنهای تماس:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderPhones" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="250"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="Txt_ProviderPhones" 
                    ErrorMessage="ورود شماره تلفن الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderEmail1" runat="server" CssClass="Label1" 
                    Text="نمابر:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderFax" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="250"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="Txt_ProviderFax" 
                    ErrorMessage="ورود شماره نمابر الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderMobile" runat="server" CssClass="Label1" 
                    Text="تلفن همراه:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderMobiles" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="250"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="Txt_ProviderMobiles" 
                    ErrorMessage="ورود شماره تلفن همراه الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_ProviderPostalAddress" runat="server" CssClass="Label1" 
                    Text="آدرس پستی:" Height="16px"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_ProviderPostalAddress" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11" MaxLength="500"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                    ControlToValidate="Txt_ProviderPostalAddress" 
                    ErrorMessage="ورود آدرس پستی الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </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:UC_AdminOperatoChecker ID="UC_AdminOperatoChecker1" 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_Providers" runat="server" CssClass="mGrid" 
                    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                    DataKeyNames="ProviderID" DataSourceID="LinqDt_Providers" PageSize="20">
                    <Columns>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:BoundField DataField="ProviderID" HeaderText="کد" 
                            InsertVisible="False" ReadOnly="True" SortExpression="ProviderID">
                        </asp:BoundField>
                        <asp:BoundField DataField="ProviderName" HeaderText="نام" 
                            SortExpression="ProviderName" />
                        <asp:BoundField DataField="ProviderSName" HeaderText="نام خانوادگی" 
                            SortExpression="ProviderSName" />
                        <asp:BoundField DataField="ProviderEmail" HeaderText="آدرس ایمیل" 
                            SortExpression="ProviderEmail" />
                        <asp:BoundField DataField="ProviderPhones" HeaderText="تلفن" 
                            SortExpression="ProviderPhones" />
                        <asp:BoundField DataField="ProviderFaxes" HeaderText="نمابر" 
                            SortExpression="ProviderFaxes" />
                        <asp:BoundField DataField="ProviderMobiles" HeaderText="تلفن همراه" 
                            SortExpression="ProviderMobiles" />
                        <asp:BoundField DataField="ProviderPostalAddress" HeaderText="آدرس پستی" 
                            SortExpression="ProviderPostalAddress" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                    <HeaderStyle ForeColor="#E4E4E4" />
                </asp:GridView>
                <asp:LinqDataSource ID="LinqDt_Providers" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" EnableDelete="True" 
                    EnableUpdate="True" OrderBy="ProviderID desc" TableName="tblProviders">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

