protected void uiGridViewDesigners_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditDesigner") { DBLayer db = new DBLayer(); CurrentDesigner = Convert.ToInt32(e.CommandArgument); DataSet ds = db.GetDesignerContent(CurrentDesigner); uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString(); uiTextBoxBrief.Text = ds.Tables[0].Rows[0]["Brief"].ToString(); uiTextBoxName.Text = ds.Tables[0].Rows[0]["DesignerName"].ToString(); uiTextBoxContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString()); uiPanelViewDesigners.Visible = false; uiPanelEdit.Visible = true; } else if (e.CommandName == "DeleteDesigner") { DBLayer db = new DBLayer(); db.DeleteDesigner(Convert.ToInt32(e.CommandArgument)); CurrentDesigner = 0; BindData(); } }