Edit D:\AVA\AVAStandard\AVA.ResourcesPlatform.WebUI\Themes\ShiXun\Control\My\MyShiXunScoreItemList.ascx
??<%@ Control Language="C#" AutoEventWireup="true" Inherits="AVA.ResourcesPlatform.WebUI.Control.My.MySTScoreItemList" %> <%= new MyShiXunWorkNavInstance(this) { Local = MyShiXunWorkNavItem.???????? }.ToHtml()%> <div class="flat data-box" style="" id="divEdit"> <div class="head"> <span class="title"><%= Define.Get("Client_??????")%>????????</span> </div> <hr /> <div class="dataControl body"> <form id="frmSTScoreItemEdit" action="" method="post" onsubmit="return false;"> <table border="0" cellpadding="2px" cellspacing="2px" class="myTab"> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlSelect("ParentSTScoreType","Name", "Guid", "Guid") { Option = this._ListSTScoreType }.InsertOption("::" + DefineEnum.???.Define() + "::", null, 0)%> <% if (this._ListSTScoreType.Count == 0) { %> ????????????????? <% } %> <%= new HtmlYKTip("ParentSTScoreType") %> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>?????????</span></td> <td> <%= new HtmlText("Name", null, 256) { }.AddAttribute("Placeholder","?????????")%> <%= new HtmlYKTip("Name")%> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlText("ScoreRatio", null) { }%> <%= new HtmlYKTip("ScoreRatio")%> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????</span></td> <td> <%= new HtmlTextArea("Description", null, 2000)%> </td> </tr> <tr style="display: none"> <td style="text-align: right;"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlText("SortNumber", null, 4) { DefaultValue = 0 }%> <%= new HtmlYKTip("SortNumber") %> </td> </tr> <%-- <tr> <td style="text-align: right;"></td> <td></td> </tr>--%> <tr> <td style="text-align: right;"></td> <td> <%= new HtmlHidden("Key",this.KEY)%> <%= new HtmlHidden("ParentSubject", this.Subject.Guid)%> <%= new HtmlSubmit("????????", "STScoreItemEdit", "STScoreItemEditClient(this);").Style(new { Width = "100px" })%> <%--<input type="button" value="???" onclick="HideEdit();" style="width: 100px;" />--%> </td> </tr> </table> </form> <form id="frmSTScoreItemInport" action="" method="post" onsubmit="return false;"> <table border="0" cellpadding="2px" cellspacing="2px" class="myTab"> <tr> <td style="text-align: right;width:310px;"><span class="label"><span class="required">*</span>????????????</span></td> <td> <%= new SingleUploadInstance(this) { UploadTag = "FileName", Accept = ".xlsx", UploadControlName="????????????"}.ToHtml()%> <br /> ??????????????? <%= new HtmlAnchor("???????????.xlsx") { Href = "../../Resource/ExcelTemplate/???????????.xlsx", Class = "down" }.Style(new { Color="#10931f"})%> <%= new HtmlHidden("FileName", null) { Class = "ipt-t ipt-t-dft " }%> <%= new HtmlYKTip("FileName")%> <%-- <%= new SingleUploadInstance(this) { UploadTag = "FileName", InitParams = "FileFilter=?????????Excel??????(*.xls)|*.xls,DefaultColor=#F5F5F5F5,SelectFiles=?????????????????????,Upload=??????????????" }.ToHtml()%> --%> <script type="text/javascript"> function UploadFinishedFileName(fileName, fileSize) { $("#frmSTScoreItemInport [Name=FileName]").val(fileName); STScoreItemInportClient(); } </script> </td> </tr> <tr> <td style="text-align: right;"></td> <td> <%= new HtmlHidden("Key", SetKey(this.ViewData["_Application.Guid"], this.ViewData["_Application.Version"]))%> <%= new HtmlHidden("ParentUser", this.User.Guid)%> <%= new HtmlHidden("ParentSubject", this.Subject.Guid)%> <%--<%= new HtmlSubmit("???", "STScoreItemInport", "STScoreItemInportClient(this);").Style(new { Width = "100px" })%>--%> </td> </tr> </table> </form> </div> </div> <iframe id="frmDownload" src="" style="display: none"></iframe> <script type="text/javascript"> //?????? $.validator.initConfig({ validatorGroup: "STScoreItemEdit", form: "#frmSTScoreItemEdit", alertMessage: true, showMessage: false }); //?????????? $("#frmSTScoreItemEdit [name=ParentSTScoreType]").formValidator({ validatorGroup: "STScoreItemEdit", rules: { required: null }, message: { required: "???????????" } }); //????? $("#frmSTScoreItemEdit [name=Name]").formValidator({ validatorGroup: "STScoreItemEdit", rules: { required: null }, message: { required: "?????????" } }); //?????? $("#frmSTScoreItemEdit [name=ScoreRatio]").formValidator({ validatorGroup: "STScoreItemEdit", rules: { required: null, regex: "decmal1" }, message: { required: "????????????", regex: "????????????" } }); //?????? $.validator.initConfig({ validatorGroup: "STScoreItemInport", form: "#frmSTScoreItemInport", alertMessage: true, showMessage: false }); //?????? $("#frmSTScoreItemInport [name=FileName]").formValidator({ validatorGroup: "STScoreItemInport", rules: { required: null }, message: { required: "?????????????????" } }); </script> <script type="text/javascript"> function STScoreItemEditClient(send) { $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.STScoreItemEdit", data: Global.GetFormValue($("#frmSTScoreItemEdit")), async: true, dataType: 'json', success: function (result) { $(send).val("????????"); alert("<%= Define.Get("Client_??????") %>???????????"); Global.Disabled(send, false); window.location.href = window.location.href; }, beforeSend: function () { $(send).val("?????..."); Global.Disabled(send, true); }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { $(send).val("????????"); Global.Disabled(send, false); var message = XMLHttpRequest.responseText; Global.Error(message); } }); } function STScoreItemInportClient(send) { $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.STScoreItemInportClient", data: Global.GetFormValue($("#frmSTScoreItemInport")), async: true, dataType: 'json', success: function (result) { $(send).val('?????????'); flash("???????????" + result.Count + "?????????????????????????????????"); document.getElementById("frmDownload").src = result.DataUrl; Global.Disabled(send, false); window.location.href = window.location.href; }, beforeSend: function () { $(send).val('?????...'); Global.Disabled(send, true); }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { $(send).val('?????????'); Global.Disabled(send, false); var message = XMLHttpRequest.responseText; Global.Error(message); } }); } </script> <div class="flat data-box"> <div class="head"> <span class="title"><%= Define.Get("Client_??????")%>?????<%= this.Subject._ListSTScoreItem.Count %>?????? </span> <span class="f_r"><input type="button" value="?????????" onclick="ExprotExcelXML(this);" class="btn pull-right" style="margin-left:10px;" /></span> <form id="frmExprotExcelXML" method="post" action="<%= WebUrl.Exprot() %>"> <%= new HtmlHidden("ExprotExcelXMLParameter", this.Subject.Guid)%> <%= new HtmlHidden("ExprotKey","STScoreItem") %> </form> </div> <div class="dataControl "> <form> <%--<%= new HtmlButton("???...", "","ShowEdit(this);")%>--%> <%= new HtmlButton("???", "STScoreItemBatchDelete(this);"){ Class="btn btn-danger pull-right" }%> </form> </div> <% var allScore = this.ListSTScoreItem.Sum(l => l.ScoreRatio); if (allScore != 100) { %> <div class="alert"> ????????????100??????<%= allScore %> </div> <% } %> <div id="MySTScoreItemData" class="data"> <table cellspacing="0" cellpadding="0" width="100%"> <tbody> <tr id="dataHead" class="dataHead"> <td valign="middle" class="sel" style="width: 20px;"> <input type="checkbox" class="trselall" /> </td> <td valign="middle" class="disabled">?????? </td> <td valign="middle">????? </td> <td valign="middle" class="disabled">?????? </td> <td valign="middle" class="disabled" style="width: 100px;">??? </td> </tr> <!--??? ????? ????? ?? ??????? ????? ????????? ????????? class="firstLine lastLine"--> <% for (int i = 0; i <= this.ListSTScoreItem.Count - 1; i++) { var stAward = this.ListSTScoreItem[i]; %> <tr class='<%= i == 0 ? "firstLine" : "" %> <%= i == this.ListSTScoreItem.Count - 1 ? "lastLine" : "" %>'> <td class="sel" valign="middle"> <%= new HtmlCheckBox() { Value = SetKey(stAward.Guid, stAward.Version), Class = "trsel", Title = DefineEnum.???_????.Define() }%> </td> <td> <%= stAward.ParentSTScoreType.Name %> </td> <td> <%= stAward.Name %> </td> <td> <%= stAward.ScoreRatio %> </td> <td class="action"> <%= new HtmlAnchor("???") { Href = WebUrl.MySTScoreItemEdit(stAward.Guid) }%> | <a href="#delete" onclick="STScoreItemDelete(this,'<%= SetKey(stAward.Guid, stAward.Version) %>'); return false;">???</a> </td> </tr> <% } %> </tbody> </table> </div> <script type="text/javascript"> //????????? function ExprotExcelXML() { if (confirm("?????????????????") == false) { return false; } document.getElementById('frmExprotExcelXML').submit(); } $("#MySTScoreItemData .trselall").click(function () { if (this.checked == true) { $("#MySTScoreItemData .trsel").attr("checked", "checked"); } else { $("#MySTScoreItemData .trsel").removeAttr("checked"); } }) function SelectMySTScoreItemAll() { var bool = $("#MySTScoreItemData .trselall").attr("checked"); bool = !bool; if (bool == true) { $("#MySTScoreItemData .trsel").attr("checked", "checked"); $("#MySTScoreItemData .trselall").attr("checked", "checked"); } else { $("#MySTScoreItemData .trsel").removeAttr("checked"); $("#MySTScoreItemData .trselall").removeAttr("checked"); } } </script> <script type="text/javascript"> //?????? function STScoreItemBatchDelete(send) { var items = $("#MySTScoreItemData .trsel:checked"); var key = ""; for (var i = 0; i <= items.length - 1; i++) { key += "pkid=" + encodeURIComponent(items[i].value); if (i != items.length - 1) { key += "&"; } } if (key != "") { if (confirm("???????????<%= Define.Get("Client_??????") %>???????????") == true) { $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.STScoreItemBatchDelete", data: key, async: true, dataType: 'json', success: function (result) { $(send).val("???"); flash("<%= Define.Get("Client_??????") %>???????????"); Global.Disabled(send, false); window.location.href = window.location.href; }, beforeSend: function () { $(send).val("??????..."); Global.Disabled(send, true); }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { $(send).val("???"); Global.Disabled(send, false); var message = XMLHttpRequest.responseText; Global.Error(message); } }); } } else { flash("???????????<%= Define.Get("Client_??????") %>?????????"); } }; //??? function STScoreItemDelete(send, pkid) { if (confirm("?????????<%= Define.Get("Client_??????") %>???????????") == true) { $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.STScoreItemDelete", data: "key=" + pkid, async: true, dataType: 'json', success: function (result) { $(send).html("???"); flash("<%= Define.Get("Client_??????") %>???????????"); window.location.href = window.location.href; }, beforeSend: function () { $(send).html("?????"); Global.Disabled(send, true); }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { $(send).html("???"); Global.Disabled(send, false); var message = XMLHttpRequest.responseText; Global.Error(message); } }); } }; </script> <div> <a onclick="SelectMySTScoreItemAll(); return false;" href="#">???? - ???</a> </div> </div> <script type="text/javascript"> function ShowEdit(send) { $("#divEdit").show(500); } function HideEdit(send) { $("#divEdit").hide(500); } </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de