<%@ Page Language="C#" MasterPageFile="Admin.Master" AutoEventWireup="true" CodeBehind="Packageedit.aspx.cs" Inherits="Mvcb2b.admin.Packageedit" Title="用户修改" ValidateRequest="false" %>
<%@ MasterType VirtualPath="Admin.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
    function checkform() {
        if (typeof (Page_ClientValidate) == 'function') {
            if (Page_ClientValidate())    //(Page_ClientValidate())
            {
                if (document.getElementById("<%=startdate_txt.ClientID%>").value == "" && document.getElementById("<%=daynext_txt.ClientID%>").value == "") {
                    alert("日期范围至少要填写一个！");
                    return false;
                }
                if (document.getElementById("<%=startdate_txt.ClientID%>").value != "" && document.getElementById("<%=enddate_txt.ClientID%>").value == "") {
                    alert("请填写结束日期！");
                    return false;
                }
                if (document.getElementById("<%=startdate_txt.ClientID%>").value != "" || document.getElementById("<%=enddate_txt.ClientID%>").value != "") {
                    var startdate = new Date(Date.parse(document.getElementById("<%=startdate_txt.ClientID%>").value.replace(/-/g, "/")));
                    var enddate = new Date(Date.parse(document.getElementById("<%=enddate_txt.ClientID%>").value.replace(/-/g, "/")));
                    if (startdate.toString() == "Invalid Date" || enddate.toString() == "Invalid Date") {
                        alert("错误的日期格式! 正确如：2014-12-31 ");
                        return false;
                    }
                }                
            }
        }
    }
</script>
<div class="path">当前位置： 数字报套餐 >>  数字报套餐修改</div>
<h3><asp:Literal  ID="Literal1" runat="server"></asp:Literal></h3>
<table width="92%" border="0" class="editor" align="center" style="background-color:#f5f5f5;" cellpadding="3" cellspacing="1">       
<tr><td width="120" align="right"><span style="color: Red">*</span>套餐名称：</td><td><asp:TextBox ID="pname_txt" runat="server" Text="" Width="200px"></asp:TextBox> &nbsp;
<asp:Button ID="update_userdate" runat="server" Text="更新用户数据" Width="90px"  
        ValidationGroup="Haosubmit" onclick="update_userdate_Click"   /> <asp:Literal  ID="update_msg" runat="server"></asp:Literal>
 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="套餐名称不能为空" Display="None" ControlToValidate="pname_txt"></asp:RequiredFieldValidator> </td></tr>
<tr><td align="right">套餐价格：</td><td><asp:TextBox ID="pfee_txt" runat="server" Text="" Width="50px"></asp:TextBox>元  <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="套餐价格不能为空" Display="None" ControlToValidate="pfee_txt"></asp:RequiredFieldValidator> <asp:comparevalidator id="comparevalidator3" runat="server" ErrorMessage="套餐价格只能为数字!" ControlToValidate="pfee_txt" Display="None" Type="Currency" Operator="DataTypeCheck"></asp:comparevalidator></td></tr>
<tr><td align="right">套餐说明：</td><td><asp:TextBox ID="pdes_txt" runat="server" Text=""  TextMode=MultiLine Width="300px" Rows="6" Height="120px"></asp:TextBox></td></tr>
<tr><td align="right">固定日期范围：</td><td>
开始日期： <asp:TextBox ID="startdate_txt" runat="server" Text="" Width="80px"></asp:TextBox> 结束日期： <asp:TextBox ID="enddate_txt" runat="server" Text="" Width="80px"></asp:TextBox> <span style="color:#ccc;">如开始日期：2013-1-1 结束日期：2014-12-31</span>
</td></tr>
<tr><td align="right">动态日期范围：</td><td>
<asp:TextBox ID="daynext_txt" runat="server" Text="" Width="50px"></asp:TextBox> <asp:comparevalidator id="comparevalidator2" runat="server" ErrorMessage="只能为数字!" ControlToValidate="daynext_txt" Display="None" Type="Integer" Operator="DataTypeCheck"></asp:comparevalidator><select name="daynextdes_txt" >
<option value="月">月</option>
<option value="天">天</option>
</select>后结束 赠送上<asp:TextBox ID="daypre_txt" runat="server" Text="" Width="50px"></asp:TextBox><asp:comparevalidator id="comparevalidator1" runat="server" ErrorMessage="只能为数字!" ControlToValidate="daypre_txt" Display="None" Type="Integer" Operator="DataTypeCheck"></asp:comparevalidator><select name="daypredes_txt" >
<option value="月">个月</option>
<option value="天">天</option>
</select>   <span style="color:#ccc;">如半年为6个月，一年为12个月</span>
</td></tr>
<tr><td align="right">排序：</td><td><asp:TextBox ID="sortid_txt" runat="server" Text="0" Width="50px"></asp:TextBox></td></tr>
<tr><td colspan="2" align="center"><asp:HiddenField ID="action_txt" runat="server" />
<asp:HiddenField ID="id_txt" runat="server" />
<asp:HiddenField ID="fromrefer" runat="server" />
    <asp:Button ID="Add" runat="server" Text="修改" Width="58px"   onclick="Edit_Click" /> &nbsp;<asp:validationsummary id="ValidationSummary1"  runat="server" ShowMessageBox="True" ShowSummary="False"  ></asp:validationsummary> <input type="button" value="返回" name="go" style="width:58px;" onclick="javascript:history.go(-1);"  /></td></tr>
</table>

<p style="text-align:left;padding-left:80px;font-size:12px;line-height:20px;">? 帮助：<br />
1 .固定日期和动态日期只能任选其一，以保证用户权限收费日期是连续的.<br />
</p>
</asp:Content>
