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; }
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(); /* * 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")); * * * 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"));*/ this.hrGraph2.Visible = false; this.hrGraph.Series["emp"].Points.AddXY("Admin", m.countEmployee("Admin")); this.hrGraph.Series["emp"].Points.AddXY("Sales", m.countEmployee("Sales")); this.hrGraph.Series["emp"].Points.AddXY("HR", m.countEmployee("Human Resource")); this.hrGraph.Series["emp"].Points.AddXY("IT", m.countEmployee("IT")); this.hrGraph.Series["emp"].Points.AddXY("Accounts", m.countEmployee("Accounting")); this.hrGraph.Series["emp"].Points.AddXY("Finance", m.countEmployee("Finance")); this.hrGraph.Series["emp"].Points.AddXY("Marketing", m.countEmployee("Marketing")); this.hrGraph2.Series["Status"].Points.AddXY("Full Time", m.countAllStatus("Full Time")); this.hrGraph2.Series["Status"].Points.AddXY("Probationary", m.countAllStatus("Probationary")); this.hrGraph2.Series["Status"].Points.AddXY("Intern", 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")); */ /* this.orderGraph.Series["Order"].Points.AddXY("Bike:" + Convert.ToString(or.countOrder("Bike")), or.countOrder("Bike")); * this.orderGraph.Series["Order"].Points.AddXY("Car:" + Convert.ToString(or.countOrder("Car")), or.countOrder("Car") ); * this.orderGraph.Series["Order"].Points.AddXY("Cng:" + Convert.ToString(or.countOrder("Cng")), or.countOrder("Cng")); * this.orderGraph.Series["Order"].Points.AddXY("Microbus:" + Convert.ToString(or.countOrder("Microbus")), or.countOrder("Microbus")); * this.orderGraph.Series["Order"].Points.AddXY("Pickup:" + Convert.ToString(or.countOrder("Pickup")), or.countOrder("Pickup")); * this.orderGraph.Series["Order"].Points.AddXY("Truck:"+ Convert.ToString(or.countOrder("Truck")), or.countOrder("Truck"));*/ this.orderGraph.Series["Order"].Points.AddXY("Bike", or.countOrder("Bike")); this.orderGraph.Series["Order"].Points.AddXY("Car", or.countOrder("Car")); this.orderGraph.Series["Order"].Points.AddXY("Cng", or.countOrder("Cng")); this.orderGraph.Series["Order"].Points.AddXY("Microbus", or.countOrder("Microbus")); this.orderGraph.Series["Order"].Points.AddXY("Pickup", or.countOrder("Pickup")); this.orderGraph.Series["Order"].Points.AddXY("Truck", 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")); */ this.inventoryGraph.Series["Inventory"].Points.AddXY("Bike", ir.countInventory("Bike")); this.inventoryGraph.Series["Inventory"].Points.AddXY("Car", ir.countInventory("Car")); this.inventoryGraph.Series["Inventory"].Points.AddXY("Cng", ir.countInventory("Cng")); this.inventoryGraph.Series["Inventory"].Points.AddXY("Microbus", ir.countInventory("Microbus")); this.inventoryGraph.Series["Inventory"].Points.AddXY("Pickup", ir.countInventory("Pickup")); this.inventoryGraph.Series["Inventory"].Points.AddXY("Truck", 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")); */ this.shipmentGraph.Series["Shipment"].Points.AddXY("At Origin", sr.countShipment("At Origin")); this.shipmentGraph.Series["Shipment"].Points.AddXY("On the Way", sr.countShipment("On the Way")); this.shipmentGraph.Series["Shipment"].Points.AddXY("Stucked", sr.countShipment("Stuked")); this.shipmentGraph.Series["Shipment"].Points.AddXY("At Destination", sr.countShipment("At Destination")); this.shipmentGraph.Series["Shipment"].Points.AddXY("Shipped", sr.countShipment("Shipped")); //accounting AccountingRepository ar = new AccountingRepository(); // this.totalCashLabel.Text = "totalCash : " + Convert.ToString(ar.countTotalCash()); }