Exemplo n.º 1
0
        private SystemParameterList[] GetData(int pintPageIndex, int pintPageSize, string pstrSortExpression, string pstrFilterExpression)
        {
            OperationResult objOperationResult = new OperationResult();
            var             _objData           = _objBL.GetSystemParametersPagedAndFiltered(ref objOperationResult, pintPageIndex, pintPageSize, pstrSortExpression, pstrFilterExpression, 0).ToArray();

            if (objOperationResult.Success != 1)
            {
                MessageBox.Show("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            return(_objData);
        }
Exemplo n.º 2
0
        private SystemParameterList[] GetData(int pintPageIndex, int pintPageSize, string pstrSortExpression, string pstrFilterExpression)
        {
            OperationResult objOperationResult = new OperationResult();
            var _objData = _objBL.GetSystemParametersPagedAndFiltered(ref objOperationResult, pintPageIndex, pintPageSize, pstrSortExpression, pstrFilterExpression,0).ToArray();

            if (objOperationResult.Success != 1)
            {
                Alert.ShowInTop("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage);
            }

            return _objData;
        }
        private void LoadTreeEPP(int pintItemId)
        {
            OperationResult            objOperationResult     = new OperationResult();
            SystemParameterBL          objSystemParameterBL   = new SystemParameterBL();
            List <SystemParameterList> objSystemParameterList = new List <SystemParameterList>();

            treeViewEPP.Nodes.Clear();
            TreeNode nodePrimary = null;

            objSystemParameterList = objSystemParameterBL.GetSystemParametersPagedAndFiltered(ref objOperationResult, 0, null, "", "i_GroupId==" + pintItemId, 0);

            foreach (var item in objSystemParameterList)
            {
                switch (item.i_ParentParameterId.ToString())
                {
                    #region Add Main Nodes
                case "-1":     // 1. Add Main nodes:
                    nodePrimary      = new TreeNode();
                    nodePrimary.Text = item.v_Value1;
                    nodePrimary.Name = item.i_ParameterId.ToString();
                    treeViewEPP.Nodes.Add(nodePrimary);
                    break;

                    #endregion
                default:     // 2. Add Option nodes:
                    foreach (TreeNode tnitem in treeViewEPP.Nodes)
                    {
                        TreeNode tnOption = SelectChildrenRecursive(tnitem, item.i_ParentParameterId.ToString());

                        if (tnOption != null)
                        {
                            TreeNode childNode = new TreeNode();
                            childNode.Text = item.v_Value1;
                            childNode.Name = item.i_ParameterId.ToString();
                            tnOption.Nodes.Add(childNode);
                            break;
                        }
                    }
                    break;
                }
            }
            treeViewEPP.ExpandAll();
        }