IN FORM
< public ObservableCollection laccountsnav;
public ObservableCollection laccount;
>
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Windows;
using System;
namespace CollectAppWpf
{
public class TBAccount
{
private string connMain = Properties.Settings.Default.collect1ConnectionString;
private string connSys = Properties.Settings.Default.ffCollectsysConnectionString;
public class Account : INotifyPropertyChanged
{
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(PropertyChangedEventArgs e)
{
if (this.PropertyChanged != null)
{
PropertyChanged(this, e);
this.lchanged = true;
}
}
#endregion
private string _gaccountid;
public string gaccountid
{
get { return _gaccountid; }
set
{
_gaccountid = value;
OnPropertyChanged(new PropertyChangedEventArgs("gaccountid"));
}
}
private string _caccountid;
public string caccountid
{
get { return _caccountid; }
set
{
_caccountid = value;
OnPropertyChanged(new PropertyChangedEventArgs("caccountid"));
}
}
private string _gclientid;
public string gclientid
{
get { return _gclientid; }
set
{
_gclientid = value;
OnPropertyChanged(new PropertyChangedEventArgs("gaccountid"));
}
}
private string _ccompanyname;
public string ccompanyname
{
get { return _ccompanyname; }
set
{
_ccompanyname = value;
OnPropertyChanged(new PropertyChangedEventArgs("ccompanyname"));
}
}
private string _csiccodeid;
public string csiccodeid
{
get { return _csiccodeid; }
set
{
_csiccodeid = value;
OnPropertyChanged(new PropertyChangedEventArgs("csiccodeid"));
}
}
private string _ckey;
public string ckey
{
get { return _ckey; }
set { _ckey = value; }
}
private string _caddr1;
public string caddr1
{
get { return _caddr1; }
set
{
_caddr1 = value;
OnPropertyChanged(new PropertyChangedEventArgs("caddr1"));
}
}
private System.Nullable _tlcall;
public System.Nullable tlcall
{
get
{
return this._tlcall;
}
set
{
if ((this._tlcall != value))
{
this._tlcall = value;
OnPropertyChanged(new PropertyChangedEventArgs("tlcall"));
}
}
}
private bool _lchanged;
public bool lchanged
{
get { return _lchanged; }
set { _lchanged = value; }
}
private bool _ladded;
public bool ladded
{
get { return _ladded; }
set { _ladded = value; }
}
private bool _ldeleted;
public bool ldeleted
{
get { return _ldeleted; }
set { _ldeleted = value; }
}
public Account(string _gaccountid, string _caccountid, string _gclientid,
string _ccompanyname, string _csiccodeid, string _ckey, string _caddr1,
DateTime _tlcall, bool _lchanged, bool _ladded, bool _ldeleted)
{
gaccountid = _gaccountid;
caccountid = _caccountid;
gclientid = _gclientid;
ccompanyname = _ccompanyname;
csiccodeid = _csiccodeid;
ckey = _ckey;
caddr1 = _caddr1;
tlcall = _tlcall;
lchanged = _lchanged;
ladded = _ladded;
ldeleted = _ldeleted;
}
} // account class
public class AccountNav
{
private string _gaccountid;
public string gaccountid
{
get { return _gaccountid; }
set { _gaccountid = value; }
}
private string _caccountid;
public string caccountid
{
get { return _caccountid; }
set { _caccountid = value; }
}
private string _clname;
public string clname
{
get { return _clname; }
set { _clname = value; }
}
private string _cfname;
public string cfname
{
get { return _cfname; }
set { _cfname = value; }
}
private string _ckey;
public string ckey
{
get { return _ckey; }
set { _ckey = value; }
}
public AccountNav(string _gaccountid, string _caccountid, string _clname, string _cfname,
string _ckey)
{
gaccountid = _gaccountid;
caccountid = _caccountid;
clname = _clname;
cfname = _cfname;
ckey = _ckey;
}
} // accountnav class
}
}
|