Exemplo n.º 1
0
 protected void Lnk_Click(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Del")
     {
         string Id = e.CommandArgument.ToString();
         gradeBll.DelCate(DataConverter.CLng(Id));
         dBind();
     }
     if (e.CommandName == "Edit")
     {
         string      Id   = e.CommandArgument.ToString();
         M_GradeCate info = gradeBll.GetCate(DataConverter.CLng(Id));
         this.txtCateName.Text   = info.CateName;
         this.txtRemark.Text     = info.Remark;
         this.txtGradeField.Text = info.GradeAlias.Replace("|", "\r\n");
         this.HdnCateID.Value    = Id;
         this.btnSave.Text       = "修改";
     }
     if (e.CommandName == "DicList")
     {
         Response.Redirect("GradeOption.aspx?CateID=" + e.CommandArgument.ToString());
     }
 }