20250704 委托单退回
This commit is contained in:
parent
2fe06c242f
commit
4b878c2c08
|
|
@ -144,5 +144,21 @@ namespace BLL
|
|||
return isShow;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据委托Id删除明细
|
||||
/// </summary>
|
||||
/// <param name="trustBatchId"></param>
|
||||
public static void DeleteTrustItemByTrustBatchId(string trustBatchId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var trustBatchItems = from x in db.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x;
|
||||
if (trustBatchItems != null)
|
||||
{
|
||||
db.HJGL_Batch_BatchTrustItem.DeleteAllOnSubmit(trustBatchItems);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using Aspose.Words.Lists;
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using NPOI.SS.Util;
|
||||
|
|
@ -202,6 +203,8 @@ namespace FineUIPro.Web.HJGL.NDT
|
|||
//设置生成下拉框的行和列
|
||||
SetCellDropdownList(sheet, 6, 6, new List<string>() { "合格", "不合格" }.ToArray());//是否合格
|
||||
SetCellDropdownList(sheet, 7, 7, new List<string>() { "Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ" }.ToArray());//评定级别
|
||||
var defects = from x in Funs.DB.Base_Defect select x.DefectName;//缺陷
|
||||
SetCellDropdownList(sheet, 8, 8, new List<string>() { string.Join(",", defects.ToList())}.ToArray());
|
||||
|
||||
//添加数据
|
||||
cell = row.CreateCell(7);
|
||||
|
|
|
|||
|
|
@ -1032,7 +1032,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
protected void btnBack_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string trustBatchId = string.Empty;
|
||||
//string trustBatchId = string.Empty;
|
||||
var lists = this.Grid1.SelectedRowIDArray;
|
||||
if (lists.Count() > 0)
|
||||
{
|
||||
|
|
@ -1047,8 +1047,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
var batchTrustItem = (from x in db.HJGL_Batch_BatchTrustItem where x.PointBatchItemId == pointBatchItemId select x).FirstOrDefault();
|
||||
if (batchTrustItem != null)
|
||||
{
|
||||
trustBatchId = batchTrustItem.TrustBatchId;
|
||||
BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchItemId(batchTrustItem.TrustBatchItemId);
|
||||
//trustBatchId = batchTrustItem.TrustBatchId;
|
||||
BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchId(batchTrustItem.TrustBatchId);
|
||||
BLL.Batch_BatchTrustService.DeleteBatchTrustById(batchTrustItem.TrustBatchId);
|
||||
//BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchItemId(batchTrustItem.TrustBatchItemId);
|
||||
}
|
||||
|
||||
//修改点口中的委托状态
|
||||
|
|
@ -1071,11 +1073,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
}
|
||||
}
|
||||
|
||||
var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId);
|
||||
if (trustItemList.Count == 0)
|
||||
{
|
||||
BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId);
|
||||
}
|
||||
//var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId);
|
||||
//if (trustItemList.Count == 0)
|
||||
//{
|
||||
// BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId);
|
||||
//}
|
||||
PageInfo();
|
||||
BindGrid();
|
||||
ShowNotify("退回成功!", MessageBoxIcon.Success);
|
||||
|
|
|
|||
Loading…
Reference in New Issue