/// <summary> /// Set all information in constructor. /// </summary> private void SetShipmentInformatio() { cmdShipment _cmdSageShipment = new cmdShipment(); cmdPackage _cmdPackingList = new cmdPackage(); //Sage Shipment Information ShipmentDetailSage = _cmdSageShipment.GetShipmentInfoFromSage(ShipmentNumber, true); //Shipment Valid or not if (ShipmentDetailSage.Count > 0 || ShipmentDetailSage != null) { IsShipmentLocationValidInSage = true; #region Check Multilocation. IsMultiLocation = false; var GroupLocation = from sage in ShipmentDetailSage group sage by sage.Location into Gsage select Gsage; if (GroupLocation.Count() > 1) { IsMultiLocation = true; } #endregion } else { IsShipmentLocationValidInSage = false; } //Set packing Detail if Packed PackingInfo = _cmdPackingList.ExecuteNoLocation(ShipmentNumber); if (PackingInfo == null || PackingInfo.Count <= 0) { IsAlreadyPacked = false; } else if (PackingInfo.Count > 0) { IsAlreadyPacked = true; //new location List List <string> lsLocations = new List <string>(); //Find Diffrent location and add to paked locations. var _packedLocations = from _packed in PackingInfo group _packed by _packed.ShipmentLocation into Gpacked select Gpacked; foreach (var _Packeditem in _packedLocations) { lsLocations.Add(_Packeditem.Key.ToString()); } //Packed Locations PackedLocations = lsLocations; //If packed then User Information set; SetCanOverrides(); } //Validated Check IsShipmentValidated = _cmdSageShipment.IsShipmentValidated(ShipmentNumber); }
/// <summary> /// Delte shipment Information from packingDetails table and Packing table /// </summary> /// <param name="ShipmentID">String ShipmentID</param> /// <returns>If sucess then true else false</returns> public Boolean DeleteShipmentAll(Guid PackingID) { cmdShipment command = new cmdShipment(); return(command.DeleteShipment(PackingID)); }
/// <summary> /// Get shipment number information without location filter /// </summary> /// <param name="ShippingNumber">Shipment number</param> /// <param name="NullLocation"> Booean must be always true</param> /// <returns></returns> public List <cstShipment> GetShipment_SPCKD(string ShippingNumber, Boolean NullLocation) { cmdShipment command = new cmdShipment(); return(command.GetShipmentInfoFromSage(ShippingNumber)); }