Exemplo n.º 1
0
        public int SetOperater(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.UpdateOperater(billNo, productCode, operater);

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