コード例 #1
0
        // 物理删除由主键ID指定的一条记录 DeletePinDaoSheZhi
        public bool Delete(int ID)
        {
            PinDaoSheZhiDelete exec = new PinDaoSheZhiDelete();

            try
            {
                exec.ID = ID;
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                exec = null;
            }
        }
コード例 #2
0
 // 公用静态方法,删除一条记录 DeletePinDaoSheZhi
 public static bool DeleteEntity(PinDaoSheZhiBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     PinDaoSheZhiDelete exec = new PinDaoSheZhiDelete();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
コード例 #3
0
        // 公用静态方法,删除一条记录 DeletePinDaoSheZhi
        public static bool DeleteEntity(PinDaoSheZhiBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            PinDaoSheZhiDelete exec = new PinDaoSheZhiDelete();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
コード例 #4
0
 // 物理删除由主键ID指定的一条记录 DeletePinDaoSheZhi
 public bool Delete(int ID)
 {
     PinDaoSheZhiDelete exec = new PinDaoSheZhiDelete();
     try
     {
         exec.ID = ID;
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         exec = null;
     }
 }