删除
This commit is contained in:
parent
ee7ed4c726
commit
bc1725b614
@ -174,7 +174,15 @@ namespace DOAN.Service.MES.mm
|
||||
/// <returns></returns>
|
||||
public int DeleteTask(string task_code)
|
||||
{
|
||||
return Context.Deleteable<MmPreparationTask>().Where(it => it.TaskCode == task_code).ExecuteCommand();
|
||||
int result = 0;
|
||||
UseTran2(() =>
|
||||
{
|
||||
result+= Context.Deleteable<MmTaskMaterialInfo>().Where(it => it.FkTaskCode == task_code).ExecuteCommand();
|
||||
result+= Context.Deleteable<MmPreparationTask>().Where(it => it.TaskCode == task_code).ExecuteCommand();
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -182,6 +190,7 @@ namespace DOAN.Service.MES.mm
|
||||
{
|
||||
int result = 0;
|
||||
MmTaskMaterialInfo info = new MmTaskMaterialInfo();
|
||||
info.Id = XueHua;
|
||||
info.FkTaskCode = parm.FkTaskCode;
|
||||
info.MaterialCode = parm.MaterialCode;
|
||||
BaseMaterialList material = null;
|
||||
@ -205,7 +214,7 @@ namespace DOAN.Service.MES.mm
|
||||
|
||||
|
||||
result += x.AsInsertable.ExecuteCommand();
|
||||
result += x.AsUpdateable.IgnoreColumns(z => new { z.CreatedBy, z.CreatedTime, z.MaterialName, z.Specification, z.Unit }).ExecuteCommand();
|
||||
result += x.AsUpdateable.IgnoreColumns(z => new {z.Id, z.CreatedBy, z.CreatedTime, z.MaterialName, z.Specification, z.Unit }).ExecuteCommand();
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user