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


C# DAO.Execute方法代码示例

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


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

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

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

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

示例4: DeleteBycid

        /// <summary>
        /// ɾ��ij��Ŀ�����й���
        /// </summary>
        /// <returns></returns>
        public bool DeleteBycid(string cid)
        {
            bool ret = true;
            DAO db = new DAO();

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

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

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

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

    //提交
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (this.Session["uid"] == null || this.Session["uid"].ToString() == "")
        {
            this.Response.Redirect("../login.aspx");
        }

        string ls_tip = "审核成功!";

        TPortalClass.JpActivity JpActivity = new TPortalClass.JpActivity();
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.DAO db = new TPortalClass.DAO();
        string sql_cg = "update hy_activity set hy_ifsh=2 where id=" + System.Int32.Parse(this.txtid.Value) + "";
        db.Execute(sql_cg);
        //写系统日志
        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "审核", "审核活动记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString());
        JpActivity.Update();

        Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:26,代码来源:main_activity_sh.aspx.cs

示例10: btnDeal_Click

    //受理
    protected void btnDeal_Click(object sender, EventArgs e)
    {
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.JpAdver JpAdver = new TPortalClass.JpAdver();
        string ls_tip = "受理成功!";
        for (int i = 0; i < rptList.Items.Count; i++)
        {
            string id = ((HiddenField)rptList.Items[i].FindControl("hidId")).Value;
            CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
            if (cb.Checked)
            {
                TPortalClass.DAO db = new DAO();
                string sql = "update hy_help set hy_ifsh=1 where id=" + int.Parse(id) + "";
                db.Execute(sql);
            }
        }
        string pageUrl = JpCommon.CombUrlTxt("list_help_sh.aspx", "page={0}&rnd={1}",
            "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "");

        //写系统日志

        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "审核", "批量受理帮办记录", Session["uid"].ToString(), Session["uname"].ToString());
        Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:30,代码来源:list_help_sh.aspx.cs

示例11: btnSubmit_Click

 //答复
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (this.Session["uid"] == null || this.Session["uid"].ToString() == "")
     {
         this.Response.Redirect("../login.aspx");
     }
     string ls_tip = "答复成功!";
     TPortalClass.DAO db = new TPortalClass.DAO();
     TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
     string ls_ = txthy_reply.Text;
     int ls_hy_ifsh = 2;
     //写系统日志
     string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
     if (userip == null || userip == "")
     {
         userip = Request.ServerVariables["REMOTE_ADDR"];
     }
     JpCommon.WriteLog(userip, "答复", "答复求助记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString());
     string sql_Update = "  UPDATE  hy_help SET";
     sql_Update += "   hy_reply  ='" + txthy_reply.Text + "'";
     sql_Update += " , hy_replytime ='" + DateTime.Now.ToString("yyyy-MM-dd") + "'";
     sql_Update += " , hy_ifsh =" + ls_hy_ifsh + "   where id=" + Convert.ToInt32(txtid.Value.Trim()) + "";
     db.Execute(sql_Update);
     Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:26,代码来源:main_help_sh.aspx.cs

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

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

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

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


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