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

132 lines
6.2 KiB
Plaintext
Raw Permalink 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><asp:Literal runat="server" Text="<%$ Resources:Lan,CompanyTrainingItemSave_PageTitle%>"/></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="<%$ Resources:Lan,ConstructSolution_ColumnID_ConstructSolutionCode_HeaderText%>" Required="true"
ShowRedStar="true" FocusOnPageLoad="true" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCompanyTrainingItemName" runat="server" Label="<%$ Resources:Lan,WeekMeeting_WeekMeetingName_HeaderText%>" 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="<%$ Resources:Lan,WeekMeetingView_drpCompileMan_Label%>" Readonly="true" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker runat="server" Label="<%$ Resources:Lan,LawRegulationListEdit_txtCompileDate_Label%>" ID="txtCompileDate">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtLearningTime" Label="<%$ Resources:Lan,CompanyTrainingItemSave_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="<%$ Resources:Lan,CompanyTrainingItemSave_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="<%$ Resources:Lan,ConstructSolution_WindowField_HeaderText%>" ToolTip="<%$ Resources:Lan,WeekMeetingView_btnAttachUrl2_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="<%$ Resources:Lan,CheckHolidayDetailEdit_btnSave_Icon%>" runat="server" ValidateForms="SimpleForm1"
OnClick="btnSave_Click" Hidden="true">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="<%$ Resources:Lan,ReadWriteCard_btnClose_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="<%$ Resources:Lan,LicenseManagerView_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>