Kaynağa Gözat

学生归宿管理编辑功能

临城职教中职
zhangli 2 yıl önce
ebeveyn
işleme
bc400ae702
6 değiştirilmiş dosya ile 71 ekleme ve 4 silme
  1. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.cshtml
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.js
  4. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs
  6. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs

+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs Dosyayı Görüntüle

@@ -132,6 +132,22 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveData(string keyValue, string strEntity)
{
Acc_DormitoryReturnEntity entity = strEntity.ToObject<Acc_DormitoryReturnEntity>();
dormitoryReturnIBLL.SaveData(keyValue, entity);

return Success("保存成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string type, string strEntity)
{
Acc_DormitoryReturnEntity entity = strEntity.ToObject<Acc_DormitoryReturnEntity>();


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.cshtml Dosyayı Görüntüle

@@ -9,11 +9,11 @@
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">出宿时间</div>
<input id="OutTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#OutTime').trigger('change'); } })" />
<input id="OutTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#OutTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">归宿时间</div>
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
</div>
@*<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">检查日期</div>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.js Dosyayı Görüntüle

@@ -18,7 +18,7 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#DormitoryBuildId').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' order by name" },
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" },
text: 'name',
value: 'id',
allowSearch: true
@@ -48,7 +48,7 @@ var bootstrap = function ($, learun) {
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveForm?keyValue=' + keyValue, postData, function (res) {
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveData?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs Dosyayı Görüntüle

@@ -167,6 +167,24 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public void SaveData(string keyValue, Acc_DormitoryReturnEntity entity)
{
try
{
dormitoryReturnService.SaveData(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs Dosyayı Görüntüle

@@ -42,6 +42,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string type, Acc_DormitoryReturnEntity entity);
void SaveData(string keyValue, Acc_DormitoryReturnEntity entity);
#endregion

}


+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs Dosyayı Görüntüle

@@ -190,6 +190,38 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
public void SaveData(string keyValue, Acc_DormitoryReturnEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


Yükleniyor…
İptal
Kaydet