예제 #1
0
        public Graph()
        {
            InitializeComponent();


            int    ICCamp   = connection.GetCampIncome();
            int    ICTicket = connection.GetTicketIncome();
            double ICShop   = connection.GetShopIncome();
            double ICRental = connection.GetRentalIncome() + connection.GetRentalIncome1();


            PointLabel = chartPoint =>
                         string.Format("{0} ({1:P})", ICCamp, chartPoint.Participation);

            ICTicketlb = ChartPoint =>
                         string.Format("{0} ({1:P})", ICTicket, ChartPoint.Participation);

            ICShoplb = ChartPoint =>
                       string.Format("{0} ({1:P})", ICShop, ChartPoint.Participation);

            ICLoaning = ChartPoint =>
                        string.Format("{0} ({1:P})", ICRental, ChartPoint.Participation);


            DataContext = this;
        }
예제 #2
0
        public DashBoard()
        {
            InitializeComponent();

            #region GetData Code
            connection.GetShopName(comboShop);
            connection.GetRental(comboLoan);
            connection.GetShopEmployees(comboShopEmployee);
            connection.GetRentalEmployees(comboRentalEmp);

            int NrCamp       = connection.GetNrCamp();
            int NrChecks     = connection.GetNrChecksIn();
            int NrLeft       = connection.GetNrLeft();
            int NrTicket     = connection.GetNrTicket();
            int NrRegistered = connection.GetNrRegistered();

            int    ICCamp   = connection.GetCampIncome();
            int    ICTicket = connection.GetTicketIncome();
            double ICShop   = connection.GetShopIncome();
            double ICTotal  = connection.GetTotalIncome();
            double ICRented = connection.GetRentalIncome() + connection.GetRentalIncome1();

            int nrShops           = connection.GetNrTotalShop();
            int nrLoans           = connection.GetNrTotalLoan();
            int nrTotalShopsLoans = connection.GetNrTotalShopLoan();
            int nrItems           = connection.GetNrItems();
            int nrItemType        = connection.GetNrItemTypes();
            int nrEmployee        = connection.GetNrEmployees();
            int nrAdmins          = connection.GetNrAdmins();
            int nrSalesItems      = connection.GetNrSaleItems();
            int nrRentedItems     = connection.GetNrRentedItems();
            int nrSubscriber      = connection.GetNrSubscriber();

            tbSubscriber.Text       = nrSubscriber.ToString();
            tbSaledItems.Text       = nrSalesItems.ToString();
            tbRentedItems.Text      = nrRentedItems.ToString();
            tbNradmins.Text         = nrAdmins.ToString();
            tbNrEmployees.Text      = nrEmployee.ToString();
            tbItemTypes.Text        = nrItemType.ToString();
            tbItem.Text             = nrItems.ToString();
            tbNrTotalLoan.Text      = nrLoans.ToString();
            tbNrTotalShops.Text     = nrShops.ToString();
            tbNrTotalShopsLoan.Text = nrTotalShopsLoans.ToString();
            tbNrCamp.Text           = NrCamp.ToString();
            tbNrChecksin.Text       = NrChecks.ToString();
            tbNrLeft.Text           = NrLeft.ToString();
            tbNrTicket.Text         = NrTicket.ToString();
            tbNrRegistered.Text     = NrRegistered.ToString();
            tbLoanI.Text            = ICRented.ToString();

            tbCampI.Text   = ICCamp.ToString();
            tbTicketI.Text = ICTicket.ToString();
            tbShopI.Text   = ICShop.ToString();
            tbTotalI.Text  = connection.GetTotalIncome().ToString();

            connection.GetNotAssignEmployee(comboEmployeeNotAssigned);
            connection.GetShopID(comboShopsLoanedID);
            connection.GetLoanID(comboShopsLoanedID);
            #endregion
            showTime          = new DispatcherTimer();
            showTime.Tick    += new EventHandler(ShowTime_Tick);
            showTime.Interval = TimeSpan.FromSeconds(1);
            showTime.Start();
            connection.Search("", datagridTable);
        }