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


C# DAO.MakeInParam方法代码示例

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


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

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

示例2: Update

        public bool Update()
        {
            bool ret = true;
            DAO db = new DAO();
            try
            {
                String sql = "UPDATE JpPubHtml SET [email protected],[email protected],[email protected] where [email protected]";
                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,代码行数:27,代码来源:JpPubHtml.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_option = "delete from JpVoteOptions where [email protected] ";
                SqlParameter[] sqlparam_option = {
                    db.MakeInParam("@id",SqlDbType.Int,id),
                };
                db.Execute(sql_option, sqlparam_option);

                String sql = "delete from JpVote 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,代码行数:36,代码来源:JpVote.cs

示例6: Delete

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

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

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

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

示例10: DeleteAll

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

            try
            {
                String sql = "delete from JpStudents where @uid like '%,'+uid+',%'";

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

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

示例11: JpColumns

        public JpColumns(string cid)
        {
            string sql = " select * from JpColumns ";
            sql += " where cid = @cid ";

            DAO db = new DAO();

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

            DataTable dt = db.GetDataTable(sql, sqlparam);

            if (dt.Rows.Count > 0)
            {
                this.cid = dt.Rows[0]["cid"].ToString();
                this.cname = dt.Rows[0]["cname"].ToString();
                this.tmp_col = dt.Rows[0]["tmp_col"].ToString();
                this.tmp_art = dt.Rows[0]["tmp_art"].ToString();
                this.online = dt.Rows[0]["online"].ToString();
                this.hotpublish = dt.Rows[0]["hotpublish"].ToString();
                this.pubtime = dt.Rows[0]["pubtime"].ToString();
                this.seotitle = dt.Rows[0]["seotitle"].ToString();
                this.seokeywords = dt.Rows[0]["seokeywords"].ToString();
                this.seodescription = dt.Rows[0]["seodescription"].ToString();
                this.pubhtmlpath = dt.Rows[0]["pubhtmlpath"].ToString();
                this.ifhotnews = dt.Rows[0]["ifhotnews"].ToString();
                this.csort = Int32.Parse(dt.Rows[0]["csort"].ToString());
                this.shtml = dt.Rows[0]["shtml"].ToString();
                this.rss = Int32.Parse(dt.Rows[0]["rss"].ToString());
                this.newpic = dt.Rows[0]["newpic"].ToString();
                this.newday = Int32.Parse(dt.Rows[0]["newday"].ToString());
            }
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:34,代码来源:JpColumns.cs

示例12: Getdocsbyip

        //����IP���ؽ��������˼���ͶƱ��Ϣ  ls_date:yyyy-MM-dd��ʽ
        public DataTable Getdocsbyip(int id, string ip)
        {
            String sql = " select * from JpVoteIP  ";
            sql += " where id = @id and ip = @ip and convert(char(10),addtime,120)=convert(char(10),getdate(),120) ";

            DAO db = new DAO();

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

            DataTable dt = db.GetDataTable(sql, sqlparam);
            db.Close();
            return dt;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:17,代码来源:JpVoteOptions.cs

示例13: Delete

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

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

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

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

示例14: Delete

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

            try
            {
                //先删除选项
                String sql_option = "delete from hy_guidepage 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,代码来源:JpGuidePage.cs

示例15: GetStyles

        public DataTable GetStyles(string tclass,String cid)
        {
            string sql = " select a.*,b.description+' '+a.url as thetxt from JpColumnsStyle a left join JpTemplate b on a.url=b.url where 1=1";
            sql += "  and [email protected] ";
            sql += " and [email protected] ";

            DAO db = new DAO();

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

            DataTable dt = db.GetDataTable(sql, sqlparam);

            return dt;
        }
开发者ID:wjszxli,项目名称:xdjb,代码行数:17,代码来源:JpColumnsStyle.cs


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