zoukankan      html  css  js  c++  java
  • 根据条件删除

            /// <summary>
            /// 删除检测项目
            /// </summary>
            private void DelPBItem()
            {
                string msg = "0";
                string id = Request.Form["ipt_biotestplanheaderid"];
                string pbItemCode = Request.Form["ipt_pbitemcode"];
                if (!string.IsNullOrEmpty(id))
                {
                    string strWhere = "BioTestPlanHeaderID=" + id + "AND PBItemCode=" + pbItemCode;                 
                    DataSet ds = bioTestPlanBodyBll.GetList(strWhere);
                    int count = ds.Tables[0].Rows.Count;
                    for (int i = 0; i < count; i++)
                    {
                        int reviewid = Convert.ToInt32(ds.Tables[0].Rows[i]["BioTestPlanBodyID"].ToString());
                        bioTestPlanBodyBll.Delete(reviewid);
                    }
                    //if (bioTestPlanBodyBll.DeleteList(id))
                    // {
                    msg = "操作成功";
                    //}
                }
                WebCommon.WriteMsg(msg);
            }

  • 相关阅读:
    WPF窗口和用户控件事件相互触发
    C#排序算法总结
    C#.NET操作数据库通用类
    在C#的WPF程序使用XAML实现画线
    centos7 用户介绍
    Linux系列2
    nginx的使用
    TCP协议、三次握手以及滑动窗口等的介绍(计算机网络基础知识)
    mysql的
    jQuery的东西
  • 原文地址:https://www.cnblogs.com/IT1517/p/4956040.html
Copyright © 2011-2022 走看看