Beispiel #1
0
        private void dashBoardClicked(object sender, EventArgs e)
        {
            this.groupBox3.Visible = true;
            this.groupBox4.Visible = true;
            this.groupBox5.Visible = true;

            //get all the data
            // count the total order in groupBox3

            OrderRepository or = new OrderRepository();

            this.totalOrderLabel.Text  = "Total Order : " + Convert.ToString(or.countAllOrder());
            this.totalBikeLabel.Text   = "Bike : " + Convert.ToString(or.countOrder("Bike"));
            this.totalCarLabel.Text    = "Car : " + Convert.ToString(or.countOrder("Car"));
            this.totalAutoLabel.Text   = "Cng : " + Convert.ToString(or.countOrder("Cng"));
            this.totalMicroLabel.Text  = "Microbus : " + Convert.ToString(or.countOrder("Microbus"));
            this.totalPickupLabel.Text = "Pickup : " + Convert.ToString(or.countOrder("Pickup"));
            this.totalTruckLabel.Text  = "Truck : " + Convert.ToString(or.countOrder("Truck"));


            //count the total Inventory in groupBox4

            InventoryRepository ir = new InventoryRepository();

            this.totalInventoryLabel.Text = "Total Inventory : " + Convert.ToString(ir.countAllInventory());
            this.totalBikeILabel.Text     = "Bike :" + Convert.ToString(ir.countInventory("Bike"));
            this.totalCarILabel.Text      = "Car :" + Convert.ToString(ir.countInventory("Car"));
            this.totalAutoILabel.Text     = "Cng :" + Convert.ToString(ir.countInventory("Cng"));
            this.totalMicroILabel.Text    = "Microbus :" + Convert.ToString(ir.countInventory("Microbus"));
            this.totalPickupILabel.Text   = "Pickup :" + Convert.ToString(ir.countInventory("Pickup"));
            this.totalTruckILabel.Text    = "Truck :" + Convert.ToString(ir.countInventory("Truck"));


            //count all shipment

            ShipmentRepository sr = new ShipmentRepository();

            this.totalShipmentLabel.Text = "Total Shipment : " + Convert.ToString(sr.countAllShipment());
            this.atOriginLabel.Text      = "At Origin : " + Convert.ToString(sr.countShipment("At Origin"));
            this.onTheWayLabel.Text      = "On the Way : " + Convert.ToString(sr.countShipment("On the Way"));
            this.stuckedLabel.Text       = "Stucked : " + Convert.ToString(sr.countShipment("Stuked"));
            this.atDestinationLabel.Text = "At Destination : " + Convert.ToString(sr.countShipment("At Destination"));
            this.shippedLabel.Text       = "Shipped : " + Convert.ToString(sr.countShipment("Shipped"));



            this.dataGrid2.Visible = false;
            this.dataGrid3.Visible = false;
            this.dataGrid4.Visible = false;

            this.groupBox1.Visible = false;
            this.groupBox2.Visible = false;
        }
