Beispiel #1
0
        /// <summary>
        /// Get Storage
        /// </summary>
        /// <returns></returns>
        public LocationStorageModel GetStorage()
        {
            List <Proc_LoadGetLocationStorage_Result> LoadGetStorage;
            List <tbl_Storage>   Storages;
            LocationStorageModel locStorageModel;

            try
            {
                LoadGetStorage  = Context.GetAllStorage().ToList();
                Storages        = Context.Storage.Get().ToList();
                locStorageModel = new LocationStorageModel();
                locStorageModel.StorageLocation = LoadGetStorage;
                locStorageModel.Storages        = Storages;
                return(locStorageModel);
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                LoadGetStorage  = null;
                Storages        = null;
                locStorageModel = null;
            }
        }
Beispiel #2
0
        // GET: Storage
        public ActionResult Index()
        {
            LocationStorageModel LocationStorage = new LocationStorageModel();

            LocationStorage = StorageBL.GetStorage();
            return(View(LocationStorage));
        }
Beispiel #3
0
        public PartialViewResult GetStorageById(string LocationID)
        {
            LocationStorageModel LocationStorage = new LocationStorageModel();

            LocationStorage = StorageBL.GetStorageById(LocationID);

            return(PartialView("~/Views/Storage/Partial/_StorageDetailsPartial.cshtml", LocationStorage));
        }
Beispiel #4
0
        //public PartialViewResult GetStorageByID(string locationID)
        //{
        //   List<tbl_Storage> storageGetById = StorageBL.GetByID(locationID);
        //    return PartialView("~/Views/Storage/Partial/_StorageDetailsPartial.cshtml", storageGetById);
        //}

        public string InsertOrUpdateStorage(LocationStorageModel LSM)
        {
            tbl_Storage storage = new tbl_Storage();

            storage.LocationID = LSM.LocationID;
            storage.StorageID  = LSM.StorageID;
            return(StorageBL.InsertOrUpdate(storage));
        }
Beispiel #5
0
        public PartialViewResult GetStorageId(string locationID)
        {
            List <tbl_Storage> locationId = StorageBL.GetByID(locationID.Trim()).ToList();
            bool IsExsit = false;

            if (locationId == null || locationId.Count == 0)
            {
                locationId = new List <tbl_Storage>();
                IsExsit    = true;
            }
            LocationStorageModel LSM = new LocationStorageModel();

            if (!IsExsit)
            {
                LSM.LocationID   = locationId[0].ToString();
                LSM.LocationDesc = locationId[1].ToString();
                LSM.StorageID    = locationId[2].ToString();
            }
            return(PartialView("~/Views/Storage/Partial/_StorageDetailsPartial.cshtml", LSM));
        }
Beispiel #6
0
        public LocationStorageModel GetStorageById(string LocationID)
        {
            List <Proc_LoadStorageGetById_Result> LoadGetStorage;
            List <tbl_Storage>   Storages;
            LocationStorageModel locStorageModel;

            try
            {
                locStorageModel = new LocationStorageModel();

                LoadGetStorage = Context.GetStorageById(LocationID).ToList();
                Storages       = this.GetByID(LocationID);

                locStorageModel.Storages = Storages;

                if (LoadGetStorage != null)
                {
                    locStorageModel.LocationID   = LoadGetStorage.FirstOrDefault().LocationID;
                    locStorageModel.LocationDesc = LoadGetStorage.FirstOrDefault().LocationDesc;
                }
                else
                {
                    locStorageModel.LocationID   = null;
                    locStorageModel.LocationDesc = null;
                }
                return(locStorageModel);
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                //LoadGetStorage = null;
                //Storages = null;
                //locStorageModel = null;
            }
        }