/// <summary> /// 加载角色模块 /// </summary> private void loadRole() { try { listRole.Items.Clear(); listRole.BeginUpdate(); listRole.View = View.List; listRole.SmallImageList = imageList; listRole.LargeImageList = imageList; SysRoleBLL rolebll = new SysRoleBLL(); var roles = rolebll.loadData(""); foreach (var role in roles) { ListViewItem lvi = new ListViewItem(); lvi.Text = role.R_Name; lvi.Tag = role.R_Code; lvi.ImageIndex = 0; listRole.Items.Add(lvi); } listRole.Show(); listRole.EndUpdate(); } catch (Exception ex) { untCommon.ErrorMsg("权限管理加载角色数据异常:" + ex.Message); } }
private void loadDroplistData() { try { //SysDepartmentBLL departmentbll = new SysDepartmentBLL(); //var rowss = departmentbll.loadData(""); //D_Code.DataSource = rows; //D_Code.ValueMember = "D_Code"; //D_Code.DisplayMember = "D_Name"; AMBaseDepartmentBLL AMBaseDepartmentBLL = new AMBaseDepartmentBLL(); List <AMBaseDepartmentEntity> rows = AMBaseDepartmentBLL.GetList_D_Name(); D_Code.DataSource = rows; D_Code.DisplayMember = "F_FullName"; // D_Code.ValueMember = "D_Code"; //if (string.IsNullOrEmpty(department)) //{ // D_Code.SelectedIndex = 0; //} //else //{ // D_Code.SelectedValue = department; //} SysRoleBLL rolebll = new SysRoleBLL(); var datas = rolebll.loadData(""); R_Code.DataSource = datas; R_Code.ValueMember = "R_Code"; R_Code.DisplayMember = "R_Name"; Mes_TeamBLL TeamBLL = new Mes_TeamBLL(); var Teams = TeamBLL.GetList_Team(""); cmbTeam.DataSource = Teams; cmbTeam.ValueMember = "T_Code"; cmbTeam.DisplayMember = "T_Name"; //if (string.IsNullOrEmpty(role)) //{ // R_Code.SelectedIndex = 0; //} //else //{ // R_Code.SelectedValue = role; //} } catch (Exception ex) { untCommon.ErrorMsg("用户管理加载数据异常:" + ex.Message); } }
public void loadData(string key = "") { try { SysRoleBLL companybll = new SysRoleBLL(); var rows = companybll.loadData(key); if (rows == null || rows.Count < 1) { untCommon.InfoMsg("没有任何数据!"); return; } dataGridView.DataSource = rows; } catch (Exception ex) { untCommon.ErrorMsg("角色管理加载数据异常:" + ex.Message); } }