private void btnInformation_Click(object sender, EventArgs e)
        {
            sys_formulariosBL BL = new sys_formulariosBL();
            tb_sys_formulario BE = new tb_sys_formulario();
            DataTable DataFunc = new DataTable();

            BE.dominioid = VariablesPublicas.Dominioid;
            BE.moduloid = VariablesDominio.VarVentas.Moduloid;
            BE.formname = this.Name;
            DataFunc = BL.GetAll(VariablesPublicas.EmpresaID, BE).Tables[0];

            if (DataFunc.Rows.Count > 0)
            {
                //Frm_webbrowser_single frm = new Frm_webbrowser_single();
                //frm.webBrowser1.DocumentText = DataFunc.Rows[0]["formfunc"].ToString().Trim();
                //frm.ShowDialog();
            }
        }
        private void btn_information_Click(object sender, EventArgs e)
        {
            var BL = new sys_formulariosBL();
            var BE = new tb_sys_formulario();
            var DataFunc = new DataTable();

            BE.dominioid = dominioid;  //VariablesPublicas.Dominioid;
            BE.moduloid = moduloid;    //VariablesPublicas.Moduloid;
            BE.formname = Name;
            DataFunc = BL.GetAll(VariablesPublicas.EmpresaID, BE).Tables[0];

            if (DataFunc.Rows.Count > 0)
            {
                var frm = new Popup.Frm_webbrowser_single();
                frm.webBrowser1.DocumentText = DataFunc.Rows[0]["formfunc"].ToString().Trim();
                frm.ShowDialog();
            }
        }
        private void Update()
        {
            try
            {
                if (txtnameform.Text.Trim().Length == 0)
                {
                    MessageBox.Show("Falta Nombre del Formulario!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    if (txtfunciones.Text.Trim().Length == 0)
                    {
                        MessageBox.Show("Falta Ingresar las Funciones!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    else
                    {
                        var BE = new tb_sys_formulario();
                        var BL = new sys_formulariosBL();

                        BE.dominioid = cmb_dominio.SelectedValue.ToString();
                        BE.moduloid = cmb_modulo.SelectedValue.ToString();
                        BE.formname = txtnameform.Text;
                        BE.formfunc = txtfunciones.Text;
                        BE.feact = Convert.ToDateTime(fechdoc.Text);

                        if (BL.Update(VariablesPublicas.EmpresaID, BE))
                        {
                            MessageBox.Show("Datos Modificado Correctamente !!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            procesado = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void Delete()
        {
            try
            {
                if (txtnameform.Text.Trim().Length == 0)
                {
                    MessageBox.Show("Falta Nombre del Formulario!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    if (txtfunciones.Text.Trim().Length == 0)
                    {
                        MessageBox.Show("Falta Ingresar las Funciones!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    else
                    {
                        var BE = new tb_sys_formulario();
                        var BL = new sys_formulariosBL();

                        BE.dominioid = cmb_dominio.SelectedValue.ToString();
                        BE.moduloid = cmb_modulo.SelectedValue.ToString();
                        BE.formname = txtnameform.Text;

                        if (BL.Delete(VariablesPublicas.EmpresaID, BE))
                        {
                            MessageBox.Show("Datos Eliminado correctamente !!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            Data_TablaFormulario();
                            limpiar_documento();
                            bloqueo(false);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void Data_TablaFormulario()
        {
            try
            {
                if (TablaFormulario.Rows.Count > 0)
                {
                    TablaFormulario.Rows.Clear();
                }
                var BL = new sys_formulariosBL();
                var BE = new tb_sys_formulario();

                BE.dominioid = cmb_dominio.SelectedValue.ToString();
                BE.moduloid = cmb_modulo.SelectedValue.ToString();

                TablaFormulario = BL.GetAll(VariablesPublicas.EmpresaID, BE).Tables[0];
                if (TablaFormulario.Rows.Count > 0)
                {
                    dgv_formularios.DataSource = TablaFormulario;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btn_information_Click(object sender, EventArgs e)
        {
            var BL = new sys_formulariosBL();
            var BE = new tb_sys_formulario();
            var DataFunc = new DataTable();

            BE.dominioid = VariablesPublicas.Dominioid;
            BE.moduloid = VariablesPublicas.Moduloid;
            BE.formname = Name;
            DataFunc = BL.GetAll(VariablesPublicas.EmpresaID, BE).Tables[0];
        }