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


C# GridViewDeleteEventArgs类代码示例

本文整理汇总了C#中GridViewDeleteEventArgs的典型用法代码示例。如果您正苦于以下问题:C# GridViewDeleteEventArgs类的具体用法?C# GridViewDeleteEventArgs怎么用?C# GridViewDeleteEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: gvTagCategory_RowDeleting

 protected void gvTagCategory_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     int tagCategoryId = (int)gvTagCategory.DataKeys[e.RowIndex].Value;
     Bll.Delete(tagCategoryId);
     gvTagCategory.EditIndex = -1;
     Bind();
 }
开发者ID:suizhikuo,项目名称:KYCMS,代码行数:7,代码来源:TagCategoryList.aspx.cs

示例2: gvCart_RowDeleting

 /// <summary>
 /// GridView删除按钮处理事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void gvCart_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     DataTable cart = Session["cart"] as DataTable;
     cart.Rows[e.RowIndex].Delete();
     Session["cart"] = cart;
     BindGridView();
 }
开发者ID:muupu,项目名称:BookShop,代码行数:12,代码来源:Cart.aspx.cs

示例3: grdRoutesInfo_RowDeleting

 protected void grdRoutesInfo_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     int userId = Convert.ToInt32(Session["userid"]);
     string routeID = ((Label)grdRoutesInfo.Rows[e.RowIndex].FindControl("lblrtId")).Text;
     dalRegisteredCars.DeleteRoute(Convert.ToInt32(routeID));
     FillGrdRouresDetails(userId);
 }
开发者ID:LetsCarPool,项目名称:CarPool,代码行数:7,代码来源:MyRoutes.aspx.cs

示例4: GridView_OnRowDeleting

 protected void GridView_OnRowDeleting(object sender,GridViewDeleteEventArgs e)
 {
     string sql = "delete from Work where WorkSymbol = '" + GridView1.DataKeys[e.RowIndex].Value.ToString()
         + "'";
     command = new SqlCommand(sql, con);
     try
     {
         if (con.State == ConnectionState.Open)
             con.Close();
         con.Open();
         if(command.ExecuteNonQuery() != 1)
             Response.Write("<script language='JavaScript'>alert('删除失败!')</script>");
         else Response.Write("<script language='JavaScript'>alert('删除成功!')</script>");
     }
     catch (Exception ee)
     {
         Response.Write("<script language='JavaScript'>alert('" + ee.Message.ToString() + "')</script>");
         return;
     }
     finally
     {
         con.Close();
     }
     bind();
 }
开发者ID:yangpeiren,项目名称:hello-world,代码行数:25,代码来源:Work_Maintain.aspx.cs

示例5: GridView1_RowDeleting

 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     if (Session["ZT_ADMIN"] == null)
     {
         Response.Redirect("Login.aspx");
     }
     else
     {
         if (!Communal.CheckQx("CompanyInfoDelete.aspx"))
         {
             Response.Redirect("RightsWarn.aspx");
         }
         else
         {
             //删除数据库的信息
             Label ll = (Label)this.GridView1.Rows[e.RowIndex].Cells[1].FindControl("lblInfoID");
             int InfoID = Convert.ToInt32(ll.Text);
             WebProject.BLL.BaseData.ZT_COM_CompanyInfo bll_CompanyInfo = new WebProject.BLL.BaseData.ZT_COM_CompanyInfo();
             LogManage.WriteLog(Request.UserHostAddress, "公司信息管理", "删除公司信息", "成功", "信息标题:" + bll_CompanyInfo.GetModel(InfoID).Title + ", 操作人:" + SessionUtil.GetAdminSession().AdminNo);
             bll_CompanyInfo.Delete(InfoID);
             //删除文件夹的图片
             Label l2 = (Label)this.GridView1.Rows[e.RowIndex].Cells[0].FindControl("lblImgUrl");
             if (l2.Text != "onlinenone.jpg")
             {
                 System.IO.File.Delete(Server.MapPath("IMG/" + l2.Text));
             }
             //重新加载信息
             ShowData();
         }
     }
 }
开发者ID:loozhang,项目名称:51aspx_YiMengWeb,代码行数:31,代码来源:CompanyInfoList.aspx.cs

示例6: GridView1_RowDeleting

 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     int msgID = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
     Message msg = new Message();
     msg.Delete_msg(msgID);
     Response.Write("<Script Language=JavaScript>alert(\"删除成功!\");window.location='inputbox.aspx';</Script>");
 }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:7,代码来源:inputbox.aspx.cs

示例7: GridView1_RowDeleting

    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        if (Session["ZT_ADMIN"] == null)
        {
            Response.Redirect("Login.aspx");
        }
        else
        {
            if (!Communal.CheckQx("LiuYanDelete.aspx"))
            {
                Response.Redirect("RightsWarn.aspx");
            }
            else
            {
                //删除数据库的信息
                Label ll = (Label)this.GridView1.Rows[e.RowIndex].Cells[1].FindControl("lblLiuYanID");
                int LiuYanID = Convert.ToInt32(ll.Text);
                WebProject.BLL.BaseData.ZT_COM_LiuYan bll_LiuYan = new WebProject.BLL.BaseData.ZT_COM_LiuYan();
                LogManage.WriteLog(Request.UserHostAddress, "留言管理", "删除留言", "成功", "留言主题:" + bll_LiuYan.GetModel(LiuYanID).MainInfo + ", 操作人:" + SessionUtil.GetAdminSession().AdminNo);

                bll_LiuYan.Delete(LiuYanID);
                //重新加载信息
                ShowData();
            }
        }
    }
