public bool InsertarComentario(Int64 ID_Ficha, int Nro_Zona, string Usuario, bool b_Pendiente, bool b_Completado, string Comentario, string csid) { bool updated = false; using (SqlConnection con = new SqlConnection(Conexion)) { try { con.Open(); daComentario odaComentario = new daComentario(); updated = odaComentario.InsertarComentario(con, ID_Ficha, Nro_Zona, Usuario, b_Pendiente, b_Completado, Comentario, csid); } 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); }
public List <beComentario> ListarComentarioZona(Int64 ID_Ficha, int Zona, string csid) { List <beComentario> lbeComentario = null; using (SqlConnection con = new SqlConnection(Conexion)) { try { con.Open(); daComentario odaComentario = new daComentario(); lbeComentario = odaComentario.ListarComentarioZona(con, ID_Ficha, Zona, csid); } 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(lbeComentario); }