Example #1
0
 //
 // Insert a Regist
 //
 public int InsertRegist(Regist val)
 {
     try
     {
         using (var c = new Connect())
         {
             c.BeginTrx();
             var registMapper = new RegistDataMapper(c.GetConnection());
             registMapper.SetTransaction(c.Transaction);
             int result = registMapper.Insert(val);
             c.Commit();
             return(result);
         }
     }
     catch (Exception exception)
     {
         throw new FaultException <ServerError>(new ServerError());
     }
 }
Example #2
0
 public void InsertDocument(Document doc)
 {
     try
     {
         using (var connect = new Connect())
         {
             connect.BeginTrx();
             SqlConnection sqlconn   = connect.GetConnection();
             var           docmapper = new DocumentDataMapper(sqlconn);
             docmapper.SetTransaction(connect.Transaction);
             docmapper.Insert(doc);
             connect.Commit();
         }
     }
     catch (Exception exception)
     {
         throw new FaultException <ServerError>(new ServerError());
     }
 }
Example #3
0
 //
 //  Insert a Person
 //
 public int InsertPerson(Person val)
 {
     try
     {
         using (var c = new Connect())
         {
             c.BeginTrx(IsolationLevel.ReadCommitted);
             var personDoa = new PersonDataMapper(c.GetConnection());
             personDoa.SetTransaction(c.Transaction);
             int result = personDoa.Insert(val);
             c.Commit();
             return(result);
         }
     }
     catch (Exception exception)
     {
         throw new FaultException <ServerError>(new ServerError());
     }
 }
Example #4
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());
            }
        }
Example #5
0
        public int InsertBiometricType(BiometricType val)
        {
            try
            {
                using (var connect = new Connect())
                {
                    connect.BeginTrx();
                    SqlConnection sqlconn = connect.GetConnection();
                    var           bioDao  = new BiometricTypeDataMapper(sqlconn);
                    bioDao.SetTransaction(connect.Transaction);
                    int result = bioDao.Insert(val);
                    connect.Commit();

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