Пример #1
0
 public int CapNhat(Bai obj)
 {
     if (!InMemoryDatabase.BaiTable.ContainsKey(obj.ID))
         return 0;
     InMemoryDatabase.BaiTable[obj.ID] = obj;
     return 1;
 }
Пример #2
0
 public Test(int id, Bai bai, int diem, string moTa)
 {
     ID = id;
     bai.ID = bai.ID;
     Diem = diem;
     MoTa = moTa;
 }
Пример #3
0
 public Test(int id, Bai bai, int diem, string input, string output)
 {
     ID = id;
     bai.ID = bai.ID;
     Diem = diem;
     Input = input;
     Output = output;
 }
Пример #4
0
 public int Luu(Bai obj)
 {
     if (LayTheoMa(obj.ID) == null)
     {
         return Them(obj);
     }
     else
         return CapNhat(obj);
 }
Пример #5
0
 public int Xoa(Bai obj)
 {
     throw new NotImplementedException();
 }
Пример #6
0
 public int CapNhat(Bai obj)
 {
     throw new NotImplementedException();
 }
Пример #7
0
 public Test(int id, Bai bai, int diem)
 {
     ID = id;
     IDBai = bai.ID;
 }
Пример #8
0
 public Test(int id, Bai bai)
 {
     ID = id;
     IDBai = bai.ID;
 }
Пример #9
0
 public int Xoa(Bai obj)
 {
     return Xoa(obj.ID);
 }
Пример #10
0
 public int Them(Bai obj)
 {
     InMemoryDatabase.BaiTable.Add(obj.ID, obj);
     InMemoryDatabase.BaiNextID++;
     return obj.ID;
 }