内容发布更新时间 : 2024/12/26 3:42:37星期一 下面是文章的全部内容请认真阅读。
set { try {
this.fName = value; if (this.fName == \{
throw new Exception(
\} }
catch(Exception e) {
throw new Exception(e.Message.ToString()); } } } ///
/// Property LastName (String) ///
public String LName { get {
学游戏,就上我学院!www.woxueyuan.com
return this.lName; } set {
//could be more checkings here eg revmove ' chars //change to proper case //blah blah this.lName = value; if (this.LName == \{
throw new Exception(\} } } ///
/// Property Customer ID (String) ///
public String cusID { get {
return this.cusId; } set
学游戏,就上我学院!www.woxueyuan.com
{
this.cusId = value; if (this.cusID == \{
throw new Exception(\} } } ///
/// Property Address (String) ///
public String Address { get {
return this.address; } set {
this.address = value;
if (this.Address == \
{
throw new Exception(\}
学游戏,就上我学院!www.woxueyuan.com
} } ///
/// Property Telephone (String) ///
public String Tel { get {
return this.tel; } set {
this.tel = value; if (this.Tel == \{
throw new Exception(\} } } ///
/// Function Add new customer. Calls /// the function in Data layer. ///
学游戏,就上我学院!www.woxueyuan.com
public void Add() {
cusData.Add(this); } ///
/// Function Update customer details. /// Calls the function in Data layer. ///
public void Update() {
cusData.Update(this); } ///
/// Function Find customer. Calls the /// function in Data layer.
/// It returns the details of the customer using /// customer ID via a Dataset to GUI tier. ///
public DataSet Find(String str) {
if (str == \
throw new Exception(\DataSet data = null; data = cusData.Find(str);
学游戏,就上我学院!www.woxueyuan.com