示例#1
0
        private void Init()
        {
            try
            {
                ddlType.DataSource    = EnumCollection.UserTypeList();
                ddlType.DisplayMember = "Name";
                ddlType.ValueMember   = "ID";

                ddlStatus.DataSource    = EnumCollection.UserStatusList();
                ddlStatus.DisplayMember = "Name";
                ddlStatus.ValueMember   = "ID";

                ddlDepartment.DataSource    = _context.Departments.ToList();
                ddlDepartment.DisplayMember = "Name";
                ddlDepartment.ValueMember   = "ID";

                txtSearch.Text = "";

                this.LoadUserManagers();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }