瀏覽代碼

选修课课程删除 未完成

新疆影视学院高职
zhangli 2 年之前
父節點
當前提交
0ad4f50afb
共有 7 個文件被更改,包括 96 次插入4 次删除
  1. +11
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs
  2. +17
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/LoginStatistics/Index.js
  4. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs
  6. +41
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs
  7. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LoginStatistics/LoginStatisticsService.cs

+ 11
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs 查看文件

@@ -242,7 +242,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}
/// <summary>
/// 获取当前学年学期
/// <summary>
@@ -275,6 +275,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
openLessonPlanOfElectiveIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult DeleteElective(string keyValue)
{
openLessonPlanOfElectiveIBLL.DeleteElective(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
@@ -450,7 +459,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <summary>
/// <returns></returns>
[HttpPost]
public ActionResult SaveStuNumMax(string keyValue,int StuNumMax)
public ActionResult SaveStuNumMax(string keyValue, int StuNumMax)
{
openLessonPlanOfElectiveIBLL.SaveStuNumMax(keyValue, StuNumMax);



+ 17
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js 查看文件

@@ -253,8 +253,23 @@ var bootstrap = function ($, learun) {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var rowdata = $('#gridtable').jfGridGet('rowdata');
console.log(rowdata);

try {
rowdata.forEach(function (item, index, row) {
if (!!item.StuNumMax || !!item.StuNumOfApply || !!item.StuNum) {
throw learun.alert.warning("人数上限、已报人数、通过人数大于0的不能删除!");
}
if (!!item.ElectiveMajorList && item.ElectiveMajorList.length > 0) {
throw learun.alert.warning("已选专业的数据不允许删除!");
}
});
console.log(keyValue);
return;
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/DeleteElective', { keyValue: keyValue },
function () {
refreshGirdData();
});
} catch (e) {
}
}
});
},


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/LoginStatistics/Index.js 查看文件

@@ -160,6 +160,7 @@ var bootstrap = function ($, learun) {
} else {
param.Month = date.getMonth() + 1;
}
//param.SqlParameter = " and ((classno is null or len(classno)=0) and (departmentid is not null or len(departmentid)>0)) ";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs 查看文件

@@ -186,6 +186,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void DeleteElective(string keyValue)
{
try
{
openLessonPlanOfElectiveService.DeleteElective(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs 查看文件

@@ -63,6 +63,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
void DeleteEntity(string keyValue);
void DeleteElective(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>


+ 41
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs 查看文件

@@ -401,6 +401,47 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 删除选修课课程
/// </summary>
/// <param name="keyValue"></param>
public void DeleteElective(string keyValue)
{
try
{
/*
* ElectiveMajor
[dbo].[OpenLessonPlanOfElective]
[dbo].[OpenLessonPlanOfElectiveChange]
[dbo].[OpenLessonPlanOfElectiveDel]
[dbo].[ArrangeLessonTermOfElective] 课号 老师 上课时间 节次 上课教室 学年学期
*/
if (keyValue.Contains(","))
{
keyValue = string.Join("','", keyValue.Split(','));
}

var list = this.BaseRepository("CollegeMIS").FindList<OpenLessonPlanOfElectiveEntity>($"select * from OpenLessonPlanOfElective where Id in ('{keyValue}')");
foreach (var entity in list)
{

}


}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LoginStatistics/LoginStatisticsService.cs 查看文件

@@ -47,6 +47,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
strSql.Append($" AND departmentid='{queryParam["Departmentid"].ToString()}'");
}

if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}

return this.BaseRepository().FindList<LoginStatisticsEntity>(strSql.ToString(), dp, paginationobj);
}
catch (Exception ex)


Loading…
取消
儲存