protected void btnValidateQuestions_Click(object sender, EventArgs e) { try { bool valid = true; tblQuestions.Visible = false; if (txtQuestion1.Text.ToUpper().Replace(" ", "") != CompanySubsidy.NombreJefePersonal.ToUpper().Replace(" ", "")) { valid = false; } if (txtQuestion2.Text != CompanySubsidy.NIT) { valid = false; } /*El objeto no tiene el siguiente dato if (txtQuestion3.Text != CompanySubsdy.) { valid = false; }*/ /* El objeto UserSubsidy no tiene dato para comparar if (txtQuestion4.Text != UserSubsdy.ActividadEconomica) { valid = false; }*/ /* El objeto UserSubsidy no tiene dato para comparar if (txtQuestion5.Text != UserSubsdy.MesAfilicacion) { valid = false; }*/ if (valid) { BLL.UserCompanyNewBLL userCompanyNewBLL = new CAFAM.WebPortal.BLL.UserCompanyNewBLL(SPContext.Current.Web); BLL.UserBLL userBLL = new CAFAM.WebPortal.BLL.UserBLL(SPContext.Current.Web); if (!userCompanyNewBLL.ExistsIdentificationInList(rdIdentificationType.SelectedItem.Text, txtIdNum.Text) && userBLL.GetUserByIdentificationtAndCompanyCompanyUser(rdIdentificationType.SelectedItem.Text, txtIdNum.Text, txtNit.Text, txtSubNit.Text) == null) { tblPrincipal.Visible = true; lblNit.Text = CompanySubsidy.NIT; lblSubNIT.Text = CompanySubsidy.SubNIT; lblCompanyName.Text = CompanySubsidy.RazonSocial; lblIdentificationType.Text = rdIdentificationType.SelectedItem.Text; lblIdentificatioNumber.Text = txtIdNum.Text; } else { lblError.Visible = true; lblError.Text = "Ya existe un usuario registrado para esta empresa. Si olvido su contraseña puede restablecerla "; lnkCommon.NavigateUrl = "~/_layouts/restorepassword.aspx"; lnkCommon.Text = "aqui."; lnkCommon.Visible = true; } } else { lblError.Visible = true; lblError.Text = "Sus respuestas a las preguntas de identificación difieren con la información que tenemos. Si desea contactarse con Cafam por favor esriba un mensaje debajo y envíelo"; tblContact.Visible = true; } } catch(Exception ex) { CAFAM.WebPortal.ErrorLogger.ErrorLogger.Log(ex, ref lblError, ConfigurationSettings.AppSettings["LogInEventViewer"]); } }