/// <summary> /// /// Delete ProduceOtherCompact by primary key. /// </summary> public void Delete(string produceOtherCompactId) { // // todo:add other logic here // try { BL.V.BeginTransaction(); IList <Model.ProduceOtherCompactDetail> list = ProduceOtherCompactDetailManager.Select(produceOtherCompactId); Model.MRSdetails model; foreach (var item in list) { model = MRSdetailsManager.Get(item.MRSdetailsId); if (model != null) { model.ArrangeDesc = string.Empty; MRSdetailsManager.Update(model); } } accessor.Delete(produceOtherCompactId); BL.V.CommitTransaction(); } catch { BL.V.RollbackTransaction(); throw; } }
public override void Delete(string invoiceId) { try { IList <Model.InvoiceCODetail> list = new BL.InvoiceCODetailManager().Select(invoiceId); Model.MRSdetails model; foreach (var item in list) { model = MRSdetailsManager.Get(item.MRSdetailId); if (model != null) { model.ArrangeDesc = string.Empty; MRSdetailsManager.Update(model); } } accessor.Delete(invoiceId); } catch { BL.V.RollbackTransaction(); throw; } }