<%@ Page Language="C#" MasterPageFile="~/AdminMaster.master" AutoEventWireup="true" CodeFile="Marjoee.aspx.cs" Inherits="Marjoee" 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 class="style4" colspan="3">
                <asp:Label ID="Lbl_Title" runat="server" CssClass="LabelHeaader" 
                    Text="لیست کالاهای مرجوعی"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style4">
                <asp:Label ID="Lbl_UserName" runat="server" CssClass="Label1" 
                    Text="نام کاربری:"></asp:Label>
            </td>
            <td class="style2">
                <asp:DropDownList ID="Drp_UserName" runat="server" 
                    DataSourceID="LinqDt_UserPurchedDeliveredNotMarjoee" DataTextField="UserName" 
                    DataValueField="UserName" AutoPostBack="True" CssClass="DropDownList">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDt_UserPurchedDeliveredNotMarjoee" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" OrderBy="UserName" 
                    Select="new (UserName)" TableName="xtblUserPurchedDeliveredNotMarjoees">
                </asp:LinqDataSource>
            </td>
            <td class="style2">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ErrorMessage="انتخاب نام کاربری الزامی می باشد" 
                                ControlToValidate="Drp_UserName" ValidationGroup="11">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style3">
                <asp:Label ID="Lbl_Jozeeat" runat="server" CssClass="Label1" 
                    Text="جزئیات سفارشات:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="Drp_OrderDetailDes" runat="server" 
                    DataSourceID="LinqDt_AssetPurchedDeliveredNotMarjoee" 
                    DataTextField="OrderDetailDescription" DataValueField="OrderDetailID" 
                    CssClass="DropDownList">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDt_AssetPurchedDeliveredNotMarjoee" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" 
                    Select="new (OrderDetailID, OrderDetailDescription)" 
                    TableName="xtbOrderDetailPurchedDeliveredNotMarjoees" 
                    Where="UserName == @UserName">
                    <WhereParameters>
                        <asp:ControlParameter ControlID="Drp_UserName" Name="UserName" 
                            PropertyName="SelectedValue" Type="String" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </td>
            <td>
                            </td>
        </tr>
        <tr>
            <td class="style3">
                <asp:Label ID="Lbl_UserMarjoeKonande0" runat="server" CssClass="Label1" 
                    Text="وضعیت کالای مرجوعی:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="Drp_ElatMarjoee" runat="server" 
                    DataSourceID="LinqDt_ElatMarjoee" DataTextField="StateDescription" 
                    DataValueField="StateID" CssClass="DropDownList">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDt_ElatMarjoee" runat="server" 
                    ContextTypeName="LSC_WareHouseDataContext" OrderBy="StateID" 
                    Select="new (StateID, StateDescription)" TableName="tblAssetStates">
                </asp:LinqDataSource>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style3">
                <asp:Label ID="Lbl_UserMarjoeKonande1" runat="server" CssClass="Label1" 
                    Text="ملاحظات:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="Txt_Note" runat="server" CssClass="TextNormalAlignLeftDLeft" 
                    MaxLength="200"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="Txt_Note" ErrorMessage="وارد کردن ملاحظات الزامی است">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style3">
                            &nbsp;</td>
            <td>
                <asp:Button ID="Btn_ViewUserOrders" runat="server" CssClass="ButtonAdd" 
                                Text="درج در لیست" onclick="Btn_ViewUserOrders_Click" 
                                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>
                &nbsp;</td>
            <td>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                                ValidationGroup="11" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:GridView ID="Grd_AssetUnits" runat="server" CssClass="mGrid" 
                    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                    PageSize="20" DataKeyNames="OrderDetailID" 
                    onselectedindexchanged="Grd_AssetUnits_SelectedIndexChanged">
                    <Columns>
                        <asp:CommandField HeaderText="حذف از لیست" SelectText="حذف" 
                            ShowSelectButton="True">
                            <ItemStyle Width="100px" />
                        </asp:CommandField>
                        <asp:TemplateField HeaderText="کد جزئیات سفارش">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("OrderDetailID") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Width="150px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="جزئیات سفارش">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("OrderDescription") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="وضعیت کالای مرجوعی">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("VazyiatMarjoee") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Width="150px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="علت مرجوعی کالا">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("ElatMarjoeeNot") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle ForeColor="#E4E4E4" />
                </asp:GridView>
                <uc1:UC_AdminOperatoChecker ID="UC_AdminOperatoChecker1" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

