Ejemplo n.º 1
0
        public int InsertarCaroline(WSCaroline oWSCaroline)
        {

                       
            WSCarolineLogic rsCaroline = new WSCarolineLogic();
            int Respuesta = 0;

            try
            {
                Respuesta = rsCaroline.InsertarWSCaroline(oWSCaroline);
            }
            catch (Exception ex)
            {
                //Console.WriteLine("Error en ServiceCaroline: " + ex.Message);
                string sSource;
                string sLog;
                string sEvent;

                sSource = "dotNET Sample App";
                sLog = "Application";
                sEvent = "Error en ServiceCaroline: " + ex.Message;

                if (!EventLog.SourceExists(sSource))
                    EventLog.CreateEventSource(sSource, sLog);

                EventLog.WriteEntry(sSource, sEvent);
                EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234);



            }
                   
            return Respuesta;

        }
Ejemplo n.º 2
0
 /// <summary>
 /// Inserta un registro
 /// </summary>
 /// <param name="oWSCaroline"></param>
 /// <returns></returns>
 public int InsertarWSCaroline(WSCaroline oWSCaroline)
 {
     int? RegistroInsert = 0;
     try
     {
         using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
         {
             RegistroInsert = WSCarolineDA.InsertarWSCaroline(oWSCaroline);
             ts.Complete();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return RegistroInsert.Value;
 }
Ejemplo n.º 3
0
        //***************

        public int InsertarWSCaroline (WSCaroline oWSCaroline)
        {
            int? RegistroInsert = 0;
            try
            {
                using (WSCarolineDataContext dc = new WSCarolineDataContext(Helper.ConnectionString()))
                {
                    dc.stp_InsertarCaroline(
                        ref RegistroInsert,
                                            oWSCaroline.intTipoTipificacionID,
                                            oWSCaroline.intClienteID,
                                            oWSCaroline.intPersonaID,
                                            oWSCaroline.intCalificacion);
                    
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return RegistroInsert.Value;
        }