Beispiel #2
0
        public Sales()
        {
            InitializeComponent();



            this.dataGrid2.Visible = false;
            this.dataGrid3.Visible = false;
            this.dataGrid4.Visible = false;

            this.groupBox1.Visible = false;
            this.groupBox2.Visible = false;

            //dashBoard text
            this.groupBox3.Visible = true;
            this.groupBox4.Visible = true;
            this.groupBox5.Visible = true;

            // init the ID from inventory table in this combobox
            InventoryRepository m     = new InventoryRepository();
            List <string>       allId = m.GetAllId();

            foreach (string id in allId)
            {
                this.comboBox1.Items.Add(id);
            }


            OrderRepository or = new OrderRepository();

            this.totalOrderLabel.Text  = "Total Order : " + Convert.ToString(or.countAllOrder());
            this.totalBikeLabel.Text   = "Bike : " + Convert.ToString(or.countOrder("Bike"));
            this.totalCarLabel.Text    = "Car : " + Convert.ToString(or.countOrder("Car"));
            this.totalAutoLabel.Text   = "Cng : " + Convert.ToString(or.countOrder("Cng"));
            this.totalMicroLabel.Text  = "Microbus : " + Convert.ToString(or.countOrder("Microbus"));
            this.totalPickupLabel.Text = "Pickup : " + Convert.ToString(or.countOrder("Pickup"));
            this.totalTruckLabel.Text  = "Truck : " + Convert.ToString(or.countOrder("Truck"));


            //count the total Inventory in groupBox4

            InventoryRepository ir = new InventoryRepository();

            this.totalInventoryLabel.Text = "Total Inventory : " + Convert.ToString(ir.countAllInventory());
            this.totalBikeILabel.Text     = "Bike :" + Convert.ToString(ir.countInventory("Bike"));
            this.totalCarILabel.Text      = "Car :" + Convert.ToString(ir.countInventory("Car"));
            this.totalAutoILabel.Text     = "Cng :" + Convert.ToString(ir.countInventory("Cng"));
            this.totalMicroILabel.Text    = "Microbus :" + Convert.ToString(ir.countInventory("Microbus"));
            this.totalPickupILabel.Text   = "Pickup :" + Convert.ToString(ir.countInventory("Pickup"));
            this.totalTruckILabel.Text    = "Truck :" + Convert.ToString(ir.countInventory("Truck"));


            //count all shipment

            ShipmentRepository sr = new ShipmentRepository();

            this.totalShipmentLabel.Text = "Total Shipment : " + Convert.ToString(sr.countAllShipment());
            this.atOriginLabel.Text      = "At Origin : " + Convert.ToString(sr.countShipment("At Origin"));
            this.onTheWayLabel.Text      = "On the Way : " + Convert.ToString(sr.countShipment("On the Way"));
            this.stuckedLabel.Text       = "Stucked : " + Convert.ToString(sr.countShipment("Stuked"));
            this.atDestinationLabel.Text = "At Destination : " + Convert.ToString(sr.countShipment("At Destination"));
            this.shippedLabel.Text       = "Shipped : " + Convert.ToString(sr.countShipment("Shipped"));
        }
        public AdminDashboard()
        {
            InitializeComponent();

            //marketing Info
            MarketingRepository mr = new MarketingRepository();

            this.totalCampaigns.Text = "Total Campaigns : " + Convert.ToString(mr.countAllCampaigns());

            this.appCampaign.Text = "Approved Campaigns : " + Convert.ToString(mr.countAllApprovedCampaigns("Approved"));



            //Hr Info
            EmployeeRepository m = new EmployeeRepository();

            this.label123.Text += Convert.ToString(m.countAllEmployee());
            this.label129.Text += Convert.ToString(m.countEmployee("Admin"));
            this.label125.Text += Convert.ToString(m.countEmployee("Sales"));
            this.label127.Text += Convert.ToString(m.countEmployee("Marketing"));
            this.label124.Text += Convert.ToString(m.countEmployee("Human Resource"));
            this.label126.Text += Convert.ToString(m.countEmployee("Accounting"));
            this.label128.Text += Convert.ToString(m.countEmployee("Finance"));

            this.label120.Text += Convert.ToString(m.countAllStatus("Full Time"));
            this.label119.Text += Convert.ToString(m.countAllStatus("Probationary"));
            this.label118.Text += Convert.ToString(m.countAllStatus("Intern"));

            //sales Info



            //get all the data
            // count the total order in groupBox3

            OrderRepository or = new OrderRepository();

            this.label117.Text = "Total Order : " + Convert.ToString(or.countAllOrder());
            this.label114.Text = "Bike : " + Convert.ToString(or.countOrder("Bike"));
            this.label108.Text = "Car : " + Convert.ToString(or.countOrder("Car"));
            this.label111.Text = "Cng : " + Convert.ToString(or.countOrder("Cng"));
            this.label112.Text = "Microbus : " + Convert.ToString(or.countOrder("Microbus"));
            this.label92.Text  = "Pickup : " + Convert.ToString(or.countOrder("Pickup"));
            this.label90.Text  = "Truck : " + Convert.ToString(or.countOrder("Truck"));


            //count the total Inventory in groupBox4

            InventoryRepository ir = new InventoryRepository();

            this.label73.Text  = "Total Inventory : " + Convert.ToString(ir.countAllInventory());
            this.label138.Text = "Bike :" + Convert.ToString(ir.countInventory("Bike"));
            this.label135.Text = "Car :" + Convert.ToString(ir.countInventory("Car"));
            this.label136.Text = "Cng :" + Convert.ToString(ir.countInventory("Cng"));
            this.label137.Text = "Microbus :" + Convert.ToString(ir.countInventory("Microbus"));
            this.label134.Text = "Pickup :" + Convert.ToString(ir.countInventory("Pickup"));
            this.label133.Text = "Truck :" + Convert.ToString(ir.countInventory("Truck"));


            //count all shipment

            ShipmentRepository sr = new ShipmentRepository();

            this.label52.Text = "Total Shipment : " + Convert.ToString(sr.countAllShipment());
            this.label72.Text = "At Origin : " + Convert.ToString(sr.countShipment("At Origin"));
            this.label66.Text = "On the Way : " + Convert.ToString(sr.countShipment("On the Way"));
            this.label70.Text = "Stucked : " + Convert.ToString(sr.countShipment("Stuked"));
            this.label71.Text = "At Destination : " + Convert.ToString(sr.countShipment("At Destination"));
            this.label68.Text = "Shipped : " + Convert.ToString(sr.countShipment("Shipped"));

            //accounting

            AccountingRepository ar = new AccountingRepository();

            this.totalCashLabel.Text = "totalCash : " + Convert.ToString(ar.countTotalCash());
        }