public bool isDirty() { int netSizeID = netSize.id; NetSize netSizeCopy = new NetSize(); netSizeCopy.id = netSizeID; netSizeCopy.select(); return !netSize.compare(netSizeCopy); }
public NetSize getRelatedNetSize() { if (!isValid(new List<string>() { "prName", "pID" })) return null; string sqlCommand = String.Format(@"select nsID from NetSize where prID={0}", prID); Sql sql = new Sql(); SqlDataReader reader = sql.selectNetSizeIDByPrID(sqlCommand); if (!reader.HasRows) return null; reader.Read(); NetSize netSize = new NetSize(); netSize.id = Int32.Parse(reader[0].ToString()); netSize.select(); return netSize; }