public ResultModel Update(StoreFloorModel obj) { ResultModel oOutput = new ResultModel(); try { StoreFloor oStoreFloor = dbSet.Where(m => m.ID == obj.ID).FirstOrDefault(); if (oStoreFloor == null) { oOutput.Status = 0; oOutput.Msg = "Record not exist"; } else { // Removing Already Added Mapper.Map(obj, oStoreFloor); oDB.SaveChanges(); oOutput.Data = Mapper.Map <StoreFloor>(oStoreFloor); } } catch (Exception ex) { oOutput.Status = 0; oOutput.Msg = "Data access error"; Services.Utitilty.Error(ex); } return(oOutput); }
public virtual void StartState() { if (!StoreFloor.GetInstance().transform) { Debug.LogError("Floor doesn't exist!", stateMachine.gameObject); } // Get all players allPlayers = stateMachine.gameManager.GetPlayers(); // Reset values isFirstWaypoint = true; }
private void Awake() { if (_storeFloor) { Debug.LogWarning("There are multiple store floors. Why?"); // There is suppose to be only one store floor instances DestroyImmediate(gameObject); } else { _storeFloor = this; } }
public ResultModel Insert(StoreFloorModel obj) { ResultModel oOutput = new ResultModel(); try { StoreFloor oStoreFloor = Mapper.Map <StoreFloor>(obj); dbSet.Add(oStoreFloor); oDB.SaveChanges(); oOutput.Data = Mapper.Map <StoreFloorModel>(oStoreFloor); } catch (Exception ex) { oOutput.Status = 0; oOutput.Msg = "Data access error"; Services.Utitilty.Error(ex); } return(oOutput); }
private Vector3 GetRandomPositionInStoreFloor() { return(EssentialFunctions.GetRandomPositionInTransform(StoreFloor.GetInstance().transform)); }