<%@ Page Language="C#" MasterPageFile="~/AdminMaster.master" AutoEventWireup="true" CodeFile="SefareshGheyreMashmol.aspx.cs" Inherits="SefareshGheyreMashmol" 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 colspan="3" style="text-align: left">
                <asp:Label ID="Lbl_Title" runat="server" CssClass="LabelHeaader" 
                    Text="تحویل کالای غیر مشمول سفارش به انبار"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_DeliveryPlace" runat="server" CssClass="Label1" 
                    Text="محل تحویل:"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:DropDownList ID="Drp_PlaceTahvil" runat="server" CssClass="DropDownList" 
                    DataSourceID="LinqDt_PlaceDelivery" DataTextField="WarHouseDescription" 
                    DataValueField="WarwHouseID" ValidationGroup="11">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDt_PlaceDelivery" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" OrderBy="WarwHouseID desc" 
                    Select="new (WarwHouseID, WarHouseDescription)" TableName="tblWareHouseNames">
                </asp:LinqDataSource>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Drp_PlaceTahvil" 
                    ErrorMessage="انتخاب نام انبار الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_OrderID0" runat="server" CssClass="Label1" Text="اقلام :"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:DropDownList ID="Drp_Assets" runat="server" CssClass="DropDownList" 
                    DataSourceID="LinqDt_AssetInfo" DataTextField="AssetsInfo" 
                    DataValueField="AssetID" ValidationGroup="11">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDt_AssetInfo" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" OrderBy="AssetID desc" 
                    Select="new (AssetID, AssetsInfo)" TableName="xtblAssetInfoDrps">
                </asp:LinqDataSource>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="Drp_Assets" 
                    ErrorMessage="انتخاب جزئیات سفارش الزامی می باشد" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_OrderID1" runat="server" CssClass="Label1" 
                    Text="هزینه خرید واحد:"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_UnitPrice" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="Txt_UnitPrice" 
                    ErrorMessage="وارد کردن قیمت واحد کالا الزامی است" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Label ID="Lbl_OrderID2" runat="server" CssClass="Label1" 
                    Text="تعداد کالای مورد درخواست:"></asp:Label>
            </td>
            <td style="text-align: right">
                <asp:TextBox ID="Txt_CountAssets" runat="server" 
                    CssClass="TextNormalAlignLeftDLeft" ValidationGroup="11"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="Txt_CountAssets" 
                    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" />
                <asp:Button ID="Btn_Save" runat="server" CssClass="ButtonSave" 
                    onclick="Btn_Save_Click" Text="ثبت نهایی" />
            </td>
            <td>
                <asp:Label ID="Lbl_Error" runat="server" CssClass="LabelError"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: right">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                    ValidationGroup="11" Width="700px" />
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: center">
                <asp:GridView ID="Grd_OrderDetailsM" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" CssClass="mGrid" 
                    onselectedindexchanged="Grd_OrderDetailsM_SelectedIndexChanged" 
                    PageSize="20" DataKeyNames="AssetsID">
                    <Columns>
                        <asp:CommandField HeaderText="حذف از لیست" SelectText="حذف" 
                            ShowSelectButton="True">
                        </asp:CommandField>
                        <asp:TemplateField HeaderText="کد کالا">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("AssetsID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="مشخصات کالا">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("AssetsName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="کد محل تحویل ">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("WarwHouseID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="محل تحویل">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("WarwHouseName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="تعداد درخواست">
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="قیمت واحد">
                            <ItemTemplate>
                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("UnitPrice") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="قیمت کل">
                            <ItemTemplate>
                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("TotalPrice") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle ForeColor="#E4E4E4" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                &nbsp;</td>
            <td>
                <uc1:UC_AdminOperatoChecker ID="UC_AdminOperatoChecker1" runat="server" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

