• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DataGridCommandEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: g_ItemCommand

 protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         base.Response.Redirect("AdvertisementsEdit.aspx?ID=" + e.Item.Cells[6].Text + "&LotteryID=" + this.ddlLotteries.SelectedValue + "&TypeID=" + this.ddlType.SelectedValue, true);
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:7,代码来源:Advertisements.aspx.cs


示例2: grdEmpl_Itemcommand

    public void grdEmpl_Itemcommand(Object sender, DataGridCommandEventArgs e)
    {
        String loginid = "";
        DataSet dsExpand = new DataSet();
        WhitfieldPayroll _dbClass = new WhitfieldPayroll();
        switch (e.CommandName)
        {

            case "Expand":
                {

                    loginid = Convert.ToString(grdEmpl.DataKeys[e.Item.ItemIndex]);
                    dsExpand = _dbClass.GetPayRollProjectHoursForEmployee(loginid, txtFromDate.Text.Trim(), txtToDate.Text.Trim());
                    PlaceHolder exp = new PlaceHolder();
                    exp = (System.Web.UI.WebControls.PlaceHolder)e.Item.Cells[7].FindControl("ExpandedContent");
                    ImageButton img = new ImageButton();
                    img = (System.Web.UI.WebControls.ImageButton)e.Item.Cells[0].FindControl("btnExpand");
                    if (dsExpand.Tables[0].Rows.Count > 0)
                    {
                        if (img.ImageUrl == "assets/img/Plus.gif")
                        {
                            img.ImageUrl = "assets/img/Minus.gif";
                            exp.Visible = true;
                            ((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = true;
                            ((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).DisplayGrid(loginid, txtFromDate.Text.Trim(), txtToDate.Text.Trim());

                        }
                        else
                        {
                            exp.Visible = false;
                            ((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = false;
                            img.ImageUrl = "assets/img/Plus.gif";
                        }
                    }
                    else
                    {
                        if (img.ImageUrl == "assets/img/Plus.gif")
                        {
                            //((ViewDesignAdmin)(e.Item.FindControl("DynamicTable1"))).Visible = true;
                            img.ImageUrl = "assets/img/Minus.gif";
                            exp.Visible = true;
                            ((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = true;
                            ((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).DisplayGrid(loginid, txtFromDate.Text.Trim(), txtToDate.Text.Trim());
                        }
                        else
                        {
                            exp.Visible = false;
                            ((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = false;
                            img.ImageUrl = "assets/img/Plus.gif";
                        }

                    }
                    break;
                }
            default:
                {
                    break;
                }
        }
    }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:60,代码来源:whitfield_payroll.aspx.cs


示例3: grdCOSOV_CancelCommand

 public void grdCOSOV_CancelCommand(object sender, DataGridCommandEventArgs e)
 {
     //'grdSOV_CancelCommand'
     grdCOSOV.ShowFooter = true;
     grdCOSOV.EditItemIndex = -1;
     this.DisplayCOSOVGrid();
 }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:7,代码来源:Whitfield_projectInvoice.aspx.cs


示例4: g_ItemCommand

 protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         base.Response.Redirect("SiteAffichesEdit.aspx?id=" + e.Item.Cells[5].Text, true);
     }
     else if (e.CommandName == "Del")
     {
         int returnValue = -1;
         string returnDescription = "";
         if (Procedures.P_SiteAfficheDelete(base._Site.ID, long.Parse(e.Item.Cells[5].Text), ref returnValue, ref returnDescription) < 0)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_SiteAffiches");
         }
         else if (returnValue < 0)
         {
             PF.GoError(1, returnDescription, "Admin_SiteAffiches");
         }
         else
         {
             Shove._Web.Cache.ClearCache("SiteAffiches");
             Shove._Web.Cache.ClearCache("Default_GetSiteAffiches");
             this.BindData();
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:26,代码来源:SiteAffiches.aspx.cs


示例5: Grid_CartCommand

 public void Grid_CartCommand(Object sender, DataGridCommandEventArgs e)
 {
     string name = e.Item.Cells[1].Text;
     string op = e.Item.Cells[2].Text;
     int err;
     if ("Add".Equals(((Button)e.CommandSource).CommandName))
     {
         if ("新增".Equals(op) && College_Key.IsExist(name))
         {
             Response.Write("<script>window.alert('该关键词已经存在。');</script>");
             return;
         }
         err = College_Key.AuditAccept(name, op);
     }
     else
         err = College_Key.AuditReject(name, op);
     if (err == 1)
     {
         ItemsGrid.DataSource = CreateDataSource();
         ItemsGrid.DataBind(); e.Item.Cells[3].Enabled = false;
         Response.Write("<script>window.alert('操作成功。');</script>");
     }
     else
         Response.Write("<script>window.alert('通过或拒绝关键词的操作出错。');</script>");
 }
开发者ID:PhilTheAir,项目名称:Aspnet,代码行数:25,代码来源:KeywordsAuditing.aspx.cs


示例6: dgCoaches_ItemCommand

    protected void dgCoaches_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        Label lbl = (Label)e.Item.FindControl("lblid");
        id = int.Parse(lbl.Text);
        ServiceReference1.Service1Client sv = new ServiceReference1.Service1Client();
        ServiceReference1.get_Coach_By_ID_Result coaches = sv.Get_Coach_By_ID(id);
        // get train name
        string trainname = sv.get_Train_By_ID(int.Parse(coaches.Train_ID.ToString())).Train_Name;
        // show data
        ddlTrainName.SelectedValue = coaches.Train_ID.ToString();
        ddlCoachesType.SelectedItem.Text = coaches.Coach_Type;
        txtSeats.Text = coaches.Number_Of_Seats.ToString();
        _train_id = int.Parse(coaches.Train_ID.ToString());
        txtPrices.Text = coaches.Price.ToString();
        if (coaches.Status.ToString() == "Active")
        {
            RadioButton1.Checked = true;
            RadioButton2.Checked = false;
        }
        else
        {
            RadioButton2.Checked = true;
            RadioButton1.Checked = false;
        }

        ddlTrainName.Enabled = false;
        ddlCoachesType.Enabled = false;
        btnUpdate.Visible = true;
        btnDelete.Visible = true;
        btnCancel.Visible = true;
        btnAdd.Visible = false;
    }
开发者ID:QuangNguyen263,项目名称:Online-Railway-Reservation-ASP.NET,代码行数:32,代码来源:Coaches_Manager.aspx.cs


示例7: grid_ItemCommand

 public void grid_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     try
     {
         switch(e.CommandName)
         {
             case "Delete":
                 SessionManager.BlogService.DeleteHighlight(SessionManager.Ticket, int.Parse(e.CommandArgument.ToString()));
                 SessionManager.Invalidate<TransitHighlight>();
                 ReportInfo("Item Deleted");
                 GetData(source, e);
                 break;
             case "Up":
                 SessionManager.BlogService.MoveHighlight(SessionManager.Ticket, int.Parse(e.CommandArgument.ToString()), -1);
                 SessionManager.Invalidate<TransitHighlight>();
                 GetData(source, e);
                 break;
             case "Down":
                 SessionManager.BlogService.MoveHighlight(SessionManager.Ticket, int.Parse(e.CommandArgument.ToString()), 1);
                 SessionManager.Invalidate<TransitHighlight>();
                 GetData(source, e);
                 break;
         }
     }
     catch(Exception ex)
     {
         ReportException(ex);
     }
 }
开发者ID:dblock,项目名称:dblog,代码行数:29,代码来源:ManageHighlights.aspx.cs


示例8: g1_ItemCommand

    protected void g1_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Del")
        {
            long ID = Shove._Convert.StrToLong(e.Item.Cells[5].Text, 0);

            if (MSSQL.ExecuteNonQuery("update T_StationSMS set isShow = 0 where [ID] = " + ID.ToString()) < 0)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Room_Message");

                return;
            }

            Shove._Web.Cache.ClearCache("MemberMessage_System" + _User.ID.ToString());

            BindDataForSystemMessage();

            return;
        }
        else if (e.CommandName == "View")
        {
            long ID = Shove._Convert.StrToLong(e.Item.Cells[5].Text, 0);
            Response.Redirect("ViewMessage.aspx?ID=" + ID);
        }
    }
开发者ID:ichari,项目名称:ichari,代码行数:25,代码来源:Message.aspx.cs


示例9: dgvAccount_ItemCommand

 protected void dgvAccount_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.Item.DataSetIndex >= 0)
     {
         try
         {
             string cr_acc_nbr = "";
             //xác định vị trí của row
             //  Button3.Enabled = true;
             cr_acc_nbr = e.Item.Cells[3].Text;
             //lbSource_no.Text = source_no;
            // Loadreport(cr_acc_nbr);
             load_data(cr_acc_nbr);
         }
         catch (Exception ex)
         {
             #region logException
             executedb.WriteLogERROR(Session["Username"].ToString(), "IP: " + Request.UserHostAddress, this.Page.ToString(), System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex.Message);
             //executedb.WriteLogPri(Environment.NewLine + DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString() + " - " + Session["Username"].ToString() + ": " + ex.Message);
             //Response.Write("<script>alert('Error when executing coding')</script>");
             Alert.Show("Error when executing coding!!!", this);
             #endregion logException
         }
     }
 }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:25,代码来源:NVT_Credit_LichSuThanhToan.aspx.cs


示例10: grid_ItemCommand

 public void grid_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     try
     {
         switch(e.CommandName)
         {
             case "Delete":
                 SessionManager.BlogService.DeleteFeed(SessionManager.Ticket, int.Parse(e.CommandArgument.ToString()));
                 SessionManager.Invalidate<TransitFeed>();
                 ReportInfo("Item Deleted");
                 GetData(source, e);
                 break;
             case "Update":
                 int count = SessionManager.BlogService.UpdateFeed(SessionManager.Ticket, int.Parse(e.CommandArgument.ToString()));
                 ReportInfo(string.Format("Feed Updated With {0} New Item(s)", count));
                 SessionManager.Invalidate<TransitFeed>();
                 grid_OnGetDataSource(source, e);
                 grid.DataBind();
                 break;
         }
     }
     catch(Exception ex)
     {
         ReportException(ex);
     }
 }
开发者ID:dblock,项目名称:dblog,代码行数:26,代码来源:ManageFeeds.aspx.cs


示例11: g_ItemCommand

 protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         base.Response.Redirect("ExpertsPredictEdit.aspx?ID=" + e.Item.Cells[6].Text, true);
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:7,代码来源:ExpertsPredict.aspx.cs


示例12: g_ItemCommand

 protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         if (base._User == null)
         {
             JavaScript.Alert(this, "已退出登陆,请重新登陆", base.Request.Url.AbsoluteUri);
         }
         else
         {
             int num = _Convert.StrToInt(e.Item.Cells[6].Text, -1);
             if (num < 0)
             {
                 JavaScript.Alert(this, "取消定制失败!");
             }
             else if (MSSQL.ExecuteNonQuery("delete from T_CustomFriendFollowSchemes where FollowUserID = " + num.ToString() + " and UserID = " + base._User.ID.ToString(), new MSSQL.Parameter[0]) < 0)
             {
                 JavaScript.Alert(this, "取消定制失败!");
             }
             else
             {
                 Shove._Web.Cache.ClearCache("T_CustomFriendFollowSchemes" + this.HidLotteryID.Value);
                 this.BindData();
                 JavaScript.Alert(this, "取消定制成功!");
             }
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:28,代码来源:EditFriendFollowScheme.aspx.cs


示例13: gridManage_ItemCommand

 public void gridManage_ItemCommand(object sender, DataGridCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "Delete":
             {
                 int id = int.Parse(e.Item.Cells[(int)Cells.id].Text);
                 SessionManager.Delete<TransitAccountFeed>(id, SessionManager.SyndicationService.DeleteAccountFeed);
                 ReportInfo("Feed deleted.");
                 GetData(sender, e);
             }
             break;
         case "Update":
             {
                 int id = int.Parse(e.Item.Cells[(int)Cells.id].Text);
                 int item_count = SessionManager.SyndicationService.UpdateAccountFeedItems(SessionManager.Ticket, id);
                 int image_count = SessionManager.SyndicationService.UpdateAccountFeedItemImgs(SessionManager.Ticket, id);
                 int media_count = SessionManager.SyndicationService.UpdateAccountFeedItemMedias(SessionManager.Ticket, id);
                 SessionManager.InvalidateCache<TransitAccountFeedItem>();
                 SessionManager.InvalidateCache<TransitAccountFeedItemImg>();
                 SessionManager.InvalidateCache<TransitAccountFeedItemMedia>();
                 StringBuilder s = new StringBuilder("Feed updated with ");
                 s.AppendFormat("{0} new item{1}", item_count, item_count == 1 ? string.Empty : "s");
                 s.AppendFormat(", {0} new image{1}", image_count, image_count == 1 ? string.Empty : "s");
                 s.AppendFormat(" and {0} new media item{1}.", media_count, media_count == 1 ? string.Empty : "s");
                 ReportInfo(s.ToString());
                 gridManage_OnGetDataSource(sender, e);
                 gridManage.DataBind();
             }
             break;
     }
 }
开发者ID:dblock,项目名称:sncore,代码行数:32,代码来源:AccountFeedsManage.aspx.cs


示例14: dgvAccount_ItemCommand

 protected void dgvAccount_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.Item.DataSetIndex >= 0)
     {
         try
         {
             ClearDetail();
             Button3.Enabled = true;
             string source_no = "";
             //xác định vị trí của row
             Panel1.Visible = true;
             source_no = e.Item.Cells[1].Text;
             //tbType
             string type=e.Item.Cells[10].Text;
             tbType.Text = type;
             LoadDetails(source_no,type);
         }
         catch (Exception ex)
         {
             #region logException
             executedb.WriteLogERROR(Session["Username"].ToString(), "IP: " + Request.UserHostAddress, this.Page.ToString(), System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex.Message);
             //executedb.WriteLogPri(Environment.NewLine + DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString() + " - " + Session["Username"].ToString() + ": " + ex.Message);
             //Response.Write("<script>alert('Error when executing coding')</script>");
             Alert.Show("Error when executing coding!!!", this);
             #endregion logException
         }
     }
 }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:28,代码来源:SMS_GD_Register.aspx.cs


示例15: gridLookup_ItemCommand

    public void gridLookup_ItemCommand(object sender, DataGridCommandEventArgs e)
    {
        switch (e.CommandName)
        {
            case "Impersonate":

                int id = int.Parse(e.CommandArgument.ToString());

                if (SessionManager.AccountId == id)
                {
                    throw new Exception("You cannot impersonate self.");
                }

                if (!SessionManager.IsAdministrator)
                {
                    // avoid round-trip
                    throw new Exception("You must be an administrator to impersonate users.");
                }

                if (SessionManager.IsImpersonating)
                {
                    throw new Exception("You're already impersonating a user.");
                }

                SessionManager.Impersonate(SessionManager.AccountService.Impersonate(
                    SessionManager.Ticket, id));
                Response.Redirect("AccountView.aspx");

                break;
        }
    }
开发者ID:dblock,项目名称:sncore,代码行数:31,代码来源:SystemAccountsManage.aspx.cs


示例16: dgLists_ItemCommand

    protected void dgLists_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql("delete from yuantuo_terminals where id=" + id);
            WebTools.Alert(this, "删除成功!");
            TerminalOnlineMonitorThread.InitTerminalList();
            this.ProcedurePager1.Changed = true;
        }
        else if (e.CommandName == "Detail")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            this.Pop(id);

        }
        else if (e.CommandName == "Open")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            TerminalEntity entity = SimpleOrmOperator.Query<TerminalEntity>(id);
            FT.Commons.Tools.WindowExHelper.WakeUp(entity.MachineMac);
            WebTools.Alert(this,"已给终端"+entity.MachineName+"发送开机命令,请稍等片刻!!!");

        }
        else if (e.CommandName == "Close")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            TerminalEntity entity = SimpleOrmOperator.Query<TerminalEntity>(id);
            WholeBllTools.CloseComputer(entity.MachineIp);
            WebTools.Alert(this, "已给终端" + entity.MachineName + "发送关机命令,请稍等片刻!!!");

           // FT.Commons.Tools.WindowExHelper.WakeUp(entity.MachineMac);

        }
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:35,代码来源:TerminalList.aspx.cs


