SGGL_HBAZ/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx

132 lines
5.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyTrainingItemSave.aspx.cs"
Inherits="FineUIPro.Web.HSSE.EduTrain.CompanyTrainingItemSave" %>
<!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 href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtCompanyTrainingItemCode" runat="server" Label="编号" Required="true"
ShowRedStar="true" FocusOnPageLoad="true" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCompanyTrainingItemName" runat="server" Label="名称" Required="true"
ShowRedStar="true" MaxLength="50" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCompileMan" runat="server" Label="整理人" Readonly="true" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker runat="server" Label="整理时间" ID="txtCompileDate">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtLearningTime" Label="时长(分钟)" runat="server" DecimalPrecision="0" NoDecimal="true" NoNegative="true" ></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" ID="ddTestTraining" Label="考试题库" EnableMultiSelect="true" CustomData="true">
<PopPanel>
<f:Tree ID="treeTestTraining" ShowHeader="false" Hidden="true" runat="server" EnableCheckBox="true" CascadeCheck="true">
</f:Tree>
</PopPanel>
<Listeners>
<f:Listener Event="poppanelshow" Handler="onPopPanelShow" />
</Listeners>
</f:DropDownBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Label runat="server" ID="lbTemp">
</f:Label>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnUploadResources_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
OnClick="btnSave_Click" Hidden="true">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
</f:Button>
<f:HiddenField ID="hdCompileMan" runat="server">
</f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
<script>
var ddTestTraining = '<%= ddTestTraining.ClientID %>';
var treeTestTraining = '<%= treeTestTraining.ClientID %>';
function onPopPanelShow(event) {
var nodes = this.getValue();
F.noEvent(function () {
// 第二个参数true是否递归调用子节点
F(treeTestTraining).checkNodes(nodes, true);
// 启用树控件的级联选择时,确保把树控件的选中值全部同步到下拉框
syncToDropDownBox();
});
}
// 将树控件的选中值同步到下拉框
function syncToDropDownBox() {
var values = [], texts = [];
var checkedNodes = F(treeTestTraining).getCheckedNodes(true);
$.each(checkedNodes, function (index, node) {
debugger;
values.push(node.id);
texts.push(node.text);
});
F(ddTestTraining).setValue(values, texts);
}
F.ready(function () {
F(treeTestTraining).on('nodecheck', function (event, nodeId, checked) {
// 加个延迟,等待复选框的级联选择完成
window.setTimeout(function () {
syncToDropDownBox();
});
});
});
</script>
</html>