Пример #1
0
        /// <summary>
        /// Cargamos el Formulario de Autenticación
        /// </summary>
        private void LoadAuthenticationForm()
        {
            ///Busco el wrapper que refiere (apunta) a servicios SOA de seguridad .- Para este sistema el front siempre apuntara a WrapperSecurityProvider
            SecurityServiceCalls.WrapperSecurityProvider = System.Configuration.ConfigurationManager.AppSettings["WrapperSecurityProvider"].ToString();

            //Formulario de autentizacion .- (user,pwd + institucion a la que se quire loguear)
            Health.Front.Environment.FRM_AuthenticationForm_ASPNet wAuthForm = new Health.Front.Environment.FRM_AuthenticationForm_ASPNet();
            wAuthForm.Text             = string.Concat("Iniciar sesión ", Health.Front.Base.Properties.Resource.Health32Name);
            wAuthForm.Auth_Title_Image = Health.Front.Base.Properties.Resource.Group_Security;
            wAuthForm.Auth_Title_Text  = "Autenticación";
            wAuthForm.InitCredentials(storage);

            if (wAuthForm.ShowDialog() == DialogResult.OK)
            {
                storage.StorageObject.User     = FormBase.Principal.Identity.Name;
                storage.StorageObject.Password = wAuthForm.Password;
                //GetProfesionalRes res = Controller.GetProfesional(null, false, false, Guid.Parse(frmBase_TabForm.IndentityUserInfo.ProviderId.ToString()));

                //Controller.CurrentProfesional = res.BusinessData.profesional;

                storage.StorageObject.HealthInstitutionId   = ServiceCalls.CurrentHealthInstitution.HealthInstitutionId;
                storage.StorageObject.HealthInstitutionName = ServiceCalls.CurrentHealthInstitution.RazonSocial;
                this.iHealtInst_Info.Caption            = string.Concat("Inicio sesion en: ", ServiceCalls.CurrentHealthInstitution.RazonSocial);
                this.statusBarItem_Usuario.Caption      = String.Concat(this.statusBarItem_Usuario.Caption, " ", ServiceCalls.CurrentProfesional.Persona.ApellidoNombre);
                this.statusBarItem_Especialidad.Caption = String.Concat(this.statusBarItem_Especialidad.Caption, " ", ServiceCalls.CurrentProfesional.NombreEspecialidad);
                storage.Save();
            }
            else
            {
                this.Close();
            }
        }
Пример #2
0
        /// <summary>
        /// Cargamos el Formulario de Autenticación
        /// </summary>
        private void LoadAuthenticationForm()
        {
            SecurityController.WrapperSecurityProvider = System.Configuration.ConfigurationManager.AppSettings["WrapperSecurityProvider"].ToString();
            Health.Front.Environment.FRM_AuthenticationForm_ASPNet wAuthForm = new Health.Front.Environment.FRM_AuthenticationForm_ASPNet();
            wAuthForm.Text             = string.Concat("Iniciar sesión ", Health.Front.Properties.Resources.Health32Name);
            wAuthForm.Auth_Title_Image = Health.Front.Properties.Resources.Group_Security;
            wAuthForm.Auth_Title_Text  = "Autenticación";
            wAuthForm.InitCredentials(storage);

            if (wAuthForm.ShowDialog() == DialogResult.OK)
            {
                storage.StorageObject.User     = FormBase.Principal.Identity.Name;
                storage.StorageObject.Password = wAuthForm.Password;
                //GetProfesionalRes res = Controller.GetProfesional(null, false, false, (Guid)frmBase_TabForm.IndentityUserInfo.ProviderId);

                //Controller.CurrentProfesional = res.BusinessData.profesional;

                storage.StorageObject.HealthInstitutionId   = Controller.CurrentHealthInstitution.HealthInstitutionId;
                storage.StorageObject.HealthInstitutionName = Controller.CurrentHealthInstitution.RazonSocial;
                this.iHealtInst_Info.Caption            = string.Concat("Inicio sesion en: ", Controller.CurrentHealthInstitution.RazonSocial);
                this.statusBarItem_Usuario.Caption      = String.Concat(this.statusBarItem_Usuario.Caption, " ", Controller.CurrentProfesional.Persona.ApellidoNombre);
                this.statusBarItem_Especialidad.Caption = String.Concat(this.statusBarItem_Especialidad.Caption, " ", Controller.CurrentProfesional.NombreEspecialidad);
                storage.Save();
            }
            else
            {
                this.Close();
            }
        }