//สรุปผลงานช่างประจำเดือน public ActionResult ReportServices() { ViewBag.ReportList = "first active"; ReportServicesViewModel model = new ReportServicesViewModel(); model.Report = new ReportServices(); DateTime start = DateExtension.FirstDayOfMonthFromDateTime(DateTime.Now); model.DateStart = Convert.ToDateTime(start.AddYears(543).ToString("MM/dd/yyyy")); DateTime end = DateExtension.LastDayOfMonthFromDateTime(DateTime.Now); model.DateEnd = Convert.ToDateTime(end.AddYears(543).ToString("MM/dd/yyyy")); model.Report.Repairs = ReportManager.ReportRepair(start, end); model.Report.Claims = ReportManager.ReportClaim(start, end); model.Report.Staffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.SuperStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "หัวหน้าช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.QCStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ฝ่ายตรวจสอบคุณภาพ").OrderBy(m => m.sStaffName).ToList(); ViewBag.ReportHeader = String.Format("รายรับ-รายจ่ายค่าบริการทั้งหมดประจำเดือน {0}", DateExtension.DateThaiFormat2(start)); return(View(model)); }
private void buttonUpdate_Click(object sender, EventArgs e) { //updates staff data Staff staff = new Staff(); try { staff.staffId = staffId; staff.firstName = this.textBoxFirstName.Text; staff.lastName = this.textBoxLastName.Text; staff.department = Int32.Parse(this.comboBoxDepartment.SelectedValue.ToString()); staff.age = Convert.ToInt32(this.textBoxAge.Text); staff.sex = this.comboBoxSex.Text; staff.heightFt = Convert.ToInt32(this.textBoxHeightFt.Text); staff.heightInch = Convert.ToInt32(this.textBoxHeightInch.Text); staff.weight = Convert.ToInt32(this.textBoxWeight.Text); staff.phone = Convert.ToInt64(this.textBoxPhone.Text); staff.email = this.textBoxEmail.Text; staff.address = this.textBoxAddress.Text; staff.natioinality = Int32.Parse(this.comboBoxNationality.SelectedValue.ToString()); staff.staffShift = Int32.Parse(this.comboBoxStaffShift.SelectedValue.ToString()); StaffManager.staffUpdate(staff); MessageBox.Show("Success"); displayStaff(); clearData(); } catch (System.Exception ex) { MessageBox.Show(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { try { StaffManager SM = new StaffManager(); Staff_Store staff = SM.GetByID(Convert.ToInt32(Request["id"])); staff.status = 1; staff.user_id = Convert.ToInt32(Request["userid"]); staff.store_id = Convert.ToInt32(Request["storeid"]); SM.Save(); Response.Write(JsonConvert.SerializeObject(new { success = 1 })); } catch (Exception ex) { Response.Write(JsonConvert.SerializeObject(new { success = -1, error = ex })); } }
void Awake() { pather = GetComponent <Pather>(); customerTransform = GetComponent <Transform>(); staffManager = GameManager.Instance.ScriptHolderLink.GetComponent <StaffManager>(); bladderStat = new CustomerStat(CustomerStat.Stats.Bladder, 50.0f, 0.0f); happinessStat = new CustomerStat(CustomerStat.Stats.Happiness, 50.0f, 0.0f); hungerStat = new CustomerStat(CustomerStat.Stats.Hunger, 50.0f, 0.0f); tirednessStat = new CustomerStat(CustomerStat.Stats.Tiredness, 50.0f, 0.0f); queasinessStat = new CustomerStat(CustomerStat.Stats.Queasiness, 50.0f, 0.0f); customerStats = new List <CustomerStat>(); customerStats.Add(bladderStat); customerStats.Add(happinessStat); customerStats.Add(hungerStat); customerStats.Add(tirednessStat); customerStats.Add(queasinessStat); for (int i = 0; i < customerStats.Count; i++) { if (customerStats[i].GetStatType() == weakness) { customerStats[i].StatValue = 100.0f; customerStats[i].Susceptibility = 15.0f; weakStat = i; } } statCounter = 0.0f; currentState = CustomerStates.Idle; CustomerName = GameManager.Instance.GetComponent <NameGenerator>().GenerateName(); }
private void btnLogin_Click(object sender, EventArgs e) { try { StaffManager staffManager = new StaffManager(new StaffDal()); if (staffManager.Control(tbUserName.Text, tbPassword.Text)) { var user = staffManager.GetStaff(tbUserName.Text); MainPage mainPage = new MainPage(); mainPage.UserName = user.FirstName + " " + user.LastName; mainPage.IsAdmin = user.IsAdmin; MessageBox.Show("Giriş başarıyla yapıldı."); mainPage.Show(); } else { MessageBox.Show("Giriş başarısız, kullanıcı adı veya parolanızı gözden geçirin!", "Uyarı", MessageBoxButtons.OK); } } catch (Exception exception) { MessageBox.Show(exception.Message); } }
public IActionResult insertNewStaff([FromForm] STAFF staff) { StaffManager staffManager = new StaffManager(); staffManager.insertStaff(staff); return(Ok(new JsonCreate())); }
private void btnLogin_Click(object sender, EventArgs e) { Staff staff = new StaffManager().GetByName(this.txtUsername.Text); // varify username and password if (staff != null && staff.Password == this.txtPassword.Text && staff.Role == this.selectedRole) { this.DialogResult = DialogResult.OK; if (staff.Role == StaffRole.Manager) { currentStaff = new Manager(); currentStaff.Name = staff.Name; currentStaff.Password = staff.Password; currentStaff.Role = staff.Role; } if (staff.Role == StaffRole.Waiter) { currentStaff = new Waiter(); currentStaff.Name = staff.Name; currentStaff.Password = staff.Password; currentStaff.Role = staff.Role; } } else { MessageBox.Show("Input username or password error! Please try again!"); } }
public JsonResult GetRepairs(Guid id) { try { Staff satff = StaffManager.GetById(id); var items = StaffManager.GetRepairs(satff); //Records = itemFounds.Select(m => new { Username = m.Username, Password = m.Password, Role=m.Roles.FirstOrDefault().RoleName }) } return(Json(new { Result = "OK", Records = items.Select(m => new { RepairNo = m.sRepairNo , Product = m.Product.sProductName , Status = m.RepairStatuies.FirstOrDefault().vWorkingStatus , WorkingDate = m.RepairStatuies.FirstOrDefault().vWorkingDate , ClosingDate = m.vDateClose }) }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { Result = "ERROR", Message = ex.Message })); } }
public ClientGroup(int id, List <Client> list) { Id = id; ClientList = list; this.Position = new Position(80, 288); this.tableOrder = new Order(); this.tableOrder.Id = this.Id; //adding subscriptions to events DishFinished += StaffManager.Instance().OnDishFinished; ReadyToOrder += StaffManager.Instance().OnReadyToOrder; ReadyToPay += StaffManager.Instance().OnReadyToPay; this.MoveEvent += Restaurant.Restaurant.Instance.UpdateMove; //Gets menus, reflexion moment //Meal Orders are done //(Wine order) //Wait for food, then eats //this.Eat(); //for test purpose //Meal finished, ready to pay }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { staffManager = new StaffManagerImpl(); staffObj = staffManager.getStaffByEmail(email, phone); if (staffObj == null) { e.Result = 0; } else { staffObj.password = Utility.getMD5Value(Utility.generateTempUserPassword(staffObj)); if (staffManager.updateStaffDetails(staffObj)) { e.Result = 1; //MyMail mailObj = new MyMail(); //mailObj.email = email; //mailObj.subject = Labels.RECOVERY_MAIL_SUBJECT; //mailObj.body = frameMailBody(staffObj); //if ((bool)Utility.sendMail(mailObj, false)) // e.Result = 1; //else // e.Result = 2; } else { e.Result = 3; } } }
public JsonResult Edit(Staff model) { try { if (!ModelState.IsValid) { return(Json(new { Result = "ERROR", Message = "Form is not valid! Please correct it and try again." })); } Staff itemFound = StaffManager.GetById(model.kStaffId); if (itemFound == null) { return(Json(new { Result = "ERROR", Message = "Item Not Found" })); } model.dtDateAdd = itemFound.dtDateAdd; model.dtDateUpdate = DateTime.Now; StaffManager.Edit(model); return(Json(new { Result = "OK" })); } catch (Exception ex) { return(Json(new { Result = "ERROR", Message = ex.Message })); } }
public ActionResult RemoveStaff(Guid StaffID) { var _manager = new StaffManager(); _manager.DeleteStaffByID(StaffID); return(RedirectToAction("Users")); }
public ActionResult Users() { var _manager = new StaffManager(); var staff = _manager.GetAllStaffEntities(); return(View("Users", staff)); }
private void btnOk_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(txtName.Text) && !string.IsNullOrWhiteSpace(txtPass.Text)) { Staff staff = new Staff(); staff.Name = txtName.Text; staff.Password = txtPass.Text; staff.Role = (StaffRole)(comboBoxRole.SelectedIndex); int flag; if (mode == "add") { flag = new StaffManager().AddNew(staff); } else { flag = new StaffManager().Update(staff); } if (flag == 1) { this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show("This staff name is exist. Please change."); } } //MessageBox.Show(comboBoxRole.SelectedItem.ToString()); //MessageBox.Show(comboBoxRole.SelectedIndex.ToString()); }
private void btnDelete_Click(object sender, EventArgs e) { string id = lblStaffId.Text; try { DialogResult ret = MessageBox.Show("你确定要删除该员工吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (ret == DialogResult.Yes) { int n = StaffManager.DeleteStaffInfo(id); if (n > 0) { MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); txtName.Text = ""; cboAge.Text = ""; cboSex.Text = ""; dtpBirthday.Text = ""; txtDress.Text = ""; txtTel.Text = ""; txtCard.Text = ""; txtEName.Text = ""; txtETel.Text = ""; cboType.Text = ""; lblStaffId.Text = ""; } } } catch (Exception) { } }
private void btnAdd_Click(object sender, EventArgs e) { if (CheckInfo()) { StaffInfo sf = new StaffInfo() { StaffName = txtName.Text, StaffSex = cboSex.Text, StaffAge = Convert.ToInt32(cboAge.Text), StaffBirthday = Convert.ToDateTime(dtpBirthday.Text), StaffAddress = txtDress.Text == "" ? "无" : txtDress.Text, StaffTel = txtTel.Text, StaffCardId = txtCard.Text, EContact = txtEName.Text == "" ? "无" : txtEName.Text, EContactTel = txtETel.Text == "" ? "无" : txtETel.Text, TypeId = cboType.Text, }; StaffInfo nt = StaffManager.SelectStaffByCID(txtCard.Text); if (nt != null) { MessageBox.Show("身份证相同", "提示"); return; } int n = StaffManager.InsertStaff(sf); if (n > 0) { MessageBox.Show("添加成功!", "提示"); } else { MessageBox.Show("该员工已存在,添加失败", "提示"); } } }
//สรุปรายการซ่อมประจำวัน public ActionResult ReportDay() { ViewBag.ReportList = "first active"; ReportDayViewModel model = new ReportDayViewModel(); model.Report = new ReportDay(); DateTime start = DateTime.Today; model.DateStart = start.AddYears(543); DateTime end = DateTime.Today.AddDays(1); model.DateEnd = Convert.ToDateTime(end.AddYears(543).ToString("MM/dd/yyyy")); model.Report.Repairs = ReportManager.ReportRepairDay(start); model.Report.Claims = ReportManager.ReportClaimDay(start); var workingstatus = WorkingStatusManager.GetAll().Where(m => m.iDefault>=5 && m.iDefault<=7); model.Report.WorkingStatuies = workingstatus.OrderBy(m => m.iDefault).ToList(); model.Report.Insurances = InsuranceManager.GetAll().OrderBy(m => m.sInsuranceName).ToList(); model.Report.TCStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.STCStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "หัวหน้าช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.QCStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ฝ่ายตรวจสอบคุณภาพ").OrderBy(m => m.sStaffName).ToList(); ViewBag.ReportHeader = String.Format("รายงานบริการประจำวันที่ {0}", DateExtension.DateThaiFormat(start)); return View(model); }
public IActionResult loginAccount([FromForm] LoginDTO loginDTO) { SessionUtil.addTokenToSession(this.HttpContext, loginDTO._id == null ? loginDTO._phone : loginDTO._id); StaffManager staffManager = new StaffManager(); String result = ""; StaffInformaitonDTO staffInformaiton = new StaffInformaitonDTO(); if (loginDTO._phone != null) { result = staffManager.verifyPasswordAndPhone(loginDTO._phone, loginDTO._password); staffInformaiton = staffManager.getStaffInformationByPhone(loginDTO._phone); } else if (loginDTO._id != null) { result = staffManager.verifyPasswordAndId(loginDTO._id, loginDTO._password); staffInformaiton = staffManager.getStaffInformationById(loginDTO._id); } else { result = ConstMessage.NOT_FOUND; } return(Ok(new JsonCreate() { message = result, data = staffInformaiton })); }
private void btnUpdate_Click(object sender, EventArgs e) { if (CheckInfo()) { StaffInfo sf = new StaffInfo() { StaffId = Convert.ToInt32(lblStaffId.Text), StaffName = txtName.Text, StaffSex = cboSex.Text, StaffAge = Convert.ToInt32(cboAge.Text), StaffBirthday = Convert.ToDateTime(dtpBirthday.Text), StaffAddress = txtDress.Text == "" ? "无" : txtDress.Text, StaffTel = txtTel.Text, StaffCardId = txtCard.Text, EContact = txtEName.Text == "" ? "无" : txtEName.Text, EContactTel = txtETel.Text == "" ? "无" : txtETel.Text, TypeId = cboType.Text, }; int n = StaffManager.UpdateStaff(sf); if (n > 0) { MessageBox.Show("修改成功!", "提示"); } else { MessageBox.Show("修改失败!", "提示"); } } }
public CourseCreateModel(AppUserManager <AppUser> UserMgr, CourseManager CourseMgr, StaffManager StaffMgr) { //_context = context; _UserMananger = UserMgr; _CourseManager = CourseMgr; _StaffManager = StaffMgr; }
public TabelStatusForm(DiningArea diningArea) { InitializeComponent(); this.diningArea = diningArea; staffManager = new StaffManager(); tableManager = new TableManager(); itemManager = new ItemManager(); this.Text = this.Text + string.Format(" ({0}: {1})", diningArea.CurrentStaff.Role, diningArea.CurrentStaff.Name); InitTablePosition_Simple(); waitlistForm = new WaitlistForm(diningArea); waitlistForm.OnAllocate += waitlistForm_OnAllocate; //set TabelStatusForm location int x = (System.Windows.Forms.SystemInformation.WorkingArea.Width - this.Width + waitlistForm.Width) / 2; int y = (System.Windows.Forms.SystemInformation.WorkingArea.Height - this.Height) / 2; this.StartPosition = FormStartPosition.Manual; this.Location = (Point) new Size(x, y); //set waitlistForm location waitlistForm.ShowInTaskbar = false; waitlistForm.StartPosition = FormStartPosition.Manual; waitlistForm.Location = new Point(this.Location.X - waitlistForm.Width, this.Location.Y); waitlistForm.Height = this.Height; waitlistForm.Show(); }
public MessagesController(IMessageRepository <Message> messageRepository, ITicketsRepository <Ticket> ticketsRepository, ITicketsMailer ticketsMailer, AuthHelper authHelper) { this.messageRepository = messageRepository; this.ticketsRepository = ticketsRepository; this.ticketsMailer = ticketsMailer; this.staffManager = authHelper.GetStaffManagerFromOwinContext; }
public ListControl_ViewUsers(Form_Home homeForm) { this.homeForm = homeForm; tooltip = new ToolTip(); staffManager = new StaffManagerImpl(); InitializeComponent(); }
/// <summary> /// Order dessert method /// </summary> /// <param name="clt"></param> public void OrderDessert(Client.Client clt) { if (clt.Order[2] == null) { clt.Order[2] = StaffManager.Instance().Counter.Menu[2][Randomizer.Instance.R.Next(0, StaffManager.Instance().Counter.Menu[2].Count)]; } }
private void btnSave_Click(object sender, EventArgs e) { try { if (txtName.Text.Trim() != "" && txtSurName.Text.Trim() != "" && txtIdNumber.Text.Trim() != "") { staff = new Staff() { ID = _ID, StaffName = txtName.Text.Trim(), StaffSurName = txtSurName.Text.Trim(), StaffIDNumber = txtIdNumber.Text.Trim(), StaffMobilePhone = txtmPhone.Text.Trim(), StaffHomePhone = txthPhone.Text.Trim(), StaffAddress = txtAddress.Text.Trim(), StaffSalary = Convert.ToInt32(txtSalary.Text.Trim()), StaffCheckoutNumber = Convert.ToInt32(txtChckoutNum.Text.Trim()), StaffDateStart = dtpStart.Value.ToString().Trim(), StaffDateQuit = dtpQuit.Value.ToString().Trim() }; } else { if (txtName.Text.Trim() == "") { nameLabel.ForeColor = System.Drawing.Color.Red; } if (txtSurName.Text.Trim() == "") { surnameLabel.ForeColor = System.Drawing.Color.Red; } if (txtIdNumber.Text.Trim() == "") { idNumberLbl.ForeColor = System.Drawing.Color.Red; } MessageBox.Show("Please Fill The Required Areas!!"); } if (_ID == 0) { staffManager = new StaffManager(); staffManager.Save(staff); MessageBox.Show("Register Successfull!"); staff_Transactions = new staff_transactions(); staff_Transactions.FillGrid(); } else { staffManager = new StaffManager(); staffManager.Update(staff); MessageBox.Show("Update Successfull!"); } } catch (Exception ex) { MessageBox.Show("Saving Unsuccessfull " + ex.Message.ToString()); } }
public IActionResult registerStaff([FromForm] RegisterDTO registerDTO) { StaffManager staffManager = new StaffManager(); return(Ok(new JsonCreate { message = staffManager.createStaff(registerDTO) })); }
public static SelectList SuperUser() { var items = StaffManager.GetAll().Where(m => m.vStaffPositionDescription == "หัวหน้าช่าง").ToList(); var item = new SelectList(items, items.ConvertAll(m => m.sStaffName)); return(new SelectList(items, new { @Value = item.SelectedValue })); }
public void FillGrid() { dgvStaff.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; staffManager = new StaffManager(); var list = staffManager.GetAll(); dgvStaff.DataSource = list; }
public TabelStatusForm(DiningArea diningArea) { InitializeComponent(); this.diningArea = diningArea; staffManager = new StaffManager(); tableManager = new TableManager(); itemManager = new ItemManager(); orderManager = new OrderManager(); diningArea.AWaitingTimePredictor.PredictWaitingTimeReg(diningArea.Tables, diningArea.Customers, diningArea.Orders, (List <Order>)orderManager.GetByOrderStatus(OrderStatus.Finish), (List <Item>)itemManager.GetAll()); this.Text = this.Text + string.Format(" ({0}: {1})", diningArea.CurrentStaff.Role, diningArea.CurrentStaff.Name); InitTablePosition_Simple(); waitlistForm = new WaitlistForm(diningArea); waitlistForm.OnAllocate += waitlistForm_OnAllocate; //set TabelStatusForm location int x = (System.Windows.Forms.SystemInformation.WorkingArea.Width - this.Width + waitlistForm.Width) / 2; int y = (System.Windows.Forms.SystemInformation.WorkingArea.Height - this.Height) / 2; this.StartPosition = FormStartPosition.Manual; this.Location = (Point) new Size(x, y); //set waitlistForm location waitlistForm.ShowInTaskbar = false; waitlistForm.StartPosition = FormStartPosition.Manual; waitlistForm.Location = new Point(this.Location.X - waitlistForm.Width, this.Location.Y); waitlistForm.Height = this.Height; waitlistForm.Show(); //groupbox:table information txtTableId.Enabled = false; txtCapacity.Enabled = false; comboBoxTableStatus.DataSource = System.Enum.GetNames(typeof(TableStatus)); comboBoxWaiterName.DataSource = diningArea.Waiters.Select(waiter => waiter.Name).ToList(); //groupbox:order information txtOrderId.Enabled = false; dgvItemMenu1.DataSource = itemManager.GetAll(); dgvItemMenu1.ReadOnly = true; dgvItemMenu1.RowHeadersVisible = false; dgvItemMenu1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvItemMenu1.Columns["AverageTimeCost"].Visible = false; dgvItemMenu1.Columns["ItemStatus"].Visible = false; dgvItemMenu1.Columns["ItemAmount"].Visible = false; dgvItemMenu1.Columns["Description"].Visible = false; dgvSelectedItems.DataSource = new List <Item>(); //dgvSelectedItems.ReadOnly = true; dgvSelectedItems.RowHeadersVisible = false; dgvSelectedItems.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvSelectedItems.Columns["AverageTimeCost"].Visible = false; dgvSelectedItems.Columns["ItemStatus"].Visible = false; dgvSelectedItems.Columns["Description"].Visible = false; dgvSelectedItems.Columns["ItemId"].ReadOnly = true; dgvSelectedItems.Columns["Name"].ReadOnly = true; dgvSelectedItems.Columns["Price"].ReadOnly = true; dgvSelectedItems.AllowUserToAddRows = false; }
public IActionResult getAllUserInformation() { StaffManager staffManager = new StaffManager(); CustomerManager customerManager = new CustomerManager(); List <STAFF> staffs = staffManager.getAllStaffsInformation(); List <CUSTOMER> customers = customerManager.getAllCustomersInformation(); return(Ok(UserMergeUtil.addDataToResult(staffs, customers))); }
public FormAddStaff() { InitializeComponent(); if (m_staff == null) { m_staff = new Staff(); } staffMngr = new StaffManager(); //Instantiate som test-value textBoxNameStaff.Text = "APU"; textBoxStaffQualification.Text = "Chief"; }
/// <summary> /// Sets up the window. /// Sets private GUIControllerScript variables to those passed in /// </summary> /// <param name="window">Rect containing window size and position.</param> /// <param name="label">Label of the window.</param> /// <param name="text">Text to be written in the window.</param> /// <param name="windowID">Window ID number.</param> /// <param name="services">If set to <c>true</c> window has a "Services Details" button.</param> /// <param name="occupants">If set to <c>true</c> window has an "Occupants Details" button.</param> /// <param name="lectures">If set to <c>true</c> window has a "Lecture Details" button.</param> /// <param name="buildingDetails">Building data structure with info for the scroll texts.</param> public void SetupWindow(Rect window, string label, string text, int windowID, bool services, bool occupants, bool lectures, Building buildingDetails, StaffManager staffDetails, LectureManager lectureDetails) { windowRect = window; // windowRect = new Rect(window); windowLabel = label; windowText = text; windowIDnum = windowID; windowServices = services; windowOccupants = occupants; windowLectures = lectures; currentBuilding = buildingDetails; staffManager = staffDetails; lectureManager = lectureDetails; showWindow = true; }
/// <summary> /// Start this instance. /// </summary> void Start() { AndroidJNI.AttachCurrentThread(); //gpsActivityJavaClass = new AndroidJavaClass ("com.TeamWARIS.WARISProject.CustomGPS"); _camLoc = gameObject.AddComponent<Geolocation>(); _camLoc.initGPS(); _directionx = 0; _directiony = 1; setCamVecLength(0.00015); checkGPS(); gcs = GetComponent<GUIControllerScript>(); _location = ""; _GUIWindow = new Rect(Screen.width / 4 + 10, (Screen.height / 2) + 10, Screen.width / 4 - 20, (Screen.height / 2) - 35); rc = (ResourceController)GameObject.Find ("Resource Controller").GetComponent<ResourceController> (); buildingManager = rc.GetBuildingManager (); staffManager = rc.GetStaffManager (); lectureManager = rc.GetLectureManager (); gpsActivityJavaClass = new AndroidJavaClass ("com.TeamWARIS.WARISProject.CustomGPS"); }