|
|
|
@ -1066,7 +1066,7 @@ namespace WeighAndGrading |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//删除选中
|
|
|
|
private void btnDeleteSelected_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
if (MessageBox.Show("确定删除选中一条称重记录?", "删除选中", MessageBoxButtons.OKCancel) == DialogResult.Cancel) |
|
|
|
@ -1083,8 +1083,38 @@ namespace WeighAndGrading |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
//删除选中
|
|
|
|
LocalGradeAndWeightBL.DeleteBySID(lastCheckItem.SID); |
|
|
|
//删除选中 更新 IsDeleted 和 Sync
|
|
|
|
lastCheckItem.IsDeleted = true; |
|
|
|
LocalGradeAndWeightBL.Update(lastCheckItem, "IsDeleted"); |
|
|
|
|
|
|
|
//修改本地
|
|
|
|
if (lastCheckItem.OrderDetail_ID.HasValue) |
|
|
|
{ |
|
|
|
VerifyConnection(); |
|
|
|
if (!connection) |
|
|
|
{ |
|
|
|
//"烫褪" : "毛剥"
|
|
|
|
if (lastCheckItem.Technics_Name == "烫褪") |
|
|
|
{ |
|
|
|
localTang = XmlUtil.DeserializeFromFile<List<long>>(tangFilePath); |
|
|
|
if (localTang.Contains(lastCheckItem.OrderDetail_ID.Value)) |
|
|
|
{ |
|
|
|
localTang.Remove(lastCheckItem.OrderDetail_ID.Value); |
|
|
|
SaveEntityToLocal(true); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (lastCheckItem.Technics_Name == "毛剥") |
|
|
|
{ |
|
|
|
localMao = XmlUtil.DeserializeFromFile<List<long>>(maoFilePath); |
|
|
|
if (localMao.Contains(lastCheckItem.OrderDetail_ID.Value)) |
|
|
|
{ |
|
|
|
localMao.Remove(lastCheckItem.OrderDetail_ID.Value); |
|
|
|
SaveEntityToLocal(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
details.Remove(lastCheckItem); |
|
|
|
|
|
|
|
|
|
|
|
|