private void btnAceptar_Click(object sender, EventArgs e)
        {
            txtClaveNew.Text = txtClaveNew.Text.Trim();
            txtClaveConfNew.Text = txtClaveConfNew.Text.Trim();

            //string LcClaveAntigua = fungen.EncryptStr(txtClave.Text.Trim().ToLower(), "key");
            //string LcClaveAntigua = VariablesPublicas.Encriptar(txtClave.Text.Trim(), "SI");
            string LcClaveAntigua = VariablesPublicas.Encripta(txtClave.Text.Trim());

            //string NewClave = fungen.EncryptStr(txtClaveNew.Text.Trim().ToLower(), "key");
            //string NewClave = VariablesPublicas.Encriptar(txtClaveNew.Text.Trim(), "SI");
            string NewClave = VariablesPublicas.Encripta(txtClaveNew.Text.Trim());

            //string NewClaveConfirma = fungen.EncryptStr(txtClaveConfNew.Text.Trim().ToLower(), "key");
            //string NewClaveConfirma = VariablesPublicas.Encriptar(txtClaveConfNew.Text.Trim(), "SI");
            string NewClaveConfirma = VariablesPublicas.Encripta(txtClaveConfNew.Text.Trim());

            if (!(Equivalencias.Left(LcClaveAntigua,20) == Cursor01.Rows[0]["password"].ToString().Trim()))
            //if (!(LcClaveAntigua == Cursor01.Rows[0]["password"].ToString().Trim()))
            {
                MessageBox.Show("Confirme Clave Antigua...", "Mensaje del Sistema");
                txtClave.Focus();
                return;
            }
            if (!(NewClave == NewClaveConfirma))
            {
                MessageBox.Show("Confirme Nueva Clave...", "Mensaje del Sistema");
                txtClaveConfNew.Focus();
                return;
            }
            Cursor01.Rows[0]["password"] = NewClaveConfirma;
            usuariosxprocesoBL BL = new usuariosxprocesoBL();
            tb_usuariosxproceso BE = new tb_usuariosxproceso();

            BE.procesoid = _TipoProceso;
            BE.ntipo = 1;
            //if (UsuariosProcesosInsertUpdated(_TipoProceso, Cursor01, 1))
            if (BL.UsuariosProcesosInsertUpdated(VariablesPublicas.EmpresaID.ToString(), BE, Cursor01))
            {
                MessageBox.Show("Clave ha sido modificada satisfactoriamente...?", "Mensaje del Sistema");
                Close();
            }
        }
        public void Guardar()
        {
            int ncont = 0;
            dgOrdenes.EndEdit();
            oDetalle.AcceptChanges();
            for (ncont = 0; ncont <= oDetalle.Rows.Count - 1; ncont++)
            {
                oDetalle.Rows[ncont]["uprocesoid"] = cboProceso.SelectedValue;
            }
            usuariosxprocesoBL BL = new usuariosxprocesoBL();
            tb_usuariosxproceso BE = new tb_usuariosxproceso();

            BE.procesoid = cboProceso.SelectedValue.ToString().Trim();
            BE.ntipo = 0;
            if (BL.UsuariosProcesosInsertUpdated(VariablesPublicas.EmpresaID.ToString(), BE, oDetalle) == true)
            {
                HabilitarBotones(true);
                HabilitarControles(true);
                CargaData();
            }
            else
            {
                Frm_Class.ShowError(BL.Sql_Error, this);
            }
        }