/// <summary> /// 窗体加载事件 /// </summary> private void FrmDepartment_New_Load(object sender, EventArgs e) { try { if (editForm == null) { editForm = new FrmBaseEdit(); editForm.FormBorderStyle = FormBorderStyle.None; editForm.TopLevel = false; editForm.TableName = "BS_Department"; editForm.TableCaption = "部门信息"; editForm.Sql = "select Dept.*, parent.DepartmentName as ParentDepartmentName from BS_Department as Dept left join BS_Department as parent on Dept.ParentDepartmentNo = parent.DepartmentNo order by AutoId"; editForm.PrimaryKeyColumn = "DepartmentNo"; editForm.MasterDataSet = dSDepartment; editForm.MasterBindingSource = bSDepartment; editForm.MasterEditPanel = pnlEdit; editForm.PrimaryKeyControl = textDepartmentNo; editForm.BrowseXtraGridView = gridViewDepartment; editForm.CheckControl += CheckControl; editForm.QueryDataAfter += QueryDataAfter; this.pnlToolBar.Controls.Add(editForm); editForm.Dock = DockStyle.Fill; editForm.Show(); lookUpDept.Properties.DataSource = commonDAO.QueryDepartment_AllNode(false); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex); } }
/// <summary> /// 窗体加载事件 /// </summary> private void FrmUserInfo_New_Load(object sender, EventArgs e) { try { if (editForm == null) { editForm = new FrmBaseEdit(); editForm.FormBorderStyle = FormBorderStyle.None; editForm.TopLevel = false; editForm.TableName = "BS_UserInfo"; editForm.TableCaption = "用户信息"; editForm.Sql = "select BS_UserInfo.*, BS_Department.DepartmentName from BS_UserInfo left join BS_Department on BS_UserInfo.DepartmentNo = BS_Department.DepartmentNo order by AutoId"; editForm.PrimaryKeyColumn = "AutoId"; editForm.MasterDataSet = dSUserInfo; editForm.MasterBindingSource = bSUserInfo; editForm.MasterEditPanel = pnlEdit; editForm.PrimaryKeyControl = textLoginId; editForm.BrowseXtraGridView = gridViewUserInfo; editForm.CheckControl += CheckControl; editForm.SaveRowBefore += SaveRowBefore; editForm.DeleteRowBefore += DeleteRowBefore; this.pnlToolBar.Controls.Add(editForm); editForm.Dock = DockStyle.Fill; editForm.Show(); lookUpDept.Properties.DataSource = commonDAO.QueryDepartment_AllNode(false); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex); } }
/// <summary> /// 窗体加载事件 /// </summary> private void FrmDepartment_New_Load(object sender, EventArgs e) { try { lookUpDept.Properties.DataSource = commonDAO.QueryDepartment_AllNode(false); } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex); } }
private void InitControl() { try { lookUpReqDep.Properties.DataSource = commonDAO.QueryDepartment_AllNode(true); lookUpReqDep.ItemIndex = 0; gridControlUserList.DataSource = BSCommon.getUserInfoList("", "", ""); //dgvUserList.Columns[0].Width = 40; //dgvUserList.Columns[1].Width = 60; //dgvUserList.Columns[2].Width = 60; //dgvUserList.Columns[3].Width = 90; //dgvUserList.Columns[4].Width = 90; //dgvUserList.Columns[5].Width = 60; //dgvUserList.Columns[0].FieldName = dtblTmp.Columns["AutoId"].ToString(); //dgvUserList.Columns[1].FieldName = dtblTmp.Columns["LoginID"].ToString(); //dgvUserList.Columns[2].FieldName = dtblTmp.Columns["EmpName"].ToString(); //dgvUserList.Columns[3].FieldName = dtblTmp.Columns["DepartmentName"].ToString(); //dgvUserList.Columns[4].FieldName = dtblTmp.Columns["RoleName"].ToString(); //dgvUserList.Columns[5].FieldName = dtblTmp.Columns["RoleNo"].ToString(); //dgvUserList.Columns[0].Caption = "员工编号"; //dgvUserList.Columns[1].Caption = "用户编号"; //dgvUserList.Columns[2].Caption = "用户姓名"; //dgvUserList.Columns[3].Caption = "部门"; //dgvUserList.Columns[4].Caption = "角色"; //dgvUserList.Columns[5].Caption = "角色编号"; //dgvUserList.Columns[0].Visible = false; //dgvUserList.Columns[5].Visible = false; //角色combo cboRoleName.Properties.DataSource = BSCommon.getRoleList(); //cboRoleName.Properties.DisplayMember = "RoleName"; //cboRoleName.Properties.ValueMember = "RoleNo"; } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex); } }