public CreditCardOfCustomers(string codeCreditCard) { CreditCardOfCustomersTable st = new CreditCardOfCustomersTable(); DataRow row = st.Find("codeCreditCard", codeCreditCard); this.numCreditCard = row["codeCreditCard"].ToString(); this.validityOfCreditCard = Convert.ToDateTime(row["validityOfCreditCard"]); this.idOwner = row["IDOwnerCard"].ToString(); this.codeOrder = Convert.ToInt32(row["CodeOrder"]); this.threeNumOnCard = Convert.ToInt32(row["ThreeNumOnCard"]); this.totalOfPrice = row["totalOfPrice"].ToString(); this.numOfPayments = Convert.ToInt32(row["numOfPayments"].ToString()); this.kindOfDeal = row["kindOfDeal"].ToString(); }
public DataRow BuildRow() { CreditCardOfCustomersTable st = new CreditCardOfCustomersTable(); DataTable stuTbl = st.Dt; DataRow newRow = stuTbl.NewRow(); newRow["codeCreditCard"] = this.codeCreditCard; newRow["numCreditCard"] = this.numCreditCard; newRow["validityOfCreditCard"] = this.validityOfCreditCard; newRow["IDOwnerCard"] = this.idOwner; newRow["CodeOrder"] = this.codeOrder; newRow["ThreeNumOnCard"] = this.threeNumOnCard; newRow["totalOfPrice"] = this.totalOfPrice; newRow["numOfPayments"] = this.numOfPayments; newRow["kindOfDeal"] = this.kindOfDeal; return(newRow); }