protected void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                Commons.EmailHelper emailHelper = new CAFAM.WebPortal.Commons.EmailHelper(SPContext.Current.Web);

                //emailHelper.SendContactMailNewMemberUser(ConfigurationSettings.AppSettings["ContactNewUserTo"], ConfigurationSettings.AppSettings["ContactNewUserFrom"], txtContact.Text, ConfigurationSettings.AppSettings["SMTPServer"], UserSubsdy.PrimerNombre + " " + UserSubsdy.PrimerApellido);

                emailHelper.SendContactMailNewMemberUser(ConfigurationSettings.AppSettings["ContactNewUserTo"], ConfigurationSettings.AppSettings["ContactNewUserFrom"], txtContact.Text, UserSubsdy.PrimerNombre + " " + UserSubsdy.PrimerApellido);

                lblError.Visible = true;
                lblError.Text = "Mensaje enviado correctamente";
                lnkCommon.Visible = true;
                lnkCommon.NavigateUrl = "./default.aspx";

                tblContact.Visible = false;
            }
            catch (Exception ex)
            {
                CAFAM.WebPortal.ErrorLogger.ErrorLogger.Log(ex, ref lblError, ConfigurationSettings.AppSettings["LogInEventViewer"]);
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                SPWeb web = SPContext.Current.Web;
                BLL.UserBLL userBLL = new BLL.UserBLL(web);
                string message;

                Entities.User userEntity = AssignDataToEntity();
                if (userBLL.GetUserByIdentificationtAndCompanyCompanyUser(userEntity.IdentificationType, userEntity.IdentificationNumber, userEntity.NIT, userEntity.SubNIT) == null)
                {
                    if (!userBLL.CreateUser(userEntity, out message))
                    {
                        lblError.Text = message;
                    }
                    else
                    {
                        lblError.Text = "El proceso de registro ha finalizado exitosamente. ";
                        lblError.Visible = true;
                        lnkGoHome.Visible = true;
                        tblPrincipal.Visible = false;

                        Commons.EmailHelper emailHelper = new CAFAM.WebPortal.Commons.EmailHelper(SPContext.Current.Web);

                        //emailHelper.SendMailNewCompanyUserData(ConfigurationSettings.AppSettings["ContactNewUserCompanyFrom"], ConfigurationSettings.AppSettings["SMTPServer"], userEntity);
                        emailHelper.SendMailNewCompanyUserData(ConfigurationSettings.AppSettings["ContactNewUserCompanyFrom"], userEntity);
                    }
                }
                else
                {
                    lblError.Text = "Ya existe un usuario registrado para esta empresa. ";
                }
                lblError.Visible = true;

            }
            catch (Exception ex)
            {
                CAFAM.WebPortal.ErrorLogger.ErrorLogger.Log(ex, ref lblError, ConfigurationSettings.AppSettings["LogInEventViewer"]);
            }
        }