private void LoadDataGroupUser() { cls_Groups objGroup = new cls_Groups(); DataTable _dt = objGroup.GetData(); gridGroup.DataSource = _dt; gridGroup.DataBind(); if (gridGroup.Items.Count > 0) { gridGroup.Items[0].Selected = true; CheckAuThority(Convert.ToInt32(gridGroup.SelectedValue)); trFunction.ExpandAllNodes(); trFunction.Nodes[0].Selected = true; CheckDepartment(gridGroup.SelectedValue.ToString(), trFunction.SelectedValue.ToString()); } }
private void LoadGroupUser() { cls_Groups objGroup = new cls_Groups(); DataTable _dt = objGroup.GetData(); cboGroup.DataSource = _dt; cboGroup.DataValueField = "GroupID"; cboGroup.DataTextField = "GroupName"; cboGroup.DataBind(); if (cboGroup.Items.Count > 0) { cboGroup.Items[0].Selected = true; LoadListUser(cboGroup.SelectedValue); } }
private void LoadDataGroupUser() { cls_Groups objGroup = new cls_Groups(); DataTable _dt = objGroup.GetData( cboCompany.SelectedValue); gridGroup.DataSource = _dt; gridGroup.DataBind(); }
private void LoadGroupUser() { cls_Groups objGroup = new cls_Groups(); DataTable _dt = objGroup.GetData(); cboGroup.DataSource = _dt; cboGroup.DataValueField = "GroupID"; cboGroup.DataTextField = "GroupName"; cboGroup.DataBind(); if (cboGroup.Items.Count > 0) { cboGroup.SelectedIndex = 0; LoadUser(Convert.ToInt32(cboGroup.SelectedValue)); } }
private void bindData(int index) { try { //LAY DANH SACH CAC QUOC GIA RA cls_Groups objgroup = new cls_Groups(); dsGroup = objgroup.GetData(); objgroup.GroupId =0; m_grid.EditIndex = index; m_grid.DataSource = dsGroup; bool add = false; if (dsGroup.Rows.Count <= 0) { dsGroup.Rows.Add(dsGroup.NewRow()); add = true; } // m_grid.DataBind(); if(add) m_grid.Rows[0].Visible = false; if (m_grid.Rows.Count > 0) { string confirm = "return confirm('Bạn thật sự muốn xóa row này?')"; for (int i = 0; i < m_grid.Rows.Count; i++) { GridViewRow row = m_grid.Rows[i]; LinkButton lbutton1 = (LinkButton)row.FindControl("cmdDelete"); if (lbutton1 != null) { lbutton1.Visible = D_Option; lbutton1.Attributes.Add("onclick", confirm); //lbutton1.Enabled = D_Option; } LinkButton lbutton2 = (LinkButton)row.FindControl("cmdEdit"); if (lbutton2 != null) lbutton2.Visible = U_Option; } } //XET QUYETN CHO CHUC NANG INSERT GridViewRow row1 = m_grid.FooterRow; if (row1 != null) { row1.Visible = I_Option; } } catch (Exception ex) { } }
private void LoadGroupUser() { cls_Groups objGroup = new cls_Groups(); DataTable _dt = objGroup.GetData(); gridGroup.DataSource = _dt; gridGroup.DataBind(); }