Ejemplo n.º 1
0
        public bool UpdateBagLocation(int BagLocationId, int BagInventoryId, string LocationName, int StorageTypeId, int StorageId, int BagQuantity)
        {
            bool isSaved = true;

            try
            {
                using (WTCCeresEntities dbContext = new WTCCeresEntities())
                {
                    blt = dbContext.BagLocation.Find(BagLocationId);
                    blt.BagInventoryId = BagInventoryId;

                    blt.StorageId     = StorageId;
                    blt.LocationName  = LocationName;
                    blt.StorageTypeId = StorageTypeId;
                    blt.BagQuantity   = BagQuantity;

                    dbContext.BagLocation.AddOrUpdate(blt);
                    dbContext.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                isSaved = false;
            }

            return(isSaved);
        }
Ejemplo n.º 2
0
        public bool DeleteBagLocation(int BagLocationId)
        {
            bool isSaved = true;

            try
            {
                using (WTCCeresEntities db = new WTCCeresEntities())
                {
                    blt = db.BagLocation.Find(BagLocationId);
                    db.BagLocation.Remove(blt);
                    db.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                isSaved = false;
            }
            return(isSaved);
        }
Ejemplo n.º 3
0
 public void SetPreviousBag(BagLocation bagLocation)
 {
     this.previousLocation = bagLocation;
 }
Ejemplo n.º 4
0
 public void RemoveBag(BagLocation bagLocation)
 {
     currentBagNumber -= 1;
 }