当前位置: 首页>>代码示例>>C#>>正文


C# DAO.Dispose方法代码示例

本文整理汇总了C#中TPortalClass.DAO.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# DAO.Dispose方法的具体用法?C# DAO.Dispose怎么用?C# DAO.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TPortalClass.DAO的用法示例。


在下文中一共展示了DAO.Dispose方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

        /// <summary>
        /// ɾ��
        /// </summary>
        /// <returns></returns>
        public bool Delete()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                String sql = "delete from JpStudents where [email protected] ";

                SqlParameter[] sqlparam = {
                    db.MakeInParam("@uid",SqlDbType.VarChar,uid),
                };

                db.Execute(sql, sqlparam);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:30,代码来源:JpStudents.cs

示例2: Delete

        /// <summary>
        /// ɾ��
        /// </summary>
        /// <returns></returns>
        public bool Delete()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                //��ɾ��ѡ��
                String sql_option = "delete from hy_favorite where [email protected] ";
                SqlParameter[] sqlparam_option = {
                    db.MakeInParam("@id",SqlDbType.Int,id),
                };
                db.Execute(sql_option, sqlparam_option);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:JpFavorite.cs

示例3: Insert

        /// <summary>
        /// 插入
        /// </summary>
        /// <returns></returns>
        public bool Insert()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                String sqlInsert = " insert into hy_verifycode(hy_tel,hy_code,hy_addtime)  values (@hy_tel,@hy_code,@hy_addtime)";
                SqlParameter[] sqlparam = {db.MakeInParam("@hy_addtime",SqlDbType.DateTime,hy_addtime),
                                              db.MakeInParam("@hy_tel",SqlDbType.VarChar,hy_tel),
                                              db.MakeInParam("@hy_code",SqlDbType.VarChar,hy_code)
                                         };
                db.Execute(sqlInsert, sqlparam);
            }
            catch (Exception ex)
            {
                throw ex;
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:30,代码来源:JpVerifyCode.cs

示例4: Insert

        public bool Insert()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                string sql = " insert into JpPubHtml(id,pages,days,status) values (@id,@pages,@days,@status)";

                SqlParameter[] sqlparam = {
                    db.MakeInParam("@id",SqlDbType.VarChar,id),
                    db.MakeInParam("@pages",SqlDbType.VarChar,pages),
                    db.MakeInParam("@days",SqlDbType.VarChar,days),
                    db.MakeInParam("@status",SqlDbType.VarChar,status),
                };

                db.Execute(sql, sqlparam);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:JpPubHtml.cs

示例5: Delete

        /// <summary>
        /// ɾ��
        /// </summary>
        /// <returns></returns>
        public bool Delete()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                String sql = "delete from JpOpinionHF where [email protected] ";
                SqlParameter[] sqlparam = {
                    db.MakeInParam("@id",SqlDbType.Int,id),
                };
                db.Execute(sql, sqlparam);

            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:JpOpinionHF.cs

示例6: DeleteImg

        public bool DeleteImg(string id)
        {
            bool ret = true;
            DAO db = new DAO();
            try
            {
                string sql = "delete from hy_fileatt where  [email protected]  ";
                SqlParameter[] sqlparam = new SqlParameter[]
                {
                    db.MakeInParam("@id", SqlDbType.VarChar, id)
                };

                db.Execute(sql, sqlparam);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:25,代码来源:HyFileatt.cs

示例7: Delete

        //ɾ��һ������
        public bool Delete()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                string sql = " delete JpColumnRelations where [email protected] and [email protected]_relation and [email protected] ";

                SqlParameter[] sqlparam = {
                    db.MakeInParam("@cid",SqlDbType.VarChar,cid),
                    db.MakeInParam("@cid_relation",SqlDbType.VarChar,cid_relation),
                    db.MakeInParam("@relation",SqlDbType.VarChar,relation),
                };

                db.Execute(sql, sqlparam);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:JpColumnRelations.cs

示例8: Delete

        /// <summary>
        /// ɾ��
        /// </summary>
        /// <returns></returns>
        public bool Delete()
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                string sql = "delete from JpTemplate where [email protected] ";
                SqlParameter[] sqlparam = {
                    db.MakeInParam("@url",SqlDbType.VarChar,url),
                };

                db.Execute(sql, sqlparam);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:JpTemplate.cs

示例9: getBetterGoods

 /// <summary>
 /// ��ȡ�̳Ƿ����ĺû�
 /// </summary>
 /// <param name="count">��ȡ����������</param>
 /// <returns></returns>
 public DataTable getBetterGoods(int count)
 {
     String sqlSelect = " select top " + count + " * from hy_goods where (hy_cid = '006001001' or hy_cid='006002001' or  hy_cid='006003001'  or  hy_cid='006004001') and hy_ifsh='2' order by hy_sort ";
     DAO db = new DAO();
     DataTable dt = db.GetDataTable(sqlSelect);
     db.Close();
     db.Dispose();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:14,代码来源:JpGoods.cs

示例10: Getdocbyid

 public DataTable Getdocbyid(string id)
 {
     string sql = " select * from hy_fileatt where [email protected] ";
     DAO db = new DAO();
     SqlParameter[] sqlparam = new SqlParameter[]
     {
         db.MakeInParam("@id", SqlDbType.VarChar, id)
     };
     DataTable dt = db.GetDataTable(sql, sqlparam);
     db.Close();
     db.Dispose();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:13,代码来源:HyFileatt.cs

示例11: getData

 /// <summary>
 /// 获取
 /// </summary>
 /// <param name="keyWord">关键字</param>
 /// <param name="count">数据条数   0为不限条数</param>
 /// <returns></returns>
 public DataTable getData(string keyWord, int count)
 {
     string sqlSelect = "";
     sqlSelect = " select ";
     if (count != 0)
     {
         sqlSelect += " top " + count + "  ";
     }
     sqlSelect += "  * from hy_searchArt where 1=1  ";
     if (keyWord != "")
     {
         sqlSelect += "  and hy_title like '%" + keyWord + "%'  ";
     }
     sqlSelect += " order by addTime desc ";
     DAO db = new DAO();
      DataTable dt = db.GetDataTable(sqlSelect);
       //  DataTable dt = new DataTable();
     db.Close();
     db.Dispose();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:27,代码来源:HySearchArt.cs

示例12: DeleteAll

 /// <summary>
 /// ɾ�����
 /// roleids��ʽ��,1111,2222,33333,
 /// </summary>
 /// <returns></returns>
 public bool DeleteAll(string roleids)
 {
     bool ret = true;
     String sql = "delete from JpRole where @hy_roleid like '%,'+hy_roleid+',%'";
     DAO db = new DAO();
     SqlParameter[] prams ={
             db.MakeInParam("@hy_roleid",SqlDbType.VarChar,roleids),
         };
     try
     {
         db.Execute(sql, prams);
     }
     catch
     {
         ret = false;
     }
     finally
     {
         db.Close();
         db.Dispose();
     }
     return ret;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:28,代码来源:JpRole.cs

示例13: Delete

        //ɾ����ɫ�е���Ա
        public bool Delete(string groupid,string uid)
        {
            bool ret = true;
            DAO db = new DAO();

            try
            {
                String sql = " delete from JpGroupUser ";
                sql += " where groupid='" + groupid + "'";
                sql += " and uid='" + uid + "'";
                db.Execute(sql);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:24,代码来源:JpGroups.cs

示例14: DeleteByDate

        /// <summary>
        /// ɾ������
        /// </summary>
        /// <returns></returns>
        public bool DeleteByDate(String hits_date)
        {
            bool ret = true;

            String sql = "delete from JpHits where [email protected]_date ";
            DAO db = new DAO();
            SqlParameter[] prams ={
                    db.MakeInParam("@hits_date",SqlDbType.VarChar,hits_date),
                };
            try
            {
                db.Execute(sql, prams);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:28,代码来源:JpHits.cs

示例15: DeleteById

        /// <summary>
        /// ɾ������
        /// </summary>
        /// <returns></returns>
        public bool DeleteById(String id)
        {
            bool ret = true;

            String sql = "delete from JpHits where [email protected] ";
            DAO db = new DAO();
            SqlParameter[] prams ={
                    db.MakeInParam("@id",SqlDbType.VarChar,id),
                };
            try
            {
                db.Execute(sql, prams);
            }
            catch
            {
                ret = false;
            }
            finally
            {
                db.Close();
                db.Dispose();
            }
            return ret;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:28,代码来源:JpHits.cs


注:本文中的TPortalClass.DAO.Dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。