コード例 #1
0
        /// <summary>
        /// binds datasource
        /// </summary>
        /// <param name="outVo"></param>
        private void BindDataSource(List <AuthorityControlVo> outVo)
        {
            AuthorityControldetails_dgv.AutoGenerateColumns = false;
            BindingSource bindingSource1 = new BindingSource(outVo, null);

            if (bindingSource1 != null && bindingSource1.Count > 0)
            {
                AuthorityControldetails_dgv.DataSource = bindingSource1;
            }
            else
            {
                messageData = new MessageData("tpci00006", Properties.Resources.mmci00006, null);
                logger.Info(messageData);
                popUpMessage.Information(messageData, Text);
            }
            AuthorityControldetails_dgv.ClearSelection();
        }
コード例 #2
0
        /// <summary>
        /// Fills all authority records to gridview control
        /// </summary>
        private void GridBind(AuthorityControlVo conditionInVo)
        {
            AuthorityControldetails_dgv.DataSource = null;

            try
            {
                AuthorityControlVo outVo = (AuthorityControlVo)base.InvokeCbm(new GetAuthorityControlMasterMntCbm(), conditionInVo, false);

                BindingList <List <UserVo> > userBind = new BindingList <List <UserVo> >();

                AuthorityControldetails_dgv.AutoGenerateColumns = false;

                BindingSource bindingSource1 = new BindingSource(outVo.AuthorityControlListVo, null);

                if (bindingSource1 != null && bindingSource1.Count > 0)
                {
                    AuthorityControldetails_dgv.DataSource = bindingSource1;
                }
                else
                {
                    messageData = new MessageData("mmci00006", Properties.Resources.mmci00006, null);
                    logger.Info(messageData);
                    popUpMessage.Information(messageData, Text);
                }
                AuthorityControldetails_dgv.ClearSelection();

                Update_btn.Enabled = false;

                Delete_btn.Enabled = false;
            }
            catch (Framework.ApplicationException exception)
            {
                popUpMessage.ApplicationError(exception.GetMessageData(), Text);
                logger.Error(exception.GetMessageData());
            }
        }