Beispiel #1
0
        public void DeleteTest()
        {
            CustomerProps props = (CustomerProps)db.Create(newProps);
            int           id    = props.ID;

            Assert.IsTrue(db.Delete(props));
            Assert.Throws <Exception>(() => db.Retrieve(id));
            Assert.Throws <Exception>(() => db.Delete(props));
        }
Beispiel #2
0
        public void TestDelete()
        {
            CustomerProps props = (CustomerProps)db.Retrieve(1);

            db.Delete(props);
            Assert.Throws <Exception>(() => db.Retrieve(1));
        }
Beispiel #3
0
        public void TestDelete()
        {
            CustomerProps props = (CustomerProps)db.Retrieve(696);

            db.Delete(props);
            List <CustomerProps> propsList = (List <CustomerProps>)db.RetrieveAll(db.GetType());

            Assert.AreEqual(695, propsList.Count);
        }
Beispiel #4
0
        public void TestDelete()
        {
            CustomerProps props = (CustomerProps)db.Retrieve(1);

            db.Delete(props);
            List <CustomerProps> otherprops = (List <CustomerProps>)db.RetrieveAll(db.GetType());

            Assert.AreEqual(otherprops.Count, 695);
        }
        static void Main(string[] args)
        {
            ICRUDAble iCRUDAble;

            iCRUDAble = new CustomerDB();
            iCRUDAble.Create();
            iCRUDAble.Update();
            iCRUDAble.Read();
            iCRUDAble.Delete();

            iCRUDAble = new VendorDB();
            iCRUDAble.Create();
            iCRUDAble.Update();
            iCRUDAble.Read();
            iCRUDAble.Delete();

            iCRUDAble = new InvoiceDB();
            iCRUDAble.Create();
            iCRUDAble.Update();
            iCRUDAble.Read();
            iCRUDAble.Delete();
        }
Beispiel #6
0
 /// <summary>
 /// Xóa 1 Customer
 /// </summary>
 /// <param name="CustomerIDs"></param>
 /// <returns></returns>
 public static bool Customer_Delete(string[] customerIDs)
 {
     return(CustomerDB.Delete(customerIDs));
 }
Beispiel #7
0
 /// <summary>
 /// xoa khach hang
 /// </summary>
 /// <param name="customerIDs"></param>
 /// <returns></returns>
 public static int DeleteCustomer(string[] customerIDs)
 {
     return(CustomerDB.Delete(customerIDs));
 }
Beispiel #8
0
 public void TestDelete()
 {
     p = (CustomerProp)DB.Retrieve(2);
     Assert.True(DB.Delete(p));
 }
Beispiel #9
0
 public bool Delete(int id)
 {
     return(CustomerDB.Delete(id));
 }
Beispiel #10
0
        public void TestDelete()
        {
            bool isDeleted = cdb.Delete(c);

            Assert.IsTrue(isDeleted);
        }