public Customers(string IDCust) { CustomersTable st = new CustomersTable(); DataRow row = st.Find("IDCust", IDCust); this.IDCust = row["IDCust"].ToString(); this.FirstNameCust = row["FirstNameCust"].ToString(); this.LustNameCust = row["LustNameCust"].ToString(); this.PhoneCust = row["PhoneCust"].ToString(); this.TPhoneCust = row["TPhoneCust"].ToString(); this.SityCust = row["SityCust"].ToString(); this.StreetCust = row["StreetCust"].ToString(); this.PostCode = row["PostCode"].ToString(); this.HomeNum = row["HomeNum"].ToString(); }
public DataRow BuildRow() { CustomersTable st = new CustomersTable(); DataTable stuTbl = st.Dt; DataRow newRow = stuTbl.NewRow(); newRow["IDCust"] = this.IDCust; newRow["FirstNameCust"] = this.FirstNameCust; newRow["LustNameCust"] = this.LustNameCust; newRow["PhoneCust"] = this.PhoneCust; newRow["TPhoneCust"] = this.TPhoneCust; newRow["SityCust"] = this.SityCust; newRow["StreetCust"] = this.StreetCust; newRow["PostCode"] = this.PostCode; newRow["HomeNum"] = this.HomeNum; return(newRow); }