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


C# DAO.Close方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例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: getActive

 public DataTable getActive(int count)
 {
     string cmdStr = " Select top " + count + " * from hy_activity where hy_ifsh='2'  and hy_starttime <=getdate() and hy_endtime >=getdate() order by hy_addtime desc , hy_sort desc ";
     DAO db = new DAO();
     DataTable dt = db.GetDataTable(cmdStr);
     db.Close();
     db.Dispose();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:9,代码来源:JpActivity.cs

示例11: DeleteAll

 //ɾ��
 public void DeleteAll(String ids)
 {
     DAO db = new DAO();
     String sql = "Delete FROM JpNews where @aids like '%,'+cast(aid as varchar(12))+',%'";
     SqlParameter[] prams ={
         db.MakeInParam("@aids", SqlDbType.VarChar, ids)
     };
     db.Execute(sql, prams);
     db.Close();
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:11,代码来源:JpNews.cs

示例12: Getdocbyid

 //�����ĵ�ID�õ���¼
 public DataTable Getdocbyid(string id)
 {
     String sql = " select * from HyQzwd where [email protected] ";
     DAO db = new DAO();
     SqlParameter[] sqlparam = {
             db.MakeInParam("@id",SqlDbType.Int,System.Int32.Parse(id)),
         };
     DataTable dt = db.GetDataTable(sql, sqlparam);
     db.Close();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:12,代码来源:HyQzwd.cs

示例13: DeleteAll

        public void DeleteAll(String cid)
        {
            DAO db = new DAO();
            String sql = "Delete FROM JpColumnsStyle where [email protected] ";
            SqlParameter[] prams ={
                db.MakeInParam("@cid", SqlDbType.VarChar, cid)
            };

            db.Execute(sql, prams);
            db.Close();
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:11,代码来源:JpColumnsStyle.cs

示例14: GetData

 public DataTable GetData(string strWhere)
 {
     String sql = " select * from hy_favorite where 1=1  ";
     if (strWhere != "")
     {
         sql += strWhere;
     }
     DAO db = new DAO();
     DataTable dt = db.GetDataTable(sql);
     db.Close();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:12,代码来源:JpFavorite.cs

示例15: GetNewsbyaid

 //��ȡָ����Ϣ
 public DataTable GetNewsbyaid(Int32 aid)
 {
     String sql = " select * from JpNews  ";
     sql += " where aid = @aid";
     DAO db = new DAO();
     SqlParameter[] sqlparam = {
             db.MakeInParam("@aid",SqlDbType.Int,aid),
         };
     DataTable dt = db.GetDataTable(sql, sqlparam);
     db.Close();
     return dt;
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:13,代码来源:JpNews.cs


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