private void Data_Tablafamiliadet()
        {
            try
            {
                if (Tablafamiliadet.Rows.Count > 0)
                {
                    Tablafamiliadet.Rows.Clear();
                }
                var BL = new tb_pt_familiadetBL();
                var BE = new tb_pt_familiadet();

                if (cboModuloID.SelectedIndex != -1)
                {
                    BE.moduloid = cboModuloID.SelectedValue.ToString();
                    BE.lineaid = tejidoid.SelectedValue.ToString();
                    BE.familiaid = familiaid.Text.ToString();
                    Tablafamiliadet = BL.GetAll(EmpresaID, BE).Tables[0];
                    if (Tablafamiliadet.Rows.Count > 0)
                    {
                        btn_imprimir.Enabled = true;
                        mdi_dgb_familia.DataSource = Tablafamiliadet;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void data_Tablafamiliateladet()
        {
            try
            {
                if (Tablafamiliateladet.Rows.Count > 0)
                {
                    Tablafamiliateladet.Rows.Clear();
                }
                var BL = new tb_pt_familiadetBL();
                var BE = new tb_pt_familiadet();

                BE.familianame = txt_criterio.Text.Trim().ToUpper();

                Tablafamiliateladet = BL.GetAll(EmpresaID, BE).Tables[0];
                if (Tablafamiliateladet.Rows.Count > 0)
                {
                    btn_imprimir.Enabled = true;

                    mdi_dgb_familia.DataSource = Tablafamiliateladet;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }