1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //刷新
- function reload() {
- RetakeOpenTime();
- $("#dgRetakePlanStudentApplyList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanStudentApplyList"));
- }
- //刷新
- function RetakePlanStudentApply_Refresh() {
- RetakeOpenTime();
- $("#dgRetakePlanStudentApplyList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanStudentApplyList"));
- }
- //重修报名时间
- function RetakeOpenTime() {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + "/RetakePlanStudentApply/RetakeOpenControl", $.getDataGridParams("dgRetakePlanStudentApplyList"), function (data) {
- if (data.IsSuccess) {
- $("#labText").text(data.Message);
- }
- });
- }
- //操作(可报名及取消)
- function Click(index, row) {
- $(event.srcElement).attr("disabled", "disabled");
- if (row.ApplyStatus) {
- //取消报名
- CancelApply(row.RetakePlanStudentID, row.CourseName, $(event.srcElement));
- } else {
- //报名
- Apply(row.RetakePlanStudentID, row.CourseName, $(event.srcElement));
- }
- }
- //报名
- function Apply(RetakePlanStudentID, CourseName, control) {
- $.messager.defaults = { ok: "立即报名", cancel: "放弃" };
- $.messager.confirm("系统提示", "是否要对此报名信息(" + CourseName + ")进行报名" + "?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanStudentApply/Apply', { RetakePlanStudentID: RetakePlanStudentID }, function (data) {
- if (data.IsSuccess) {
- //setTimeout("location.reload(true)", 2000);
- }
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- $.messager.alert("系统提示", data.Message);
- control.removeAttr("disabled");
- //刷新
- RetakePlanStudentApply_Refresh();
- });
- } else {
- control.removeAttr("disabled");
- //刷新
- RetakePlanStudentApply_Refresh();
- }
- });
- }
- //取消报名
- function CancelApply(RetakePlanStudentID, CourseName, control) {
- $.messager.defaults = { ok: "取消报名", cancel: "放弃" };
- $.messager.confirm("系统提示", "是否要对此报名信息(" + CourseName + ")取消报名" + "?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanStudentApply/CancelApply', { RetakePlanStudentID: RetakePlanStudentID }, function (data) {
- if (data.IsSuccess) {
- //setTimeout("location.reload(true)", 2000);
- }
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- $.messager.alert("系统提示", data.Message);
- control.removeAttr("disabled");
- //刷新
- RetakePlanStudentApply_Refresh();
- });
- } else {
- control.removeAttr("disabled");
- //刷新
- RetakePlanStudentApply_Refresh();
- }
- });
- }
- //列颜色设置为红色
- function SetRedtColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
|