<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PostCommodity.aspx.cs"
    Inherits="MTCUN.Commodity.PostCommodity" Title="增加新产品-仓库" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../UserCol/Ann.ascx" TagName="Ann" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
    <style type="text/css">
        #PhotoScale
        {
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
        }
    </style>
</head>
<script type="text/javascript">

    function Avicap() {
        window.showModelessDialog("../Tools/Avicap.aspx", window, "dialogWidth=280px;dialogHeight=300px");
    }

    function LookPic() {
        var img = document.getElementById("imgPhoto");
        var file = document.getElementById("File1");
        var cimgurl = document.getElementById("imgUrl");
        var scale = document.getElementById("imgScale");
        if (file.value != "") {
            scale.style.display = "none";
            img.style.display = "inline";
            img.height = 16;
            img.src = file.value;
            img.height = "150";
            cimgurl.value = file.value;
        }
    }

    function DeletePic(src) {
        if (src.indexOf("../Images/Pic.gif") == -1) {
            lbnDelete.style.visibility = "visible";
        }
    }

    function AllowPoints() {
        var sender = document.getElementById("ddlAllowPoints");
        if (sender.value == 0)
        { spanPoints.style.visibility = "hidden"; }
        else
        { spanPoints.style.visibility = "visible"; }
    }
</script>
<body onload="AllowPoints()">
    <form id="form1" runat="server">
    <div class="divpanel">
        <uc1:Ann ID="Ann1" runat="server" />
    </div>
    <div class="divpanel">
        <table class="table" cellspacing="0">
            <tr>
                <th colspan="2">
                    商品信息
                </th>
            </tr>
            <tr>
                <td>
                    名称：
                </td>
                <td>
                    <asp:TextBox ID="tbxCommodityName" runat="server"></asp:TextBox>
                    <span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td>
                    分类：
                </td>
                <td>
                    <asp:DropDownList ID="ddlCommodityType" runat="server" DataTextField="CommodityTypeName"
                        DataValueField="CommodityTypeID">
                    </asp:DropDownList>
                    <span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td>
                    单位：
                </td>
                <td>
                    <asp:DropDownList ID="ddlUnit" runat="server" DataTextField="UnitName" DataValueField="UnitName">
                    </asp:DropDownList>
                    <span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td>
                    进价：
                </td>
                <td>
                    <asp:TextBox ID="tbxPurchasePrice" runat="server" Width="94px"></asp:TextBox>
                    <span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td>
                    售价：
                </td>
                <td>
                    <asp:TextBox ID="tbxUnitPrice" runat="server" Width="94px"></asp:TextBox>
                    <span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td>
                    规格：
                </td>
                <td>
                    <asp:TextBox ID="tbxSpecification" runat="server" Width="254px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    最低库存报警数：
                </td>
                <td>
                    <asp:TextBox ID="tbxWarnAmount" runat="server" Width="41px"></asp:TextBox>
                    <span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td>
                    积分兑换：<td>
                        <asp:DropDownList ID="ddlAllowPoints" runat="server">
                            <asp:ListItem Value="0">禁止</asp:ListItem>
                            <asp:ListItem Value="1">允许</asp:ListItem>
                        </asp:DropDownList>
                        <span id="spanPoints">需积分：<asp:TextBox ID="tbxPoints" runat="server" Width="51px"></asp:TextBox>
                        </span>
                    </td>
            </tr>
            <tr>
                <td>
                    状态：
                <td>
                    <asp:DropDownList runat="server" ID="ddlLockState" SelectedIndex='<%# Eval("LockState") %>'>
                        <asp:ListItem Value="0" Selected="True" Text="禁用"></asp:ListItem>
                        <asp:ListItem Value="1" Text="启用"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    备注：
                </td>
                <td>
                    <asp:TextBox ID="tbxRemark" runat="server" Width="306px" Height="52px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    条形码：
                </td>
                <td>
                    <asp:TextBox ID="tbxBarcode" runat="server" Width="165px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <label class="lab_button">
<asp:Button ID="btnAdd" runat="server" Text="提交" OnClick="btnAdd_Click"></asp:Button>
</label>
                    <label class="lab_button" id="__mt_labBack" runat="server">
<input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
</label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
