public int SoSanh(Mon m) { if (this.MaMon == m.MaMon) { return(0); } else if (this.MaMon > m.MaMon) { return(1); } else { return(-1); } }
public void TaiDuLieu() { DataTable dt = Program.GetDataMon(); foreach (DataRow dr in dt.Rows) { Mon m = new Mon(); m.MaMon = int.Parse(dr["MaMon"].ToString()); m.TenMon = dr["TenMon"].ToString(); m.GiaBan = float.Parse(dr["GiaBan"].ToString()); m.GhiChu = dr["GhiChu"].ToString(); this.ThemMon(m); } }
public void SetUp() { fMon = new Mon(); }
public void XoaMon(Mon m) { this.dsMon.Remove(m); }
public void ThemMon(Mon m) { this.dsMon.Add(m); }