<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncidentProcessingGiveUp.aspx.cs" Inherits="M_Main.IncidentNewJH.IncidentProcessingGiveUp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>废弃</title>
    <script type="text/javascript" src="../jscript/jquery-1.11.3.min.js"></script>
    <script src="../jscript/jquery.tool.new.js" type="text/javascript"></script>
    <script src="../jscript/Dialog.js" type="text/javascript"></script>
    <link href="../css/button.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="../Jscript-Ui/jquery-easyui-1.4.4/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../Jscript-Ui/jquery-easyui-1.4.4/themes/icon.css" />
    <script type="text/javascript" src="../Jscript-Ui/jquery-easyui-1.4.4/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../Jscript-Ui/jquery-easyui-1.4.4/locale/easyui-lang-zh_CN.js"></script>
    <script src="../jscript/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" src="../jscript/JSClient.js"></script>
    <script type="text/javascript" src="../jscript/Cache.js"></script>
    <script type="text/javascript" src="../Jscript-Ui/JQForm/JQForm.js"></script>
    <link href="../css/framesearch_old.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <form id="frmForm" runat="server">
        <input type="hidden" id="IncidentID" runat="server"/>
        <table class="DialogTable" style="line-height: 25px;">
            <tr>
                <td class="TdTitle">废弃时间</td>
                <td class="TdContent">
                    <input class="easyui-validatebox" id="DeleteDate" name="DeleteDate" disabled runat="server" />
                </td>
                <td class="TdTitle">操作人</td>
                <td class="TdContent">
                    <input class="easyui-validatebox" id="DeleteMan" name="DeleteMan"  disabled runat="server" />
                </td>
            </tr>
            <tr>
                <td class="TdTitle">废弃原因</td>
                <td class="TdContent" colspan="3">
                    <textarea id="DeleteReasons" rows="5" cols="20" runat="server" class="easyui-validatebox" data-options="required:true"></textarea>
                </td>

            </tr>
            <tr>
                <td style="text-align: center; padding-top: 10px;" colspan="4">
                    <input class="button" type="button" value="确认废弃" id="btnSave" runat="server" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input class="button" id="btnReturn" type="button" value="放弃返回" name="btnReturn" runat="server" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

<script type="text/javascript">

    $("#btnReturn").click(function () {
        HDialog.Close();
    });

    $("#btnSave").click(function () {

        var m = $("#DeleteReasons").val();
            if (m=="") {
            HDialog.Info("废弃原因不能为空！");
            $('#DeleteReasons').focus();
            return false;
        }

        //缓存用完之后清除
        var SelIncidentIDs = Cache.GetData("IncidentIDs");
        $("#IncidentID").val(SelIncidentIDs);


        $.tool.DataGet( 'IncidentProcessingNew', 'delete', "IncidentID=" + $("#IncidentID").val() + "&DeleteDate=" + $("#DeleteDate").val() +
            "&DeleteMan=" + $("#DeleteMan").val() + "&DeleteReasons=" + $("#DeleteReasons").val(),
        function Init() {
        },
        function callback(_Data) {
            if (_Data == "true") {
                HDialog.Info("废弃成功");
                Cache.SetData("IncidentIDs", "");
                HDialog.Close('true');
            }
            else {
                HDialog.Info("废弃失败");
            }
        },
        function completeCallback() {
        },
        function errorCallback() {

        });
    });
</script>
