Exemplo n.º 1
0
        //one argument class constructor
        public RunAutomation(Platform platform)
        {
            this.platform = platform;

            #region Reference initialization
            helperObj        = new Helper();
            mainPageObj      = new MainPage();
            loginPageObj     = new LoginPage();
            comptTempObj     = new ComptTempPage();
            actStockObj      = new ActualStockPage();
            comptEditObj     = new ComptEditPage();
            comptCapacityObj = new ComptCapacity();
            selShiftObj      = new ShiftStartPage();
            trpStartObj      = new TripStartPage();
            trvlToObj        = new TravellingToPage();
            kmCtrlObj        = new KMControlPage();
            xlRdrObj         = new ExcelReader();
            comptStatusObj   = new ComptStatusPage();
            cnfrmDepotObj    = new ConfirmDepotPage();
            cnfrmNameObj     = new ConfirmNamePage();
            plannedLdgObj    = new PlannedLoading();
            actualLdgObj     = new ActualLoading();
            ldgSummaryObj    = new LoadingSummary();
            ldgInfoObj       = new LoadingInfo();
            ovrdCodeobj      = new OverrideNoMixCode();
            comptAssgnObj    = new ComptAssignmentPage();
            custSelObj       = new CustomerSelection();
            delDetailsObj    = new DeliveryDetails();
            custArrivalObj   = new CustomerArrival();
            plndDelDetObj    = new PlannedDeliveryDetails();
            rvwTnkDipsObj    = new ReviewTankDips();
            delSchemeObj     = new DeliveryScheme();
            prodDschgObj     = new ProductDischarge();
            cnfrmDelObj      = new ConfirmDelivery();
            adrobj           = new ADRStart();
            breakObj         = new BreakPage();
            tripendObj       = new TripEndPage();
            shiftendObj      = new ShiftEndPage();
            #endregion

            xlRdrObj.GetCompleteExcelData();
            isSpotTrailer = Convert.ToBoolean(xlRdrObj.GetValueFromSheet("TrailerDetails", "SpotTrailer"));
            noOfCompt     = xlRdrObj.GetValueFromSheet("TrailerDetails", "NoOfCompartments");
            comptCapacity = xlRdrObj.GetValueFromSheet("TrailerDetails", "CompartmentCapacity");
            tankNo1       = xlRdrObj.GetValueFromSheet("TrailerDetails", "TankNumber1");
            tankNo2       = xlRdrObj.GetValueFromSheet("TrailerDetails", "TankNumber2");
            tankNo3       = xlRdrObj.GetValueFromSheet("TrailerDetails", "TankNumber3");
            stockVal1     = Convert.ToInt32(xlRdrObj.GetValueFromSheet("TrailerDetails", "StockValue1"));
            stockVal2     = Convert.ToInt32(xlRdrObj.GetValueFromSheet("TrailerDetails", "StockValue2"));
            stockVal3     = Convert.ToInt32(xlRdrObj.GetValueFromSheet("TrailerDetails", "StockValue3"));
            stockVal      = stockVal1 + stockVal1 + stockVal3;

            calculatedValue = new int[Convert.ToUInt32(noOfCompt)];
        }
 private void OnButtonConfirmDeliveryClick(object o, EventArgs e)
 {
     ConfirmDelivery?.Invoke();
 }