Пример #1
0
        private void LoadRoles()
        {
            List <ModelBookStore.Role>  objRolesList = objBLUserRole.LoadRoles();
            Dictionary <string, string> lstRoles     = new Dictionary <string, string>();

            foreach (var item in objRolesList)
            {
                lstRoles.Add(item.id.ToString(), item.Name.ToString());
            }
            if (objRolesList.Count > 0)
            {
                cmbRoleType.DataSource    = new BindingSource(lstRoles, null);
                cmbRoleType.DisplayMember = "Value";
                cmbRoleType.ValueMember   = "Key";
            }

            else
            {
                MessageBox.Show("Please Add Any one role in Roles screen before to User Mapping");
                this.Hide();
                FrmRoles roles = new FrmRoles();
                roles.Show();
            }
        }
Пример #2
0
        private void tsmRoles_Click(object sender, EventArgs e)
        {
            FrmRoles objRole = new FrmRoles();

            objRole.Show();
        }