Esempio n. 1
0
        public void InsertParticipant(Participant val)
        {
            try
            {
                using (var c = new Connect())
                {
                    c.BeginTrx();
                    var partiMapper = new ParticipantDataMapper(c.GetConnection());
                    partiMapper.SetTransaction(c.Transaction);
                    partiMapper.Insert(val);
                    c.Commit();
                }
            }

            catch (Exception exception)
            {
                throw new FaultException <ServerError>(new ServerError());
            }
        }
Esempio n. 2
0
        public int InsertParticipant(Participant val)
        {
            try
            {
                using (var c = new Connect())
                {

                    c.BeginTrx();
                    var partiMapper = new ParticipantDataMapper(c.GetConnection());
                    partiMapper.SetTransaction(c.Transaction);
                    int ret = partiMapper.Insert(val);
                    c.Commit();
                    return ret;

                }
            }

            catch (Exception exception)
            {
                throw new FaultException<ServerError>(new ServerError());
            }
        }