示例#1
0
        /// <summary>
        /// 修改指定子桥梁信息
        /// </summary>
        /// <param name="bc"></param>
        /// <returns></returns>
        public static int UpdateChildBridge(ChildBridge child)
        {
            String sql = string.Format("UPDATE mdtbl_bridge_children  SET  bri_id ='{0}', type_id = '{1}' , bridge_children_name = '{2}', bridge_children_discribe = '{3}', bridge_pile = '{4}' WHERE bridge_children_id = '{5}'",
                                       child.ParentId, child.TypeId, child.Name, child.Description, child.PileId, child.Id);
            ISqlHelper sql_helper = SqlHelperFactory.GetDefaultSqlHelper();

            return(sql_helper.ExecuteNonQuery(sql));
        }
示例#2
0
        /// <summary>
        /// 添加一个子桥梁
        /// </summary>
        /// <param name="bc"></param>
        /// <returns></returns>
        public static int AddChildBridge(ChildBridge child)
        {
            String sql = string.Format("INSERT INTO mdtbl_bridge_children(bridge_children_id,bri_id," +
                                       "type_id,bridge_children_name,bridge_children_discribe,bridge_pile) " +
                                       "VALUES('{0}','{1}','{2}','{3}','{4}', '{5}')",
                                       child.Id, child.ParentId, child.TypeId, child.Name,
                                       child.Description, child.PileId);
            ISqlHelper sql_helper = SqlHelperFactory.GetDefaultSqlHelper();

            return(sql_helper.ExecuteNonQuery(sql));
        }