Ejemplo n.º 1
0
        private async Task setExternalCondition(TankSummaryReader tsr)
        {
            //goto and edit
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdExternalInspectionCondition");
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            //set all the values
            List <string> areas = new List <string>()
            {
                "Compound",
                "Vandalism",
                "Walls",
                "Ladder External",
                "Entry Hatch",
                "Roof Platforms",
                "Walkways",
                "Roof",
                "Roof Hatches",
                "Handrails",
                "Davit",
                "Ventilation",
                "Bird Proofing",
                "Electrical",
                "Level Indicator"
            };

            foreach (string area in areas)
            {
                await setCondition(tsr, ReportSection.External, area);
            }

            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSaveMain");
        }
Ejemplo n.º 2
0
        private async Task setInternalCondition(TankSummaryReader tsr)
        {
            //goto and edit
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdInternalInspectionCondition");
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            //set all the values
            List <string> areas = new List <string>()
            {
                "Walls",
                "Columns",
                "Roof Spider",
                "Roof Framing",
                "Floor", "Inlet",
                "Outlet",
                "Scour",
                "Overflow",
                "Mixer Motor",
                "Supports",
                "Ladder Internal",
                "Electrical"
            };

            foreach (string area in areas)
            {
                await setCondition(tsr, ReportSection.Internal, area);
            }

            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSave");
        }
Ejemplo n.º 3
0
        private async Task setInternalComments(TankSummaryReader tsr)
        {
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdInternalInspectionComments");
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            await setText("ctl00_ContentPlaceHolder1_txtComment", tsr.intComment);

            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSaveMain");
        }
Ejemplo n.º 4
0
        private async Task setGeneralComments(TankSummaryReader tsr)
        {
            //goto commoents and edit
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdComments");
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            //put all in structural
            await setText("ctl00_ContentPlaceHolder1_txtStructuralComment", tsr.genComment);

            //save
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSaveExecutiveSummary");
        }
Ejemplo n.º 5
0
        private async Task setCondition(TankSummaryReader tsr, ReportSection section, string areaName)
        {
            //create the userId's in here
            ReportArea ra = tsr.getReport(section, areaName);

            if (ra != null)
            {
                string prefix = "ctl00_ContentPlaceHolder1_";
                await setDropdown(string.Format("{0}cmbPriority{1}", prefix, areaName.Replace(" ", string.Empty)), ra.ratingInt);
                await setDropdown(string.Format("{0}cmbStatus{1}", prefix, areaName.Replace(" ", string.Empty)), ra.ratingLetter);
                await setText(string.Format("{0}txtComment{1}", prefix, areaName.Replace(" ", string.Empty)), ra.comment);
            }
        }
Ejemplo n.º 6
0
        private async Task setExternalGeneral(TankSummaryReader tsr)
        {
            //goto and edit
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdExternalInspectionGeneral");
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            //set coatings and structre
            await setDropdown("ctl00_ContentPlaceHolder1_cmbStructure", tsr.getReport(ReportSection.General, "Structure Ext").ratingInt);
            await setDropdown("ctl00_ContentPlaceHolder1_cmbCoatings", tsr.getReport(ReportSection.General, "Coatings Ext").ratingInt);

            //save
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSave");
        }
Ejemplo n.º 7
0
        private async Task setGeneralGeneral(TankSummaryReader tsr)
        {
            //goto general
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdGeneral");

            //edit
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            //Securit, contamination, safety
            await setDropdown("ctl00_ContentPlaceHolder1_cmbSecurity", tsr.getReport(ReportSection.General, "Security").ratingInt);
            await setText("ctl00_ContentPlaceHolder1_txtSecurityComment", tsr.getReport(ReportSection.General, "Security").comment);
            await setDropdown("ctl00_ContentPlaceHolder1_cmbContamination", tsr.getReport(ReportSection.General, "Contamination").ratingInt);
            await setText("ctl00_ContentPlaceHolder1_txtContaminationComment", tsr.getReport(ReportSection.General, "Contamination").comment);
            await setDropdown("ctl00_ContentPlaceHolder1_cmbSafety", tsr.getReport(ReportSection.General, "Safety").ratingInt);
            await setText("ctl00_ContentPlaceHolder1_txtSafetyComment", tsr.getReport(ReportSection.General, "Safety").comment);

            //save
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSave");
        }
Ejemplo n.º 8
0
        private async Task setInternalGeneral(TankSummaryReader tsr)
        {
            //goto and edit
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdInternalInspectionGeneral");
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdEdit");

            //set coatings and structre
            string structInt = tsr.getReport(ReportSection.General, "Structure Int").ratingInt;

            checkMinIntIsNotZero(ref structInt);

            string coatInt = tsr.getReport(ReportSection.General, "Coatings Int").ratingInt;

            checkMinIntIsNotZero(ref coatInt);

            await setDropdown("ctl00_ContentPlaceHolder1_cmbStructure", structInt);
            await setDropdown("ctl00_ContentPlaceHolder1_cmbCoatings", coatInt);

            //save
            await navigateAndWait("ctl00_ContentPlaceHolder1_cmdSaveMain");
        }
Ejemplo n.º 9
0
        private async Task UploadSummary(string fileLocation)
        {
            TankSummaryReader tsr = new TankSummaryReader(fileLocation);

            myWebBrowser.LoadCompleted += myWebBrowser_LoadCompletedSummary;

            await setGeneralGeneral(tsr);
            await setGeneralComments(tsr);

            await setExternalGeneral(tsr);
            await setExternalCondition(tsr);
            await setExternalComments(tsr);

            await setInternalGeneral(tsr);
            await setInternalCondition(tsr);
            await setInternalComments(tsr);

            //set up for imageupload
            await navigateAndWait("ctl00_ContentPlaceHolder1_WcMenuResLh1_cmdInsertAttachment");

            myWebBrowser.LoadCompleted -= myWebBrowser_LoadCompletedSummary;
        }