//public void AddProduct(string productCode, string productName, string unitCode, string original, string years, string brand, // string grade, string style, string type, string unit, string characteristics, string productNo) //{ // using (PersistentManager pm = new PersistentManager()) // { // try // { // pm.BeginTransaction(); // ProductDao productDao = new ProductDao(); // if (productDao.Find(productCode) == 0) // productDao.Insert(productCode, productName, unitCode, original, years, brand, grade, style, type, unit, characteristics, productNo); // else // throw new Exception("��Ʒ�Ѵ��ڣ����������롣"); // pm.Commit(); // } // catch (Exception e) // { // pm.Rollback(); // throw new Exception(e.Message); // } // } //} //public void SaveProduct(string productCode, string productName, string unitCode, string original, string years, string brand, // string grade, string style, string type, string unit, string characteristics, string productNo) //{ // using (PersistentManager pm = new PersistentManager()) // { // ProductDao productDao = new ProductDao(); // productDao.Update(productCode, productName, unitCode, original, years, brand, grade, style, type, unit, characteristics, productNo); // } //} public void DeleteProduct(string productCode) { using (PersistentManager pm = new PersistentManager()) { ProductDao productDao = new ProductDao(); productDao.Delete(productCode); } }