Example #1
0
        public bool InsertarFichaTipoMant(Int64 ID_Ficha, Int64 TipoMant_ID)
        {
            bool updated = false;

            using (SqlConnection con = new SqlConnection(Conexion))
            {
                try
                {
                    con.Open();
                    daFichaTipoMant odaFichaTipoMant = new daFichaTipoMant();
                    updated = odaFichaTipoMant.InsertarFichaTipoMant(con, ID_Ficha, TipoMant_ID);
                }
                catch (SqlException ex)
                {
                    beLog obeLog;
                    foreach (SqlError err in ex.Errors)
                    {
                        obeLog = new beLog();
                        obeLog.MensajeError = err.Message;
                        obeLog.DetalleError = ex.StackTrace;
                        ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
                    }
                }
                catch (Exception ex)
                {
                    beLog obeLog = new beLog();
                    obeLog.MensajeError = ex.Message;
                    obeLog.DetalleError = ex.StackTrace;
                    ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
                }
            }
            return(updated);
        }
Example #2
0
        public List <beTipoMant> Select_Ficha_TipoMant(string pID_Ficha)
        {
            List <beTipoMant> lbeTipoMant = null;

            using (SqlConnection con = new SqlConnection(Conexion))
            {
                try
                {
                    con.Open();
                    daFichaTipoMant odaFichaTipoMant = new daFichaTipoMant();
                    lbeTipoMant = odaFichaTipoMant.Select_Ficha_TipoMant(con, pID_Ficha);
                }
                catch (SqlException ex)
                {
                    beLog obeLog;
                    foreach (SqlError err in ex.Errors)
                    {
                        obeLog = new beLog();
                        obeLog.MensajeError = err.Message;
                        obeLog.DetalleError = ex.StackTrace;
                        ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
                    }
                }
                catch (Exception ex)
                {
                    beLog obeLog = new beLog();
                    obeLog.MensajeError = ex.Message;
                    obeLog.DetalleError = ex.StackTrace;
                    ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
                }
            }
            return(lbeTipoMant);
        }