コード例 #1
0
 /// <summary>
 /// Updates the flow relative.
 /// </summary>
 /// <param name="conn">The connection.</param>
 /// <param name="flowRel">The flow relative.</param>
 public void updateFlowRel(DBConnection_EF conn, AFLOW_REL flowRel)
 {
     try
     {
         conn.SaveChanges();
     }
     catch (Exception ex)
     {
         logger.Warn(ex);
         throw;
     }
 }
コード例 #2
0
 /// <summary>
 /// Inserts the flow relative.
 /// </summary>
 /// <param name="conn">The connection.</param>
 /// <param name="flowRel">The flow relative.</param>
 public void insertFlowRel(DBConnection_EF conn, AFLOW_REL flowRel)
 {
     try
     {
         conn.AFLOW_REL.Add(flowRel);
         conn.SaveChanges();
     }
     catch (Exception ex)
     {
         logger.Warn(ex);
         throw;
     }
 }
コード例 #3
0
        /// <summary>
        /// Gets the flow relative by identifier.
        /// </summary>
        /// <param name="conn">The connection.</param>
        /// <param name="readLock">The read lock.</param>
        /// <param name="fr_id">The fr_id.</param>
        /// <returns>FlowRelationItem.</returns>
        public AFLOW_REL getFlowRelByID(DBConnection_EF conn, Boolean readLock, string fr_id)
        {
            AFLOW_REL rtnFR = null;

            try
            {
                var query = from flowRel in conn.AFLOW_REL
                            where flowRel.FR_ID == fr_id.Trim()
                            select flowRel;
                rtnFR = query.SingleOrDefault();
            }
            catch (Exception ex)
            {
                logger.Warn(ex);
                throw;
            }
            return(rtnFR);
        }