Пример #1
0
        private void LviRevenueReport_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            tblTitle.Text = "Thống kê doanh thu";
            UControl.Items.Clear();
            var change = new RevenueManagement();

            change.right = this.right;
            _tabUserPage = new TabItem {
                Content = change
            };
            UControl.Items.Add(_tabUserPage);
            UControl.Items.Refresh();
        }
Пример #2
0
    void Awake()
    {
        refurbishmentTab = controller.transform.FindChild ("RefurbishmentCTR").gameObject.GetComponent<Refurbishment>();
        staffMenu = GameObject.FindGameObjectWithTag ("StaffingController").GetComponent<StaffMenu> ();
        bankingTab = controller.transform.FindChild ("BankingController").gameObject.GetComponent<BankingReport>();
        emsTab = controller.transform.FindChild("EMSController").gameObject.GetComponent<EMSReport>();
        revenueManagementTab = controller.transform.FindChild("RevenueManagerCTR").GetComponent<RevenueManagement>();
        randomEvent = controller.transform.FindChild("EventController").GetComponent<RandomEvent>();
        rateSetup = controller.transform.FindChild("RatesSetUp").GetComponent<RatesSetup>();
        groupController = controller.transform.FindChild("GroupBooking").GetComponent<GroupBookController>();
        calendarController = controller.transform.FindChild("CalendarController").GetComponent<CalendarController>();
        feedbackController = controller.transform.FindChild("FeedBackController").GetComponent<FeedbackController>();
        dataProcessor = GameObject.Find("DataCollection").GetComponent<Serializer_Deserializer>();
        assetSwapper = controller.transform.FindChild("AssetController").GetComponent<AssetSwapper>();
        toolbar = GameObject.FindGameObjectWithTag("UI").transform.FindChild("OverWorld").GetComponent<ToolbarOptions>();
        adController = controller.transform.FindChild("AdvertController").gameObject.GetComponent<Advertisment>();

        SingletonCheck();
        if(monthlyReports == null){
            monthlyReports = new List<MonthlyReport>();//create list on first run.
        }
        //Ensure there's a log for this week (special case for 1st time run)
        if (receptionLogs == null) {
            receptionLogs = new List<ReceptionLog> ();
        }
        if(restaurantBooks == null){
            restaurantBooks = new List<RestaurantBook>();//create a new list on first run.
        }
        //Ensure there's a log for this week (special case for 1st time run)
        if (staffingLogs == null) {
            staffingLogs = new List<StaffingLog> ();
        }
        //create the log once.
        if(balanceSheets == null){
            balanceSheets = new List<BalanceSheet>();//create new balance sheet list on first run.
        }
        GenerateNewMonthReports ();
        firstGeneration = true;

        medianRoomCostWD = rateSetup.medianRoomCostWD;
        medianRoomCostWE = rateSetup.medianRoomCostWE;
    }