Beispiel #1
0
        public int ClearOperater(string billNo, string productCode, string operater, string style)
        {
            int result = 0;
            using (PersistentManager pm = new PersistentManager())
            {
                BillDao billDao = new BillDao();
                try
                {
                    pm.BeginTransaction();
                    result = billDao.ClearOperater(billNo, productCode, operater);

                    if (result == 1)
                    {
                        if (style == "����")
                            billDao.ClearOperaterByOtherCode(billNo, productCode, operater);
                    }
                    else
                        throw new Exception("ֻ�ܸ���һ����¼");
                    pm.Commit();
                }
                catch
                {
                    pm.Rollback();
                }
            }
            return result;
        }