/// <summary> /// Sort BoxPackage Table Information by Box number /// </summary> /// <param name="BoxNumber"> /// string Box Number /// </param> /// <returns> /// box Package table Object with information /// </returns> public cstBoxPackage GetBoxPackageByBoxNumber(String BoxNumber) { cmdBox _box = new cmdBox(); return(_box.GetSelectedByBoxNumber(BoxNumber)); }
/// <summary> /// Selected Box ID information From BoxPackage Table /// </summary> /// <param name="BoxID">Guid Box ID</param> /// <returns>cstBoxPackage Object</returns> public cstBoxPackage GetBoxPackageByBoxID(Guid BoxID) { cmdBox _box = new cmdBox(); return(_box.GetSelectedByBoxID(BoxID)); }
/// <summary> /// Selected Packing Id information From Box Package table /// </summary> /// <param name="PackingID">Guid Packing ID</param> /// <returns>List<cstBoxPackage></returns> public List <cstBoxPackage> GetBoxPackageByPackingID(Guid PackingID) { cmdBox _box = new cmdBox(); return(_box.GetSelectedByPackingID(PackingID)); }
/// <summary> /// get all table of Box Package. /// </summary> /// <returns>List<cstBoxPackage> </returns> public List <cstBoxPackage> GetBoxPackageAll() { cmdBox _box = new cmdBox(); return(_box.GetAll()); }
/// <summary> /// Save Box information to database. adds Box to the table /// </summary> /// <param name="lsboxPackageInfo">List of infrmation of box</param> /// <returns>Boolean Value if saved then True else false</returns> public Guid SetBox(List <cstBoxPackage> lsboxPackageInfo) { cmdBox _box = new cmdBox(); return(_box.SaveBoxPackage(lsboxPackageInfo)); }
/// <summary> /// Shipment number serch for information of packing status /// </summary> /// <param name="ShippingNumber">String Shipping Number</param> /// <returns>List<cstShipmentNumStatus> depending on location retuersn shipping number information</returns> public List <cstShipmentNumStatus> GetStaus(String ShippingNumber) { List <cstShipmentNumStatus> _lsStatus = new List <cstShipmentNumStatus>(); try { var frmPackage = from pac in ent.Packages where pac.ShippingNum == ShippingNumber select pac; foreach (var item in frmPackage) { cstShipmentNumStatus Statusnumber = new cstShipmentNumStatus(); String PackingStatus = "UnderPacking"; int PackingStatusInt = 4; if (item.PackingStatus == 0) { PackingStatus = "Packed"; PackingStatusInt = 5; } try { cmdBox _box = new cmdBox(); cmdTracking tracking = new cmdTracking(); string trackingNO = ""; List <cstBoxPackage> lsBoxpackage = _box.GetSelectedByPackingID(item.PackingId); foreach (cstBoxPackage Boxitem in lsBoxpackage) { if (tracking.IschecckTrackingNumberPresent(Boxitem.BOXNUM) == "") { trackingNO = ""; break; } else { trackingNO = tracking.IschecckTrackingNumberPresent(Boxitem.BOXNUM); } } if (trackingNO != "" && trackingNO != null) { PackingStatus = "Traking"; PackingStatusInt = 6; } } catch (Exception) { } Statusnumber.PackageID = item.PackingId; Statusnumber.ShippingNum = item.ShippingNum; Statusnumber.ShippinStatus = PackingStatus; Statusnumber.ShippingCompletedInt = PackingStatusInt; Statusnumber.Location = item.ShipmentLocation; int indexofls = _lsStatus.FindLastIndex(i => i.ShippingNum == ShippingNumber && i.Location == item.ShipmentLocation); if (indexofls.ToString() != "-1") { if (_lsStatus[indexofls].ShippingCompletedInt <= PackingStatusInt) { _lsStatus[indexofls].ShippinStatus = PackingStatus; _lsStatus[indexofls].ShippingCompletedInt = PackingStatusInt; } } else { _lsStatus.Add(Statusnumber); } } } catch (Exception) { } return(_lsStatus); }