开发者ID:loozhang,项目名称:51aspx_YiMengWeb,代码行数:26,代码来源:LiuYanList.aspx.cs

示例8: DeleteRow

    protected void DeleteRow(object sender, GridViewDeleteEventArgs e)
    {
        SetRowData();

        if (ViewState["CurrentTable"] != null)
        {
            DataTable dt = (DataTable)ViewState["CurrentTable"];
            DataRow drCurrentRow = null;

            int rowIndex = Convert.ToInt32(e.RowIndex);

            if (dt.Rows.Count > 1)
            {
                dt.Rows.Remove(dt.Rows[rowIndex]);
                drCurrentRow = dt.NewRow();
                ViewState["CurrentTable"] = dt;
                NewTest_Questions_GridView.DataSource = dt;
                NewTest_Questions_GridView.DataBind();

                for (int i = 0; i < NewTest_Questions_GridView.Rows.Count; ++i)
                    NewTest_Questions_GridView.Rows[i].Cells[0].Text = (i + 1).ToString();

                SetPreviousData();
            }
        }
    }
开发者ID:Azelen,项目名称:Azelen-s-Repo,代码行数:26,代码来源:Tests.aspx.cs

示例9: GridView1_RowDeleting

    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int userid = 0;
        userid = int.Parse(GridView1.DataKeys[e.RowIndex].Values[0].ToString());

        try
        {

             UserBLL ub = new UserBLL();
            int i = ub.DeleteUser(userid);
           if(i==1)
           {  Response.Write("<script language='javascript'>alert('User has been deleted !');</script>");
            GridView1.DataBind();
           }

           else
                Response.Write("<script language='javascript'>alert('User is failed to be deleted !');</script>");
        }
           catch (SqlException ex)
           {

           Response.Write(ex.ToString());

           }
    }
开发者ID:njain006,项目名称:CodeSense,代码行数:25,代码来源:AdminUser.aspx.cs

示例10: gvExaminationInfo_RowDeleting

 protected void gvExaminationInfo_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     int ID = (int)gvExaminationInfo.DataKeys[e.RowIndex].Value;//获取GridView主键的值
     string strsql = "delete from tb_examDetail where ID ='" + ID + "'";
     BaseClass.OperateData(strsql);
     gvExaminationInfo_Bind();
 }
开发者ID:huangwenbing,项目名称:hwb,代码行数:7,代码来源:ChangeExam.aspx.cs

示例11: gvwCamera_RowDeleting

 protected void gvwCamera_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     string id = gvwCamera.DataKeys[e.RowIndex].Value.ToString();
     CameraManager cm = new CameraManager();
     cm.DeleteCamera(id, Session["userid"].ToString());
     Query();
 }
开发者ID:qqeip,项目名称:projectofmytest,代码行数:7,代码来源:InquiryCamera.aspx.cs

示例12: gvGoodsInfo_RowDeleting

    protected void gvGoodsInfo_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int IntProductID = Convert.ToInt32(gvGoodsInfo.DataKeys[e.RowIndex].Value); 
        string strSql = "select count(*) from OrderDetail where ProductID=" + IntProductID;
        SqlCommand myCmd = dbObj.GetCommandStr(strSql);
        
        if (Convert.ToInt32(dbObj.ExecScalar(myCmd)) > 0)
        {
            Response.Write(ccObj.MessageBox("You can't delete this product since is using now."));
        }
        else
        {
            string strDelSql = "delete from Products where ProductID=" + IntProductID;
            SqlCommand myDelCmd = dbObj.GetCommandStr(strDelSql);
            dbObj.ExecNonQuery(myDelCmd);
            
            if (ViewState["search"] != null)
            {
                gvSearchBind();
            }
            else
            {
                gvBind();
            }

        }
    }
开发者ID:nikkiLuan,项目名称:ASP.NET-Online-Order-System,代码行数:27,代码来源:ProductList.aspx.cs

示例13: DiaryGridView_RowDeleting

    protected void DiaryGridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int diaryId = (int)DiaryGridView.DataKeys[e.RowIndex].Value;
        svc.DeleteDiaryItem(diaryId);

        UpdateGridView();
    }
开发者ID:Guildfordians,项目名称:ClubSite,代码行数:7,代码来源:SocialDiary.aspx.cs

示例14: GvJuguetes_RowDeleting

 protected void GvJuguetes_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     EntJuguete ent = new EntJuguete();
     ent.Id = Convert.ToInt32(GvJuguetes.DataKeys[e.RowIndex].Values["Id"].ToString());
     new BusJuguete().Borrar(ent);
     Response.Redirect(Request.CurrentExecutionFilePath);
 }
开发者ID:LUISMTZLOPEZ,项目名称:Juguetes,代码行数:7,代码来源:Ventas.aspx.cs

示例15: gvReaderInfo_RowDeleting

 protected void gvReaderInfo_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     string id = gvReaderInfo.DataKeys[e.RowIndex].Value.ToString();
     string sql = "delete tb_readerInfo where readerBarCode='" + id + "'";
     dataOperate.execSQL(sql);
     bindReaderInfo();
 }
开发者ID:honglinchen,项目名称:info-management,代码行数:7,代码来源:readerInfo.aspx.cs


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