private void signIn()
        {
            Autenticacion aut = Autenticacion.Instance;

            if (string.IsNullOrEmpty(txtUserName.Text))
            {
                errorProvider.SetError(txtUserName, "Debe llenar el usuario");
            }
            else
            {
                if (string.IsNullOrEmpty(txtPassword.Text))
                {
                    user       = txtUserName.Text;
                    subControl = 3;//para seleccionar solo por el usuario y verificar si existe;
                    dataTable  = aut.IniciarSeccion(user, password, subControl, ref resultadoOk, ref mensajeError);
                    if (dataTable.Rows.Count == 1)
                    {
                        panelPasswordContainer.Visible = true;
                        txtPassword.Focus();
                        txtUserName.Enabled   = false;
                        lblBienvenido.Visible = true;
                        btnBack.Visible       = true;
                        string nombre   = dataTable.Rows[0]["Doc_Nombre"].ToString();
                        string apellido = dataTable.Rows[0]["Doc_Apellido"].ToString();

                        if (!string.IsNullOrEmpty(dataTable.Rows[0]["Us_Foto"].ToString()))
                        {
                            byte[] imgageURL = (byte[])dataTable.Rows[0]["Us_Foto"];
                            imgUserLogin.Image = SolutionHelper.ConvertToImage(imgageURL);
                        }

                        lblUserInfoName.Text     = nombre;
                        lblUserInfoLastName.Text = apellido;
                        btnLogin.Text            = "Sing In";
                    }
                    else
                    {
                        MessageBox.Show("Usuario no Encontrado");
                    }
                }
                else
                {
                    password   = txtPassword.Text;
                    subControl = 2;//para seleccionar solo por el usuario y la contyrasena;
                    dataTable  = aut.IniciarSeccion(user, password, subControl, ref resultadoOk, ref mensajeError);
                    if (dataTable.Rows.Count == 1)
                    {
                        //El usuario  esta autenticado
                        Form_Principal FP = new Form_Principal();
                        FP.receiveUser(dataTable);
                        FP.Show();
                        Efecto.LimpiarForm(this);
                        this.Hide();
                        //this.Close();
                    }
                    else
                    {
                        errorProvider.SetError(txtPassword, "Contraseña Inavalida");
                    }
                }
            }
        }