示例#1
0
 public int SoSanh(Mon m)
 {
     if (this.MaMon == m.MaMon)
     {
         return(0);
     }
     else if (this.MaMon > m.MaMon)
     {
         return(1);
     }
     else
     {
         return(-1);
     }
 }
示例#2
0
        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();
 }
示例#4
0
 public void XoaMon(Mon m)
 {
     this.dsMon.Remove(m);
 }
示例#5
0
 public void ThemMon(Mon m)
 {
     this.dsMon.Add(m);
 }