Exemple #1
0
        public ActionResult EmergencyTeams()
        {
            EmergencyTeamReport report = new EmergencyTeamReport();

            report.RigName.Value  = Ensco.Utilities.UtilitySystem.Settings.RigName;
            report.LogoFile.Value = HttpContext.Server.MapPath("~/Images/ensco.png");
            report.IrmaFile.Value = HttpContext.Server.MapPath("~/Images/irma.png");

            IIrmaServiceDataModel dataModel = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.EmergencyTeamReportView);

            List <dynamic> list = dataModel.GetAllItems();

            string yesUrl = HttpContext.Server.MapPath("~/Images/Yes.png");
            string noUrl  = HttpContext.Server.MapPath("~/Images/No.png");

            foreach (EmergencyTeamReportModel item in list)
            {
                item.ImageUrlNo  = System.IO.File.ReadAllBytes(HttpContext.Server.MapPath("~/Images/No.png"));
                item.ImageUrlYes = System.IO.File.ReadAllBytes(HttpContext.Server.MapPath("~/Images/Yes.png"));
            }
            report.DataSource = list;

            Session["currentReport"] = report;

            return(RedirectToAction("ShowReport", "Report"));
        }
Exemple #2
0
        // GET: IRMA/Report

        public ActionResult RosterSignInByMusterStationReport()
        {
            RosterSignInByMusterStation report = new RosterSignInByMusterStation();

            report.RigName.Value  = Ensco.Utilities.UtilitySystem.Settings.RigName;
            report.LogoFile.Value = HttpContext.Server.MapPath("~/Images/ensco.png");
            report.IrmaFile.Value = HttpContext.Server.MapPath("~/Images/irma.png");

            IIrmaServiceDataModel  dataModel = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.RosterByMusterStation);
            List <RosterUserModel> list      = dataModel.GetAllItems().Cast <RosterUserModel>().ToList();

            report.DataSource = list;

            Session["currentReport"] = report;

            //PopupModel popupModel = new PopupModel();
            //popupModel.Name = "RosterSignInByMusterStationReport";
            //popupModel.Title = "Roster SignIn By Muster Station";
            //popupModel.AllowResize = true;
            //popupModel.MaximizeBox = true;
            //popupModel.ContentUrl = Url.Action("ShowReportPartial", "Report", new { Area = "IRMA" });
            //popupModel.Data = report;
            //Session["PopupModel"] = popupModel;

            //return RedirectToAction("EnscoPopup", "Common", new { Area = "Common" });

            return(RedirectToAction("ShowReport", "Report"));
        }
Exemple #3
0
        public ActionResult RigAdminFieldsVisiblePartial()
        {
            RigAdminManageModel manageRigModel = (RigAdminManageModel)Session["manageRigModel"];

            manageRigModel.SelectedPersonnelRigId = UtilitySystem.Settings.RigId;
            IIrmaServiceDataModel rigReqs = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.RigFieldVisible);

            if (rigReqs != null)
            {
                manageRigModel.FieldsVisible = rigReqs.GetAllItems();
            }

            return(PartialView("RigAdminFieldsVisiblePartial", manageRigModel));
        }
Exemple #4
0
        public ActionResult RosterSignInReport()
        {
            RosterSignInSheet report = new RosterSignInSheet();

            report.RigName.Value  = Ensco.Utilities.UtilitySystem.Settings.RigName;
            report.LogoFile.Value = HttpContext.Server.MapPath("~/Images/ensco.png");
            report.IrmaFile.Value = HttpContext.Server.MapPath("~/Images/irma.png");

            IIrmaServiceDataModel  dataModel = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.RosterFull);
            List <RosterUserModel> list      = dataModel.GetAllItems().Cast <RosterUserModel>().ToList();

            report.DataSource        = list;
            Session["currentReport"] = report;

            return(RedirectToAction("ShowReport", "Report"));
        }
Exemple #5
0
        public ActionResult RoomBedSummaryReport()
        {
            RoomBedSummaryReport report = new RoomBedSummaryReport();

            report.RigName.Value  = Ensco.Utilities.UtilitySystem.Settings.RigName;
            report.LogoFile.Value = HttpContext.Server.MapPath("~/Images/ensco.png");
            report.IrmaFile.Value = HttpContext.Server.MapPath("~/Images/irma.png");

            IIrmaServiceDataModel dataModel = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.RoomBedSummary);

            report.DataSource = dataModel.GetAllItems();

            Session["currentReport"] = report;

            return(RedirectToAction("ShowReport", "Report"));
        }
Exemple #6
0
        public ActionResult RigAdminFieldsVisibleUpdate(RigFieldVisibilityModel model)
        {
            RigAdminManageModel manageRigModel = (RigAdminManageModel)Session["manageRigModel"];

            if (ModelState.IsValid)
            {
                IIrmaServiceDataModel   rigReqs     = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.RigFieldVisible);
                RigFieldVisibilityModel entityModel = rigReqs.GetItem(string.Format("Id={0}", model.Id), "Id");
                if (entityModel != null)
                {
                    entityModel.Visible = model.Visible;
                    entityModel.Name    = model.Name;
                    rigReqs.Update(entityModel);
                    manageRigModel.FieldsVisible = rigReqs.GetAllItems();
                }
            }

            return(PartialView("RigAdminFieldsVisiblePartial", manageRigModel));
        }
Exemple #7
0
        static public LookupListModel <dynamic> GetLookupList(JobConstants.LookupLists type)
        {
            IIrmaServiceDataModel     dataModel = null;
            LookupListModel <dynamic> model     = new LookupListModel <dynamic>();

            model.Name = type.ToString();
            string filter = null;

            switch (type)
            {
            }

            if (dataModel != null)
            {
                model.Items = (filter != null) ? dataModel.GetItems(filter, "Id") : dataModel.GetAllItems();
            }

            model.Initialize();

            return(model);
        }