Beispiel #1
0
 public void xoa(object obj, sosanh ss)
 {
     for (int i = ds.Count - 1; i >= 0; i--)
     {
         if (ss(obj, this[i]) == 0)
         {
             this.ds.RemoveAt(i);
         }
     }
 }
Beispiel #2
0
        public sinhvien tim(object obj, sosanh ss)
        {
            sinhvien svresult = null;

            foreach (sinhvien sinhvien in ds)
            {
                if (ss(obj, sinhvien) == 0)
                {
                    svresult = sinhvien;
                    break;
                }
            }
            return(svresult);
        }
Beispiel #3
0
            public SinhVien tim(object obj, sosanh ss)
            {
                SinhVien res = null;

                foreach (SinhVien sv in ds)
                {
                    if (ss(obj, sv) == 0)
                    {
                        res = sv;
                        break;
                    }
                }
                return(res);
            }
Beispiel #4
0
        public bool sua(sinhvien sv, object obj, sosanh ss)
        {
            bool kq = false;

            for (int i = 0; i < ds.Count - 1; i++)
            {
                if (ss(obj, this[i]) == 0)
                {
                    this[i] = sv;
                    kq      = true;
                    break;
                }
            }
            return(kq);
        }
Beispiel #5
0
            public bool sua(SinhVien svedit, object obj, sosanh ss)
            {
                int  i, count;
                bool kq = false;

                count = this.ds.Count - 1;
                for (i = 0; i < count; i++)
                {
                    if (ss(obj, this[i]) == 0)
                    {
                        this[i] = svedit;
                        kq      = true;
                        break;
                    }
                }
                return(kq);
            }