//---------------------------------------------------------------------------------------------
// This file was AUTO-GENERATED by "SPA Views" Xomega.Net generator.
//
// Manual CHANGES to this file WILL BE LOST when the code is regenerated.
//---------------------------------------------------------------------------------------------

import { SalesOrderDetailObject } from 'DataObjects/Sales/SalesOrderDetailObjectCustomized';
import { DetailsViewModel, ViewParams } from 'xomega';
import * as controls from 'xomega-controls';

class SalesOrderDetailView extends DetailsViewModel {

    public obj: SalesOrderDetailObject;

    public constructor() {
        super();
        this.DetailsObject = this.obj = new SalesOrderDetailObject();
    }

    protected getBaseTitle(): string {
        return 'Line Item Detail';
    }

    public attached(view, parent) {
        if (this.Params[ViewParams.Mode] == ViewParams.ModePopup)
            controls.modalViewPopup(this, view);
        else if (this.Params[ViewParams.Mode] == ViewParams.ModeInline)
            controls.vSplitViewPopup(this, view);
    }
}

export = SalesOrderDetailView;
