protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { Grid_group.DataSource = ViewState["CurrentGCGrp"] as DataTable; Grid_group.DataBind(); } }
public void BindGroupDetail(string group_id, int level) { OracleQuery2 cc2 = new OracleQuery2(); DataTable dtgroup = cc2.LoadGroupAllCreate(group_id); ViewState["CurrentEditGrp"] = dtgroup; if (dtgroup.Rows.Count > 0) { Grid_group.DataSource = dtgroup; Grid_group.DataBind(); } else { Grid_group.DataSource = null; Grid_group.DataBind(); } }
public void BindGroupDetail(string group_id, int level) { OracleQuery2 cc2 = new OracleQuery2(); DataTable dtgroup = cc2.LoadGroup(group_id); ViewState["CurrentGrp"] = dtgroup; if (dtgroup.Rows.Count > 0) { Grid_group.DataSource = dtgroup; Grid_group.DataBind(); GROUP_PANEL.Visible = true; } else { Grid_group.DataSource = null; Grid_group.DataBind(); GROUP_PANEL.Visible = false; } }
protected void DelGroup_Click(object sender, EventArgs e) { string Group_id = GROUP_IDLabel.Text;//TreeView1.SelectedNode.Value; OracleQuery2 cc2 = new OracleQuery2(); if (TreeView1.SelectedNode.Depth == 0) { return; } cc2.DeleteGroup(Group_id); TreeView1.Nodes.Clear(); bindTree(); string group_id = TreeView1.Nodes[0].Value; GROUPLabel.Text = TreeView1.SelectedNode.Text; GROUP_IDLabel.Text = TreeView1.SelectedNode.Value; Grid_group.DataSource = null; Grid_group.DataBind(); cl.DataSource = null; cl.DataBind(); BindGroupDetail(group_id, 0); }