﻿derive(PanelSubCtrl, ClassBase);
function PanelSubCtrl() {
	
    override(this, 'Init');
    this.Init = function() {
        this.ClassBase_Init(arguments[0],arguments[1],arguments[2]);
        if(Designer_obj) {
            this.Property_Add(40, 'Formulario', 'DataSourceAll', 'SubForm', 'SubForm', '');
            this.Property_Add(41, 'Form. User', 'DataSourceAll', 'GuestFormID', 'GuestFormID', '');
            this.Property_Add(42, 'Inicializar con', 'DataSourceFilter', 'DataSourceIDOne', 'DataSourceID');
            this.Property_Add(43, 'Campos', 'Field', 'DataItemFieldOne', 'DataItemFieldOne');
            this.Property_Add(44, 'Forma', 'Combo', 'HtmlDisplay', 'HtmlDisplay','inline-block,block');
        }
    }
    
    this.set_SubForm = function(aValue) {
        this.Frm[this.FrmCount + 1] = aValue;
        this.set_Width('');
        this.set_Height('');
        if(Designer_obj)
            setTimeout('Designer_obj.Render()',500);
    }
    this.get_SubForm = function() {
        return this.Frm[this.FrmCount + 1];
    }
    
	this.set_HiddenClient = function(aValue) {
        var lref = document.getElementById(this.ClientId);
        lref.style.display = aValue ? 'none' : 'inline-block';
	}

    this.set_DataSourceID = function(aValue) {
        this.Frm[this.FrmCount + 2] = aValue;
    }
    this.get_DataSourceID = function() {
        return this.Frm[this.FrmCount + 2];
    }
    this.get_DataSourceIDOne = function() {
        return this.Frm[this.FrmCount + 2].split(',')[0];
    }

    this.set_DataSourceFilter = function(aValue) {
        this.Frm[this.FrmCount + 3] = aValue;
    }
    this.get_DataSourceFilter = function() {
        return this.Frm[this.FrmCount + 3];
    }

    this.set_DataSourceOrder = function(aValue) {
        this.Frm[this.FrmCount + 4] = aValue;
    }
    this.get_DataSourceOrder = function() {
        return this.Frm[this.FrmCount + 4];
    }
    
    this.set_DataSourceTop = function(aValue) {
        this.Frm[this.FrmCount + 5] = aValue;
    }
    this.get_DataSourceTop = function() {
        return this.Frm[this.FrmCount + 5];
    }

    this.set_DataSourceType = function(aValue) {
        this.Frm[this.FrmCount + 6] = aValue;
    }
    this.get_DataSourceType = function() {
        return this.Frm[this.FrmCount + 6];
    }

    this.get_DataItemField = function() {
        return this.Frm[this.FrmCount + 7];
    }
    this.set_DataItemField = function(aValue) {
        this.Frm[this.FrmCount + 7] = aValue;
    }

    this.get_DataItemFieldOne = function() {
        return this.Frm[this.FrmCount + 7].split('_')[0].split('.')[0];
    }
    this.set_DataItemFieldOne = function(aValue) {
        this.Frm[this.FrmCount + 7] = aValue;
    }

    this.set_DataSourceKey = function(aValue) {
        this.Frm[this.FrmCount + 8] = aValue;
    }
    this.get_DataSourceKey = function() {
        return this.Frm[this.FrmCount + 8];
    }

    this.set_DataSourceSql = function(aValue) {
        this.Frm[this.FrmCount + 9] = aValue;
    }
    this.get_DataSourceSql = function() {
        return this.Frm[this.FrmCount + 9];
    }

    this.set_GuestFormID = function(aValue) {
        this.Frm[this.FrmCount + 10] = aValue;
    }
    this.get_GuestFormID = function() {
        return this.Frm[this.FrmCount + 10];
    }

    this.set_HtmlDisplay = function(aValue) {
        this.Frm[this.FrmCount + 11] = aValue;
    }
    this.get_HtmlDisplay = function() {
        return this.Frm[this.FrmCount + 11];
    }
}
