Exemple #1
0
 //Agregar
 public IHttpActionResult Agregar(BE.ReclamoConsultaDetalle rec)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     DAL.CRUDRefReclamoConsultaDetalle oCRUDRec = new DAL.CRUDRefReclamoConsultaDetalle();
     try
     {
         oCRUDRec.Agregar(rec);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(Ok(rec));
 }
Exemple #2
0
        //Funcion agregar
        public bool Agregar(BE.ReclamoConsultaDetalle pRefReclamosConsulta)
        {
            bool         ret;
            ITransaction transaction = session.BeginTransaction();

            try
            {
                session.Save(pRefReclamosConsulta);
                transaction.Commit();
                ret = true;
            }
            catch (Exception ex)
            {
                transaction.Rollback();
                throw ex;
            }

            return(ret);
        }