/// <summary> /// Roll Back Transaction Operations that delete the entry from the table Paking. /// For shipment ID /// </summary> /// <param name="ShipmentID">Roll back entry from Shipment</param> /// <returns>Boolean if Transacetion Seccess else False</returns> public Boolean RollBack(String ShipmentID) { Boolean _return = false; try { Package _Packing = entx3v6.Packages.SingleOrDefault(i => i.ShippingNum == ShipmentID); entx3v6.DeleteObject(_Packing); entx3v6.SaveChanges(); _return = true; } catch (Exception Ex) { Error_Loger.elAction.save("RollBackPakingMaster.Execute()", Ex.Message.ToString()); } return(_return); }
public Boolean DeleteCartonByShippingNumber(String ShippingNumber) { Boolean _return = false; try { var lscartonInfo = (from ls in entx3v6.CartonInfoes where ls.ShipmentNumber == ShippingNumber select ls).ToList(); foreach (var item in lscartonInfo) { CartonInfo crton = (CartonInfo)item; entx3v6.DeleteObject(crton); } entx3v6.SaveChanges(); } catch (Exception) { } return(_return); }