示例17: g_ItemCommand

 protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "QuashIsuse")
     {
         int num = _Convert.StrToInt(e.Item.Cells[10].Text, 0);
         if (num < 1)
         {
             PF.GoError(7, "找不到追号记录", base.GetType().FullName);
         }
         else
         {
             string returnDescription = "";
             int num2 = base._User.QuashChaseTaskDetail((long)num, false, ref returnDescription);
             if ((returnDescription != "") || (num2 != 0))
             {
                 PF.GoError(4, returnDescription, base.GetType().FullName);
             }
             else
             {
                 int chaseID = _Convert.StrToInt(this.labChase_id.Text, 0);
                 if (chaseID < 1)
                 {
                     PF.GoError(7, "没有记录!", base.GetType().FullName);
                 }
                 else
                 {
                     this.BindData(chaseID);
                 }
             }
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:32,代码来源:ChaseDetail.aspx.cs


示例18: DataGrid1_ItemCommand1

    protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            UserInfoOperator.Delete(id);
            WebTools.Alert(this, "删除成功!");
            this.SimplePager1.Changed = true;
        }
        else if (e.CommandName == "Detail")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            this.Pop(id);

        }
        else if (e.CommandName == "ResetPwd")
        {
            int id = Convert.ToInt32(e.CommandArgument);
            bool result = UserInfoOperator.ResetPwd(id, ConfigurationManager.AppSettings["DefaultPassword"].ToString());
            if (result)
                WebTools.Alert(this, "密码重置成功!");
            else
                WebTools.Alert(this, "密码重置失败!");

        }
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:26,代码来源:UserList.aspx.cs


