Пример #1
0
        public DsResponse CommonTrn(DsRequest dsReq)
        {
            DsResponse dsRes = null;


            using (DacCommon objTrn = new DacCommon())
            {
                dsRes = objTrn.CommonTrn(dsReq);
            }

            return(dsRes);
        }
Пример #2
0
        public DsResponse SetTestTransaction(DsRequest dsReq)
        {
            try
            {
                DsResponse dsRes = null;
                Hashtable  ht    = null;


                IBatisNet2Helper.Instance.BeginTransaction();

                using (DacCommon objTx = new DacCommon())
                {
                    ht = new Hashtable();
                    ht.Add("USER_ID", "Test11");
                    dsReq.htParam = ht;

                    dsRes = objTx.CommonTrn(dsReq);

                    dsReq.htParam["USER_ID"] = "Test12";
                    dsRes = objTx.CommonTrn(dsReq);

                    dsReq.htParam["USER_ID"] = "Test11";
                    dsRes = objTx.CommonTrn(dsReq);

                    ;
                }

                IBatisNet2Helper.Instance.CommitTransaction();

                return(dsRes);
            }
            catch (Exception ex)
            {
                IBatisNet2Helper.Instance.RollBackTransaction();
                throw ex;
            }
        }