20250704 委托单退回
This commit is contained in:
@@ -144,5 +144,21 @@ namespace BLL
|
|||||||
return isShow;
|
return isShow;
|
||||||
}
|
}
|
||||||
#endregion
|
#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 MiniExcelLibs;
|
||||||
using Model;
|
using Model;
|
||||||
using NPOI.SS.Util;
|
using NPOI.SS.Util;
|
||||||
@@ -202,6 +203,8 @@ namespace FineUIPro.Web.HJGL.NDT
|
|||||||
//设置生成下拉框的行和列
|
//设置生成下拉框的行和列
|
||||||
SetCellDropdownList(sheet, 6, 6, new List<string>() { "合格", "不合格" }.ToArray());//是否合格
|
SetCellDropdownList(sheet, 6, 6, new List<string>() { "合格", "不合格" }.ToArray());//是否合格
|
||||||
SetCellDropdownList(sheet, 7, 7, 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);
|
cell = row.CreateCell(7);
|
||||||
|
|||||||
@@ -1032,7 +1032,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
protected void btnBack_Click(object sender, EventArgs e)
|
protected void btnBack_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
string trustBatchId = string.Empty;
|
//string trustBatchId = string.Empty;
|
||||||
var lists = this.Grid1.SelectedRowIDArray;
|
var lists = this.Grid1.SelectedRowIDArray;
|
||||||
if (lists.Count() > 0)
|
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();
|
var batchTrustItem = (from x in db.HJGL_Batch_BatchTrustItem where x.PointBatchItemId == pointBatchItemId select x).FirstOrDefault();
|
||||||
if (batchTrustItem != null)
|
if (batchTrustItem != null)
|
||||||
{
|
{
|
||||||
trustBatchId = batchTrustItem.TrustBatchId;
|
//trustBatchId = batchTrustItem.TrustBatchId;
|
||||||
BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchItemId(batchTrustItem.TrustBatchItemId);
|
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);
|
//var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId);
|
||||||
if (trustItemList.Count == 0)
|
//if (trustItemList.Count == 0)
|
||||||
{
|
//{
|
||||||
BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId);
|
// BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId);
|
||||||
}
|
//}
|
||||||
PageInfo();
|
PageInfo();
|
||||||
BindGrid();
|
BindGrid();
|
||||||
ShowNotify("退回成功!", MessageBoxIcon.Success);
|
ShowNotify("退回成功!", MessageBoxIcon.Success);
|
||||||
|
|||||||
Reference in New Issue
Block a user