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

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


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

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

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

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

            NrRegisteredlb = ChartPoint =>
                             string.Format("{0} ({1:P})", NrRegistered, 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);
        }