@@ -53,7 +53,8 @@ namespace Learun.Application.Organization | |||||
t.F_Photo, | t.F_Photo, | ||||
t.F_BriefIntroduction, | t.F_BriefIntroduction, | ||||
t.F_EnrollmentInformation, | t.F_EnrollmentInformation, | ||||
t.F_ModifyUserName | |||||
t.F_ModifyUserName, | |||||
T.F_USCreditCode | |||||
"; | "; | ||||
} | } | ||||
#endregion | #endregion | ||||
@@ -129,8 +129,8 @@ var bootstrap = function ($, learun) { | |||||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | { label: '科目', name: 'LessonName', width: 300, align: "left" }, | ||||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | { label: '学分', name: 'StudyScore', width: 50, align: "left" }, | ||||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | { label: '成绩', name: 'Score', width: 100, align: "left" }, | ||||
{ label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||||
{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||||
{ label: '补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||||
//{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||||
{ label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | { label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | ||||
{ label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, | { label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, | ||||
], | ], | ||||
@@ -130,6 +130,11 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
list = list.Where(m => m.F_CompanyId != keyValue).ToList(); | list = list.Where(m => m.F_CompanyId != keyValue).ToList(); | ||||
} | } | ||||
if (keyValue == entity.F_ParentId) | |||||
{ | |||||
return Fail("操作失败,当前项不允许"); | |||||
} | |||||
if (list.Any(a => a.F_FullName == entity.F_FullName)) | if (list.Any(a => a.F_FullName == entity.F_FullName)) | ||||
{ | { | ||||
return Fail("学校名称重复"); | return Fail("学校名称重复"); | ||||
@@ -156,8 +161,16 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult DeleteForm(string keyValue) | public ActionResult DeleteForm(string keyValue) | ||||
{ | { | ||||
companyIBLL.VirtualDelete(keyValue); | |||||
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, ""); | |||||
var list = companyIBLL.GetList().Where(x => x.F_ParentId == keyValue && x.F_EnabledMark == 1 && x.F_DeleteMark == 0); | |||||
if (list.Count() > 0) | |||||
{ | |||||
return Fail("删除失败!拥有下辖项不可直接删除"); | |||||
} | |||||
else | |||||
{ | |||||
companyIBLL.VirtualDelete(keyValue); | |||||
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, ""); | |||||
} | |||||
} | } | ||||
#endregion | #endregion | ||||
} | } |
@@ -1,5 +1,6 @@ | |||||
using Learun.Application.Organization; | using Learun.Application.Organization; | ||||
using Learun.Util; | using Learun.Util; | ||||
using System.Collections.Generic; | |||||
using System.Linq; | using System.Linq; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
@@ -17,6 +18,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | ||||
private CompanyIBLL companyIBLL = new CompanyBLL(); | private CompanyIBLL companyIBLL = new CompanyBLL(); | ||||
private static DepartmentIBLL departmentIBLL_static = new DepartmentBLL(); | |||||
private static Dictionary<string, DepartmentModel> mapData = departmentIBLL_static.GetModelMap(); | |||||
#region 获取视图 | #region 获取视图 | ||||
/// <summary> | /// <summary> | ||||
/// 主页 | /// 主页 | ||||
@@ -150,6 +153,10 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
return Fail("部门编号已存在!"); | return Fail("部门编号已存在!"); | ||||
} | } | ||||
} | } | ||||
if (keyValue == entity.F_ParentId) | |||||
{ | |||||
return Fail("操作失败,当前项不允许"); | |||||
} | |||||
//发送标识false | //发送标识false | ||||
entity.SendFlag = false; | entity.SendFlag = false; | ||||
departmentIBLL.SaveEntity(keyValue, entity); | departmentIBLL.SaveEntity(keyValue, entity); | ||||
@@ -164,8 +171,16 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult DeleteForm(string keyValue) | public ActionResult DeleteForm(string keyValue) | ||||
{ | { | ||||
departmentIBLL.VirtualDelete(keyValue); | |||||
return Success("删除成功!"); | |||||
var list = departmentIBLL.GetAllList().Where(x => x.F_ParentId == keyValue); | |||||
if (list.Count() > 0) | |||||
{ | |||||
return Fail("删除失败!拥有下辖项不可直接删除"); | |||||
} | |||||
else | |||||
{ | |||||
departmentIBLL.VirtualDelete(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
} | } | ||||
#endregion | #endregion | ||||
} | } |
@@ -36,7 +36,7 @@ | |||||
<div class="lr-form-item-title">电子邮箱</div> | <div class="lr-form-item-title">电子邮箱</div> | ||||
<input id="F_Email" type="text" class="form-control" isvalid="yes" checkexpession="EmailOrNull" /> | <input id="F_Email" type="text" class="form-control" isvalid="yes" checkexpession="EmailOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">照片</div> | <div class="lr-form-item-title">照片</div> | ||||
<div id="F_Photo"></div> | <div id="F_Photo"></div> | ||||
</div> | </div> | ||||