void Start() { InventoryController = GameObject.Find("---InventoryController"); TouchController = GameObject.Find("---TouchController").GetComponent <TouchController>(); AllMachines = GameObject.Find("---ClothInMachineController").GetComponent <AllMachines>(); FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); SubwayMovement = GameObject.Find("---StationController").GetComponent <SubwayMovement>(); LostAndFound = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>(); SpriteLoader = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>(); AdsController = GameObject.Find("---AdsController").GetComponent <AdsController>(); InventorySlotMgt = GameObject.Find("---InventoryController").GetComponent <InventorySlotMgt>(); //AudioManager = GameObject.Find("---AudioManager").GetComponent<AudioManager>(); LevelManager = FinalCameraController.LevelManager; startPos = transform.position; // selfButton.onClick.AddListener(AddClothToInventory); //currentSprite = GetComponent<SpriteRenderer>().sprite; myImage = GetComponent <Image>(); startSprite = GetComponent <Image>().sprite; if (!FinalCameraController.isTutorial) { returnConfirmButton.gameObject.SetActive(false); } }
public int InsertLostAndFound(LostAndFound p_LostAndFound) { MySqlParameter[] parameters = new MySqlParameter[] { new MySqlParameter("p_nameofperson",p_LostAndFound.nameofperson), new MySqlParameter("p_nric",p_LostAndFound.nric), new MySqlParameter("p_reporteddate",p_LostAndFound.reporteddate), new MySqlParameter("p_remarks",p_LostAndFound.remarks), new MySqlParameter("p_deploymentid",p_LostAndFound.deploymentid) }; return MySQLDB.MySQLDBHelper.ExecuteNonQuery("AddLostandfound", CommandType.StoredProcedure, parameters); }
public IActionResult Upsert(int?id) { LostAndFound lostAndFound = new LostAndFound(); if (id == null) { return(View(lostAndFound)); } lostAndFound = _unitOfWork.LostAndFound.Get(id.GetValueOrDefault()); if (lostAndFound == null) { return(NotFound()); } return(View(lostAndFound)); }
public IActionResult Upsert(LostAndFound lostAndFound) { if (ModelState.IsValid) { if (lostAndFound.Id == 0) { _unitOfWork.LostAndFound.Add(lostAndFound); } else { _unitOfWork.LostAndFound.Update(lostAndFound); } _unitOfWork.Save(); return(RedirectToAction(nameof(Index))); } return(View(lostAndFound)); }
void Start() { myInputState = InputState.None; dragDistance = Screen.height * 8 / 100; FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); if (FinalCameraController != null) { LostAndFound = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>(); AdsController = GameObject.Find("---AdsController").GetComponent <AdsController>(); AudioManager = GameObject.Find("---AudioManager").GetComponent <AudioManager>(); } cameraMovement = GameObject.Find("Main Camera").GetComponent <CameraMovement>(); // washerController = GameObject.Find("").GetComponent<WasherController>(); }
public LostAndFound SelectLostAndFoundById(int p_LostAndFoundID) { MySqlParameter[] parameters = new MySqlParameter[] { new MySqlParameter("p_lostandfoundreportid", p_LostAndFoundID)}; DataTable dt = MySQLDB.MySQLDBHelper.ExecuteSelectCommand("GetLostandfoundByID", CommandType.StoredProcedure, parameters); LostAndFound objLostAndFound = null; if (dt.Rows.Count > 0) { DataRow dr = dt.Rows[0]; objLostAndFound = new LostAndFound(); objLostAndFound.lostandfoundreportid = Convert.ToInt32(dr["lostandfoundreportid"].ToString()); objLostAndFound.nameofperson = dr["nameofperson"].ToString(); objLostAndFound.nric = dr["nric"].ToString(); objLostAndFound.reporteddate = Convert.ToDateTime(dr["reporteddate"].ToString()); objLostAndFound.remarks = dr["remarks"].ToString(); objLostAndFound.deploymentid = dr["deploymentid"] != null && dr["deploymentid"].ToString() != "" ? Convert.ToInt32(dr["deploymentid"]) : 0 ; } dt.Clear(); dt.Dispose(); return objLostAndFound; }
private static void LoadRootDomainLostAndFoundContainerDN() { ADOperationResult adoperationResult = ADNotificationAdapter.TryRunADOperation(delegate() { string rootDomainNamingContextFromCurrentReadConnection = MserveSynchronizationProvider.ConfigSession.GetRootDomainNamingContextFromCurrentReadConnection(); LostAndFound lostAndFound = MserveSynchronizationProvider.ConfigSession.ResolveWellKnownGuid <LostAndFound>(WellKnownGuid.LostAndFoundContainerWkGuid, rootDomainNamingContextFromCurrentReadConnection); if (lostAndFound != null) { MserveSynchronizationProvider.rootDomainLostAndFoundContainerDN = lostAndFound.DistinguishedName; } }, 3); if (!adoperationResult.Succeeded) { throw new ExDirectoryException("Failed to get rootDomainLostAndFoundContainerDN because of AD exception.", adoperationResult.Exception); } if (string.IsNullOrEmpty(MserveSynchronizationProvider.rootDomainLostAndFoundContainerDN)) { throw new ExDirectoryException("Failed to get rootDomainLostAndFoundContainerDN because its value is null.", null); } }
public List<LostAndFound> SelectLostAndFound(int currentUserType, int deploymentId) { MySqlParameter[] parameters = new MySqlParameter[] { new MySqlParameter("currentUserType", currentUserType), new MySqlParameter("p_deploymentId", deploymentId) }; List<LostAndFound> LostAndFoundCol = new List<LostAndFound>(); DataTable dt = MySQLDB.MySQLDBHelper.ExecuteSelectCommand("GetLostandfounds", CommandType.StoredProcedure,parameters); LostAndFound objLostAndFound = null; foreach (DataRow dr in dt.Rows) { objLostAndFound = new LostAndFound(); objLostAndFound.lostandfoundreportid = Convert.ToInt32(dr["lostandfoundreportid"].ToString()); objLostAndFound.nameofperson = dr["nameofperson"].ToString(); objLostAndFound.nric = dr["nric"].ToString(); objLostAndFound.reporteddate = Convert.ToDateTime(dr["reporteddate"].ToString()); objLostAndFound.remarks = dr["remarks"].ToString(); objLostAndFound.deploymentid = dr["deploymentid"] != null && dr["deploymentid"].ToString() != "" ? Convert.ToInt32(dr["deploymentid"]) : 0 ; LostAndFoundCol.Add(objLostAndFound); } dt.Clear(); dt.Dispose(); return LostAndFoundCol; }
public ActionResult AddObject() { CinemaViewModel model = (CinemaViewModel)TempData["model"]; if (model == null) { model = new CinemaViewModel(); } if (model.LoggedInCashRegister == false) { return(RedirectToAction("CashRegisterEmployeeLogin", "Login", new { error = "Log in om deze pagina te bezoeken." })); } // Retrieve the input string datestring = Request["date"]; string objectstring = Request["object"]; string finder = Request["finder"]; string owner = Request["owner"]; string roomnumberstring = Request["roomnumber"]; string locationstring = Request["location"]; int roomnumber; int location; DateTime date; // Check if the required fields have been filled in if (datestring == "" || objectstring == "" || roomnumberstring == "" || locationstring == "") { return(RedirectToAction("AddLostAndFound", "CashRegister", new { error = "Vul a.u.b. alle verplichte velden in" })); } // Try convert strings to int and start insertion into database if (int.TryParse(roomnumberstring, out roomnumber) && int.TryParse(locationstring, out location)) { date = DateTime.ParseExact(datestring, "MM/dd/yyyy", CultureInfo.InvariantCulture); var context = new EFDbContext(); var lostorfoundobject = new LostAndFound() { Date = date, Finder = finder, Location = location, Object = objectstring, Owner = owner, RoomNumber = roomnumber }; context.LostAndFounds.Add(lostorfoundobject); context.SaveChanges(); return(RedirectToAction("AddLostAndFound", "CashRegister", new { confirmation = "Gevonden of verloren voorwerp succesvol toegevoegd" })); } else { return(RedirectToAction("AddLostAndFound", "CashRegister", new { error = "Er is iets fout gegaan, probeer het later opnieuw" })); } }
// Start is called before the first frame update void Start() { FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); BagsController = GameObject.Find("---BagsController").GetComponent <BagsController>(); AdsController = GameObject.Find("---AdsController").GetComponent <AdsController>(); AudioManager = GameObject.Find("---AudioManager").GetComponent <AudioManager>(); ValueEditor = GameObject.Find("---ValueEditor").GetComponent <ValueEditor>(); if (!FinalCameraController.isTutorial) { LevelManager = FinalCameraController.LevelManager; bagPosAvailable.Add(false); bagPosAvailable.Add(false); bagPosAvailable.Add(false); noSameBag = true; aSR = arrow.GetComponent <SpriteRenderer>(); hSR = highlight.GetComponent <SpriteRenderer>(); //tabImg0 = GameObject.Find("bag0Logo").GetComponent<Image>(); //tabImg1 = GameObject.Find("bag1Logo").GetComponent<Image>(); LostAndFound = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>(); //tab0 = GameObject.Find("bagTab0"); //tab1 = GameObject.Find("bagTab1"); collection.SetActive(false); } // 不知道 real timer干什么用的 realTimer = (moveTime + stayTime + pauseTime) * 3 - timer; NameToStationBags.Add(bagStation0); NameToStationBags.Add(bagStation1); NameToStationBags.Add(bagStation2); AllDetailList.Add(detailList0); AllDetailList.Add(detailList1); DetailCG.Add(dSR1); DetailCG.Add(dSR2); currentStation = 0; stationTimer = stayTime; // CountDownTimer.text = ""; if (!FinalCameraController.isTutorial) { //get all the doors position when game starts left1Pos = left1.position.x; right1Pos = right1.position.x; } //get all station names into the dictionary for (var i = 0; i < stationNames.Count; ++i) { allStation.Add(stationNames[i], i); } //trainStop(); }
public int EditLostAndFound(LostAndFound p_LostAndFound) { return(objLostAndFoundDBA.UpadateLostAndFound(p_LostAndFound)); }
public int AddLostAndFound(LostAndFound p_LostAndFound) { return(objLostAndFoundDBA.InsertLostAndFound(p_LostAndFound)); }