示例19: g_ItemCommand

 protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "btnOK")
     {
         int num = _Convert.StrToInt(e.Item.Cells[5].Text, -1);
         int num2 = _Convert.StrToInt(e.Item.Cells[6].Text, -1);
         int num3 = _Convert.StrToInt(((TextBox)e.Item.Cells[2].FindControl("tbSystemEndAheadMinute")).Text, -1);
         int num4 = _Convert.StrToInt(((TextBox)e.Item.Cells[3].FindControl("tbChaseExecuteDeferMinute")).Text, -1);
         if (num3 < 2)
         {
             JavaScript.Alert(this.Page, "提前截止分钟数最少必须 2 分钟,否则系统执行可能会因时间过短而不能及时处理,导致数据错误!");
         }
         else
         {
             string str = e.Item.Cells[7].Text.Replace("&nbsp;", "").Trim();
             if ((str != "") && (num4 < 1))
             {
                 JavaScript.Alert(this.Page, "追号任务自动执行必须在开始时间后最少 1 分钟!");
             }
             else if (new Tables.T_PlayTypes { SystemEndAheadMinute = { Value = num3 } }.Update("[ID] = " + num.ToString()) < 0L)
             {
                 PF.GoError(4, "数据库繁忙,请重试", "Admin_LotteryTimeSet");
             }
             else if ((str != "") && (MSSQL.ExecuteNonQuery("update T_Lotteries set ChaseExecuteDeferMinute = " + num4.ToString() + " where [ID] = " + num2.ToString(), new MSSQL.Parameter[0]) < 0))
             {
                 PF.GoError(4, "数据库繁忙,请重试", "Admin_LotteryTimeSet");
             }
             else
             {
                 this.BindData();
                 JavaScript.Alert(this.Page, "保存成功。");
             }
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:35,代码来源:LotteryTimeSet.aspx.cs


示例20: DataGridbound_DeleteCommand

    protected void DataGridbound_DeleteCommand(object source, DataGridCommandEventArgs e)
    {
        int t_index = DataGridbound.CurrentPageIndex;

        DataView t_dvTemp = (DataView)this.SqlDataSourceNews.Select(DataSourceSelectArguments.Empty);
        DataTable t_tableTemp = t_dvTemp.ToTable();
        string t_idNumber = t_tableTemp.Rows[t_index*10+e.Item.ItemIndex][0].ToString();

        string t_sqlconnectstr = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        SqlConnection t_connect;
        try
        {
            t_connect = new SqlConnection(t_sqlconnectstr);
            t_connect.Open();
        }
        catch (System.Exception ex)
        {
            throw ex;
        }
        string t_str_sqlcommand = "DELETE FROM TableNews WHERE (id='$idNum$')";
        t_str_sqlcommand = t_str_sqlcommand.Replace("$idNum$", t_idNumber);
        SqlCommand t_Command = new SqlCommand(t_str_sqlcommand, t_connect);
        t_Command.ExecuteReader();

        Response.Write("<Script language='javascript'>window.top.location.href='NewsManage.aspx';</Script>");
    }
开发者ID:qkfinmmx,项目名称:HustWeb,代码行数:26,代码来源:NewsManage.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataGridContext类代码示例发布时间:2022-05-24
下一篇:
C# DataGridCell类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap