private void Frm_Planilla_RubrosCopiar_Activated(object sender, EventArgs e)
        {
            if (sw_Load)
            {
                cmbtiporubro.ValueMember = "codigo";
                cmbtiporubro.DisplayMember = "descripcion";
                var BLI = new tb_plla_tab0100BL();
                var BEI = new tb_plla_tab0100();

                BEI.norden = 2;
                cmbtiporubro.DataSource = BLI.gspTbPllaTipoRubro(VariablesPublicas.EmpresaID.ToString(), BEI).Tables[0];

                cmbtipoplanillaorigen.ValueMember = "tipoplla";
                cmbtipoplanillaorigen.DisplayMember = "tipopllaname";
                var BL = new tb_plla_tipoplanillaBL();
                var BE = new tb_plla_tipoplanilla();

                BE.norden = 1;
                BE.ver_blanco = 0;
                cmbtipoplanillaorigen.DataSource = BL.GetAll_Consulta(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];

                cmbtipoplanilladestino.ValueMember = "tipoplla";
                cmbtipoplanilladestino.DisplayMember = "tipopllaname";
                cmbtipoplanilladestino.DataSource = BL.GetAll_Consulta(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
                if (_LpTipoRubro.Trim().Length > 0)
                {
                    cmbtiporubro.SelectedValue = _LpTipoRubro;
                }
                if (_LpPlanillaOrigen.Trim().Length > 0)
                {
                    cmbtipoplanillaorigen.SelectedValue = _LpTipoRubro;
                }
                if (_LpPlanillaDestino.Trim().Length > 0)
                {
                    cmbtipoplanilladestino.SelectedValue = _LpPlanillaDestino;
                }
                U_RefrescaControles();
                sw_Load = false;
            }
        }
        private void Frm_RubrosGeneralesPlanilla_Activated(object sender, EventArgs e)
        {
            if (Sw_LOad)
            {
                cmbtipo.ValueMember = "codigo";
                cmbtipo.DisplayMember = "descripcion";
                var BLI = new tb_plla_tab0100BL();
                var BEI = new tb_plla_tab0100();
                BEI.norden = 2;
                cmbtipo.DataSource = BLI.gspTbPllaTipoRubro(VariablesPublicas.EmpresaID.ToString(), BEI).Tables[0];

                cmbfiltrotipo.ValueMember = "codigo";
                cmbfiltrotipo.DisplayMember = "descripcion";
                cmbfiltrotipo.DataSource = BLI.gspTbPllaTipoRubro(VariablesPublicas.EmpresaID.ToString(), BEI).Tables[0];

                for (lc_contador = 0; lc_contador <= DataGridView1.ColumnCount - 1; lc_contador++)
                {
                    DataGridView1.Columns[lc_contador].SortMode = DataGridViewColumnSortMode.NotSortable;
                }
                U_RefrescaControles();
                CargaDatos();
                U_RefrescaControles();
                Sw_LOad = false;
            }
        }