private void form_cargar_datos(String posicion)
        {
            try
            {
                limpiar_documento();
                var BL = new tb_cm_liquidacabBL();
                var BE = new tb_cm_liquidacab();
                var dt = new DataTable();

                BE.moduloid = moduloiddes.SelectedValue.ToString();
                BE.local = local.Trim();
                BE.tipdoc = tipdoc.Text.Trim();
                BE.serdoc = moduloiddes.SelectedValue.ToString();

                if (serdoc.Text.Trim().Length == 0)
                {
                    if (posicion.Trim().Length > 0)
                    {
                        MessageBox.Show("Seleccionar el Tipo de Documento !!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    return;
                }

                var n_doc = string.Empty;
                if (numdoc.Text.Trim().Length > 0)
                {
                    n_doc = numdoc.Text.Trim().PadLeft(6, '0');
                }

                BE.numdoc = serdoc.Text.ToString().Trim() + n_doc.ToString().Trim();
                BE.posicion = posicion.Trim();

                dt = BL.GetAll_paginacion(EmpresaID, BE).Tables[0];

                if (dt.Rows.Count > 0)
                {
                    activeDoc = false;
                    limpiar_documento();
                    form_bloqueado(false);
                    ssModo = "EDIT";

                    var BL2 = new tb_60movimientoscabBL();
                    var BE2 = new tb_60movimientoscab();
                    var dt2 = new DataTable();
                    var n = dt.Rows[0]["numdoc"].ToString().Trim();

                    serdoc.Text = Equivalencias.Left(n, 4);
                    numdoc.Text = Equivalencias.Right(n, 6);

                    tipguia.Text = dt.Rows[0]["tipref"].ToString().Trim();
                    serguia.Text = dt.Rows[0]["serref"].ToString().Trim();
                    numguia.Text = dt.Rows[0]["numref"].ToString().Trim();

                    cif.Text = dt.Rows[0]["cif"].ToString().Trim();
                    dua.Text = dt.Rows[0]["dua"].ToString().Trim();
                    gas_impo.Text = dt.Rows[0]["gas_impo"].ToString().Trim();
                    gas_financ.Text = dt.Rows[0]["gas_financ"].ToString().Trim();
                    tot_bimp.Text = dt.Rows[0]["tot_bimp"].ToString().Trim();
                    factorincre.Text = dt.Rows[0]["factorincre"].ToString().Trim();

                    moduloiddes.SelectedValue = dt.Rows[0]["moduloid"].ToString().Trim();
                    data_cbo_localdes(dominioiddes, moduloiddes.SelectedValue.ToString());
                    localdes.SelectedValue = dt.Rows[0]["local"].ToString().Trim();

                    BE2.moduloid = moduloiddes.SelectedValue.ToString();
                    BE2.local = localdes.SelectedValue.ToString();
                    BE2.tipodoc = tipguia.Text.ToString();
                    BE2.serdoc = serguia.Text.ToString();
                    BE2.numdoc = numguia.Text;

                    dt2 = BL2.GetAll2(EmpresaID, BE2).Tables[0];

                    if (dt2.Rows.Count > 0)
                    {
                        tipfac.Text = dt2.Rows[0]["tipfac"].ToString();
                        serfac.Text = dt2.Rows[0]["serfac"].ToString();
                        numfac.Text = dt2.Rows[0]["numfac"].ToString();

                        tipref.Text = dt2.Rows[0]["tipref"].ToString();
                        numdococ1.Text = Equivalencias.Left(dt2.Rows[0]["numref"].ToString(), 4);
                        numdococ.Text = Equivalencias.Right(dt2.Rows[0]["numref"].ToString(), 6);
                        ctacte.Text = dt2.Rows[0]["ctacte"].ToString();
                        ctactename.Text = dt2.Rows[0]["ctactename"].ToString();
                    }

                    _CargarDetalleImportacion();

                    if (dt.Rows[0]["status"].ToString().Trim() != "9")
                    {
                        btn_nuevo.Enabled = true;
                        btn_editar.Enabled = true;
                        btn_eliminar.Enabled = true;
                        btn_imprimir.Enabled = true;
                        btn_primero.Enabled = true;
                        btn_anterior.Enabled = true;
                        btn_siguiente.Enabled = true;
                        btn_ultimo.Enabled = true;
                        btn_salir.Enabled = true;
                        pictureEdit1.Visible = false;
                    }
                    else
                    {
                        ssModo = "ANULADO";
                        if (TablaDetalleImportacion2.Rows.Count > 0)
                        {
                            TablaDetalleImportacion2.Clear();
                        }
                        dgb_importacion2.DataSource = TablaDetalleImportacion2;
                        pictureEdit1.Visible = true;
                        btn_editar.Enabled = false;
                        btn_eliminar.Enabled = false;
                        btn_nuevo.Enabled = true;
                        btn_imprimir.Enabled = true;

                        btn_primero.Enabled = true;
                        btn_anterior.Enabled = true;
                        btn_siguiente.Enabled = true;
                        btn_ultimo.Enabled = true;
                        btn_salir.Enabled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }