Ejemplo n.º 1
0
        // GET: IRMA/Cap
        public ActionResult CapBook()
        {
            string[]    configSalt  = CommonMethods.GetIrmaConfig().Where(c => (c.ConfigKey == "SaltString" || c.ConfigKey == "bytePermutation1" || c.ConfigKey == "bytePermutation2" || c.ConfigKey == "bytePermutation3" || c.ConfigKey == "bytePermutation4") && c.IsActive == true).Select(c => c.ConfigValue).ToArray();
            string      key         = HttpContext.Session.SessionID + "_UserSessionInfo";
            UserSession userSession = (UserSession)HttpContext.Session[key];

            string culture = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName.ToUpper();

            //if (info != null)
            //    culture = info.Language;


            if (userSession == null)
            {
                return(RedirectToAction("Index", "Login", new { area = "Common" }));
            }
            string enscoPassport = userSession.Passport;
            string ensPassportId = Encryption.Encrypt(enscoPassport, configSalt);

            string tlcCapURL = string.Empty;
            IRMA_ConfigurationModel oConfig = CommonMethods.GetIrmaConfig().Where(c => c.ConfigKey == "TLCCapUrl" && c.IsActive == true).FirstOrDefault();

            if (oConfig != null)
            {
                tlcCapURL = oConfig.ConfigValue;
            }

            //string url = "http://localhost:88/RigCap?userId="+ HttpUtility.UrlEncode(ensPassportId);
            string url = this.GetTlcUrl() + "/RigCap?language=" + culture + "&userId=" + HttpUtility.UrlEncode(ensPassportId);

            var viewModel = new JobsController().SetupJobWindow("popupJobsHome", "Home", url, Session);

            return(View("ShowJobWindow", viewModel));
        }
Ejemplo n.º 2
0
        public ActionResult IrmaHomeEnscoCapPartial(IrmaHomeModel model)
        {
            string[]    configSalt  = CommonMethods.GetIrmaConfig().Where(c => (c.ConfigKey == "SaltString" || c.ConfigKey == "bytePermutation1" || c.ConfigKey == "bytePermutation2" || c.ConfigKey == "bytePermutation3" || c.ConfigKey == "bytePermutation4") && c.IsActive == true).Select(c => c.ConfigValue).ToArray();
            string      key         = HttpContext.Session.SessionID + "_UserSessionInfo";
            UserSession userSession = (UserSession)HttpContext.Session[key];

            string culture = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName.ToUpper();

            //if (info != null)
            //    culture = info.Language;


            if (userSession == null)
            {
                return(RedirectToAction("Index", "Login", new { area = "Common" }));
            }
            string enscoPassport = userSession.Passport;
            string ensPassportId = Encryption.Encrypt(enscoPassport, configSalt);

            string tlcCapURL = string.Empty;
            IRMA_ConfigurationModel oConfig = CommonMethods.GetIrmaConfig().Where(c => c.ConfigKey == "TLCCapUrl" && c.IsActive == true).FirstOrDefault();

            if (oConfig != null)
            {
                tlcCapURL = oConfig.ConfigValue;
            }

            //string url = "http://*****:*****@" EnscoPassportNo= ""{0}"" ", this.UserId));
            return(PartialView("IrmaHomeEnscoCapPartial"));
        }
Ejemplo n.º 3
0
        public ActionResult LearningEnrollment()
        {
            string[]    configSalt  = CommonMethods.GetIrmaConfig().Where(c => (c.ConfigKey == "SaltString" || c.ConfigKey == "bytePermutation1" || c.ConfigKey == "bytePermutation2" || c.ConfigKey == "bytePermutation3" || c.ConfigKey == "bytePermutation4") && c.IsActive == true).Select(c => c.ConfigValue).ToArray();
            string      key         = HttpContext.Session.SessionID + "_UserSessionInfo";
            UserSession userSession = (UserSession)HttpContext.Session[key];

            if (userSession == null)
            {
                return(RedirectToAction("Index", "Login", new { area = "Common" }));
            }

            string enscoPassport = userSession.Passport;
            string ensPassportId = Encryption.Encrypt(enscoPassport, configSalt);

            string tlcCapURL = string.Empty;
            IRMA_ConfigurationModel oConfig = CommonMethods.GetIrmaConfig().Where(c => c.ConfigKey == "TLCCapUrl" && c.IsActive == true).FirstOrDefault();

            if (oConfig != null)
            {
                tlcCapURL = oConfig.ConfigValue;
            }

            int    RigId    = UtilitySystem.Settings.RigId;
            string strRigId = Encryption.Encrypt(RigId.ToString(), configSalt);
            string url      = this.GetTlcUrl() + "/RigLearning/Index?UserId=" + HttpUtility.UrlEncode(ensPassportId);

            var viewModel = new JobsController().SetupJobWindow("popupJobsHome", "Home", url, Session);

            return(View("ShowJobWindow", viewModel));
        }