324 lines
6.2 KiB
C#
324 lines
6.2 KiB
C#
using System;
|
|
|
|
namespace AyaNova.PlugIn.QBI
|
|
{
|
|
/// <summary>
|
|
/// Summary description for QBIData.
|
|
/// </summary>
|
|
[Serializable]
|
|
public class QBIData
|
|
{
|
|
// CString sCompFilePath;
|
|
// CString sCountry;
|
|
// long lVersion;
|
|
// long lPreWoStatus;
|
|
// long lPostWoStatus;
|
|
// CString strSubrepairChargeAs;
|
|
// CString strMiscPartsChargeAs;
|
|
// CString strQBClass;
|
|
// CString strTemplate;
|
|
// bool m_bSetMemoField;
|
|
|
|
//Test comment for subversion testing
|
|
|
|
private Guid _PreWOStatus=Guid.Empty;
|
|
private Guid _PostWOStatus=Guid.Empty;
|
|
private string _OutsideServiceChargeAs="";
|
|
private string _WorkorderItemLoanChargeAs="";
|
|
private string _MiscExpenseChargeAs="";
|
|
private string _QBInvoiceTemplate="";
|
|
private bool _SetMemoField=true;
|
|
private string _TransactionClass="";
|
|
private bool _ToBePrinted=true;
|
|
private string _InvoiceHeaderTemplate="";
|
|
private string _InvoiceFooterTemplate="";
|
|
private string _InvoiceUnitTemplate="";
|
|
private string _InvoiceServiceTemplate="";
|
|
private string _InvoiceTravelTemplate="";
|
|
private string _InvoiceOutsideServiceTemplate="";
|
|
private string _InvoiceMiscExpenseTemplate="";
|
|
private string _InvoiceLoanItemTemplate="";
|
|
|
|
public bool IsDirty=false;
|
|
|
|
|
|
public Guid PreWOStatus
|
|
{
|
|
get { return _PreWOStatus; }
|
|
set
|
|
{
|
|
if(_PreWOStatus!=value)
|
|
{
|
|
_PreWOStatus = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public Guid PostWOStatus
|
|
{
|
|
get { return _PostWOStatus; }
|
|
set
|
|
{
|
|
if(_PostWOStatus!=value)
|
|
{
|
|
_PostWOStatus = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string OutsideServiceChargeAs
|
|
{
|
|
get { return _OutsideServiceChargeAs; }
|
|
set
|
|
{
|
|
if(_OutsideServiceChargeAs!=value)
|
|
{
|
|
_OutsideServiceChargeAs = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
public string MiscExpenseChargeAs
|
|
{
|
|
get { return _MiscExpenseChargeAs; }
|
|
set
|
|
{
|
|
if(_MiscExpenseChargeAs!=value)
|
|
{
|
|
_MiscExpenseChargeAs = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string WorkorderItemLoanChargeAs
|
|
{
|
|
get { return _WorkorderItemLoanChargeAs; }
|
|
set
|
|
{
|
|
if(_WorkorderItemLoanChargeAs!=value)
|
|
{
|
|
_WorkorderItemLoanChargeAs = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
public string QBInvoiceTemplate
|
|
{
|
|
get { return _QBInvoiceTemplate; }
|
|
set
|
|
{
|
|
if(_QBInvoiceTemplate!=value)
|
|
{
|
|
_QBInvoiceTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
public bool SetMemoField
|
|
{
|
|
get { return _SetMemoField; }
|
|
set
|
|
{
|
|
if(_SetMemoField!=value)
|
|
{
|
|
_SetMemoField = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string TransactionClass
|
|
{
|
|
get { return _TransactionClass; }
|
|
set
|
|
{
|
|
if(_TransactionClass!=value)
|
|
{
|
|
_TransactionClass = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public bool ToBePrinted
|
|
{
|
|
get { return _ToBePrinted; }
|
|
set
|
|
{
|
|
if(_ToBePrinted!=value)
|
|
{
|
|
_ToBePrinted = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceHeaderTemplate
|
|
{
|
|
get { return _InvoiceHeaderTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceHeaderTemplate!=value)
|
|
{
|
|
_InvoiceHeaderTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceFooterTemplate
|
|
{
|
|
get { return _InvoiceFooterTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceFooterTemplate!=value)
|
|
{
|
|
_InvoiceFooterTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceUnitTemplate
|
|
{
|
|
get { return _InvoiceUnitTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceUnitTemplate!=value)
|
|
{
|
|
_InvoiceUnitTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceServiceTemplate
|
|
{
|
|
get { return _InvoiceServiceTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceServiceTemplate!=value)
|
|
{
|
|
_InvoiceServiceTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceTravelTemplate
|
|
{
|
|
get { return _InvoiceTravelTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceTravelTemplate!=value)
|
|
{
|
|
_InvoiceTravelTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceOutsideServiceTemplate
|
|
{
|
|
get { return _InvoiceOutsideServiceTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceOutsideServiceTemplate!=value)
|
|
{
|
|
_InvoiceOutsideServiceTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceMiscExpenseTemplate
|
|
{
|
|
get { return _InvoiceMiscExpenseTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceMiscExpenseTemplate!=value)
|
|
{
|
|
_InvoiceMiscExpenseTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public string InvoiceLoanItemTemplate
|
|
{
|
|
get { return _InvoiceLoanItemTemplate; }
|
|
set
|
|
{
|
|
if(_InvoiceLoanItemTemplate!=value)
|
|
{
|
|
_InvoiceLoanItemTemplate = value;
|
|
IsDirty=true;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public bool HasInvoiceHeaderTemplate
|
|
{
|
|
get
|
|
{
|
|
return _InvoiceHeaderTemplate!="";
|
|
}
|
|
}
|
|
|
|
public bool HasAnyInvoiceFooterTemplateFields
|
|
{
|
|
get
|
|
{
|
|
if(this._InvoiceFooterTemplate!="" ||
|
|
this._InvoiceUnitTemplate!="" ||
|
|
this._InvoiceServiceTemplate!="" ||
|
|
this._InvoiceTravelTemplate!="" ||
|
|
this._InvoiceLoanItemTemplate!="" ||
|
|
this._InvoiceMiscExpenseTemplate!="" ||
|
|
this._InvoiceOutsideServiceTemplate!=""
|
|
)
|
|
return true;
|
|
else
|
|
return false;
|
|
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Flag indicating whether user has configured
|
|
/// QBI at all yet, this is used to present a description
|
|
/// of the configuration that is about to take place to the user
|
|
///
|
|
/// If this is false then any missing option is considered a one-off
|
|
/// and no general initial description is given to the user about setting
|
|
/// up QBI
|
|
/// </summary>
|
|
public bool NothingSet
|
|
{
|
|
get
|
|
{
|
|
if(_PreWOStatus==Guid.Empty &&
|
|
_PostWOStatus==Guid.Empty &&
|
|
_OutsideServiceChargeAs=="" &&
|
|
_WorkorderItemLoanChargeAs=="" &&
|
|
_MiscExpenseChargeAs=="" &&
|
|
_TransactionClass=="" &&
|
|
_QBInvoiceTemplate=="") return true;
|
|
return false;
|
|
|
|
}
|
|
}
|
|
|
|
public QBIData()
|
|
{
|
|
//
|
|
// TODO: Add constructor logic here
|
|
//
|
|
}
|
|
}
|
|
}
|