示例#1
0
        protected void gvEC_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string keyid = e.CommandArgument.ToString();

            if (e.CommandName == "dataDelete")
            {
                if (ECTagDal.DeleteTag(keyid))
                {
                    MessageBox.popupClientMessage(this.Page, "删除成功!", "call();");

                    BindEC();
                }
                else
                {
                    MessageBox.popupClientMessage(this.Page, "删除错误!", "call();");
                }
            }
            else if (e.CommandName == "dataView")
            {
                Response.Redirect("KPI_SubECTagConfig1.aspx?ecid=" + keyid);
            }
            else if (e.CommandName == "dataCopy")
            {
                //Response.Redirect("KPI_SubECTagConfig1.aspx?ecid=" + keyid);

                //string newid = PageControl.GetGuid();

                if (ECTagDal.CopyECTag(keyid))
                {
                    MessageBox.popupClientMessage(this.Page, "复制成功,请修改相关配置!", "call();");

                    BindEC();
                }
                else
                {
                    MessageBox.popupClientMessage(this.Page, "复制错误, Copy_xxx的名称已存在!", "call();");
                }
            }
        }