예제 #1
0
        // 物理删除由主键ID指定的一条记录 DeleteXiangMuJieDuan
        public bool Delete(int ID)
        {
            XiangMuJieDuanDelete exec = new XiangMuJieDuanDelete();

            try
            {
                exec.ID = ID;
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                exec = null;
            }
        }
예제 #2
0
        // 公用静态方法,删除一条记录 DeleteXiangMuJieDuan
        public static bool DeleteEntity(XiangMuJieDuanBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            XiangMuJieDuanDelete exec = new XiangMuJieDuanDelete();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }