Exemplo n.º 1
0
        public bool SavePTP(T_ParseTubeParameter PTP)
        {
            bool result  = false;
            var  session = mapper.BeginTransaction();

            try
            {
                if (PTP.ID == 0)
                {
                    mapper.Insert("InsertT_ParseTubeParameter", PTP);
                    result = PTP.ID > 0;
                }
                else
                {
                    result = mapper.Update("UpdateT_ParseTubeParameter", PTP) > 0;
                }
                mapper.CommitTransaction();
            }
            catch (Exception e)
            {
                result = false;
                mapper.RollBackTransaction();
            }
            return(result);
        }
Exemplo n.º 2
0
 public bool SavePTP(T_ParseTubeParameter PTP)
 {
     return(JDAO.SavePTP(PTP));
 }