コード例 #1
0
        /// <summary>
        /// 角色没有权限的机台状态显示在右边
        /// </summary>
        private void BindDataToUnSelectStatus()
        {
            if (clbUnSelectStatus.Items.Count > 0)//如果已经有了就先清空
            {
                clbUnSelectStatus.Items.Clear();
            }
            DataSet dsUnSelectStatus = new DataSet();

            dsUnSelectStatus = privilegeEntity.GetStatusOfRole("UNSELECT");
            if (privilegeEntity.ErrorMsg == "")
            {
                if (dsUnSelectStatus.Tables.Count > 0)
                {
                    for (int i = 0; i < dsUnSelectStatus.Tables[0].Rows.Count; i++)
                    {
                        string statusName = dsUnSelectStatus.Tables[0].Rows[i][RBAC_ROLE_OWN_STATUS_FIELDS.FIELD_EQUIPMENT_STATE_NAME].ToString();
                        clbUnSelectStatus.Items.Add(statusName);
                    }
                }
            }
            else
            {
                MessageService.ShowError("${res:FanHai.Hemera.Addins.Msg.ReadFailed}");
            }
        }