<%@ Page Title="" Language="C#" MasterPageFile="~/Master/officeMaster.master" AutoEventWireup="true" CodeFile="QuestionInfo.aspx.cs" Inherits="Question_QuestionInfo" %>
<%@ Register Src="~/Ucontrol/work.ascx" TagName="Personnel" TagPrefix="ucl" %>
<%@ Register Src="~/Ucontrol/ucPersonnel.ascx" TagName="WPersonnel" TagPrefix="ccl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css" language="javascript">
        td
        {
            height: 50px;
        }
    </style>
    <script type="text/javascript" language="javascript">
        function CheckEmpty() {
            var questionContent = $("#<%=txtQuestion.ClientID %>")[0];//问题
            var solvePersonnel = $('#<%=uclPersonnelSolve.FindControl("ddlPersonnel").ClientID %>')[0]; //解决人
            var limitTime = $("#<%=txtLimitTime.ClientID %>")[0]; //限制时间(超出时间将问题上报给上级)
            var headerPersonnel = $('#<%=cclPersonnelHeader.FindControl("ddlPersonnel").ClientID %>')[0]; //上报的上级
            if (questionContent.value == '') {
                alert('问题不能为空！');
                questionContent.focus();
                return false;
            }
            if(solvePersonnel.value!='0'){
                alert('解决人不能为空！');
                return false;
            }
            if(limitTime.value==''){
                alert('限制时间不能为空！');
                limitTime.focus();
                return false;
            }
            if(headerPersonnel.value=='0'){
                alert('超时上报人不能为空！');
                return false;
            }
            if (confirm("确定提交吗？")) {
                return true;
            }
            
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="usertableborder" cellspacing="1" cellpadding="3" width="100%" align="center"
        border="0">
        <tr>
            <th>
                问题信息
            </th>
        </tr>
    </table>
    <br />
    <table width="70%">
        <tr>
            <td class="alignright" width="35%">
                问题：
            </td>
            <td width="65%">
                <asp:TextBox ID="txtQuestion" runat="server" TextMode="MultiLine" Width="500" Height="100"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="alignright">
                解决人：
            </td>
            <td>
                <ucl:Personnel ID="uclPersonnelSolve" runat="server" OpenAjaxUrl="../Ajax/Ajax_Work.aspx" />
            </td>
        </tr>
        <tr>
            <td class="alignright">
                解决状态：
            </td>
            <td>
                <asp:RadioButtonList ID="rblSolveState" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Text="未解决" Value="1" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="已解决" Value="0"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="alignright">
                限制时间：
            </td>
            <td>
                <asp:TextBox ID="txtLimitTime" runat="server" onfocus="WdatePicker()" Width="140"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="alignright">
                超时上报人：
            </td>
            <td>
                <ccl:WPersonnel ID="cclPersonnelHeader" runat="server" OpenAjaxUrl="../Ajax/Ajax_Personnel.aspx" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click" OnClientClick="return CheckEmpty();" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button
                    ID="btnBack" runat="server" Text="返回" OnClick="btnBack_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
