Ejemplo n.º 1
0
        /// <summary>
        /// Fills all user records to gridview control
        /// </summary>
        private void GridBind(LineVo conditionInVo)
        {
            LineDetails_dgv.DataSource = null;

            try
            {
                LineVo outVo = (LineVo)base.InvokeCbm(new GetLineMasterMntCbm(), conditionInVo, false);

                LineDetails_dgv.AutoGenerateColumns = false;

                BindingSource lineBindingSource = new BindingSource(outVo.LineListVo, null);

                if (lineBindingSource.Count > 0)
                {
                    LineDetails_dgv.DataSource = lineBindingSource;
                }
                else
                {
                    messageData = new MessageData("mmci00006", Properties.Resources.mmci00006, null);
                    logger.Info(messageData);
                    popUpMessage.Information(messageData, Text);
                }

                LineDetails_dgv.ClearSelection();

                Update_btn.Enabled = false;

                Delete_btn.Enabled = false;
            }
            catch (Framework.ApplicationException exception)
            {
                popUpMessage.ApplicationError(exception.GetMessageData(), Text);
                logger.Error(exception.GetMessageData());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// binds datasource
        /// </summary>
        /// <param name="outVo"></param>
        private void BindDataSource(List <LineVo> outVo)
        {
            LineDetails_dgv.AutoGenerateColumns = false;
            BindingSource bindingSource1 = new BindingSource(outVo, null);

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