Exemplo n.º 1
0
        public bool UpdateOrInsertCamera(T_Camera t_Camera)
        {
            bool result  = false;
            var  session = mapper.BeginTransaction();

            try
            {
                if (t_Camera.ID == 0)
                {
                    mapper.Insert("InsertT_Camera", t_Camera);
                    result = t_Camera.ID > 0;
                }
                else
                {
                    result = mapper.Update("UpdateT_Camera", t_Camera) > 0;
                }
                mapper.CommitTransaction();
            }
            catch (Exception e)
            {
                result = false;
                mapper.RollBackTransaction();
            }
            return(result);
        }
Exemplo n.º 2
0
 public bool UpdateOrInsertCamera(T_Camera t_Camera)
 {
     return(JDAO.UpdateOrInsertCamera(t_Camera));
 }