private void Fill_trvConceptExpression_Concept()
        {
            #region image and initialization
            string[] retMessage = new string[4];
            this.InitializeCulture();
            #endregion

            try
            {
                var rootExprsnCncpt = BExpression.GetByParentId(null).FirstOrDefault();
                if (rootExprsnCncpt == null)
                {
                    return;
                }

                var NodeValueExpressions_Object = new NodeValueExpressions();

                List <ConceptExpression> organizationUnitChlidList = this.BExpression.GetByParentId(rootExprsnCncpt.ID);

                NodeValueExpressions_Object.MakeJsonObjectListString(organizationUnitChlidList, this.trvExpressions_Expressions, this.LangProv.GetCurrentLanguage(), false);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
        private void Fill_trvConceptExpression_ConceptRuleEditor()
        {
            #region image and initialization
            string[] retMessage = new string[4];
            this.InitializeCulture();
            #endregion

            try
            {
                var rootExprsnCncpt = BConceptExpression.GetRoot();
                if (rootExprsnCncpt == null)
                {
                    return;
                }

                #region Create root node and details

                var NodeValueExpressions_Object = new NodeValueExpressions();

                #endregion

                List <ConceptExpression> organizationUnitChlidList = this.BConceptExpression.GetByParentId(rootExprsnCncpt.ID);

                NodeValueExpressions_Object.MakeJsonObjectListString(organizationUnitChlidList, this.trvConceptExpression_ConceptRuleEditor, this.LangProv.GetCurrentLanguage(), false);
            }
            catch (UIValidationExceptions ex)
            {
                retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
                this.ErrorHiddenField_trvConceptExpression_ConceptRuleEditor.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            }
            catch (UIBaseException ex)
            {
                retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
                this.ErrorHiddenField_trvConceptExpression_ConceptRuleEditor.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            }
            catch (Exception ex)
            {
                retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
                this.ErrorHiddenField_trvConceptExpression_ConceptRuleEditor.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            }
        }
Exemplo n.º 3
0
        public string[] GetChildrenOnCreation_ConceptEditorPage(string parentDbId, string parentId)
        {
            StringBuilder.CreateString(parentDbId);

            string[] retMessage = new string[5];
            try
            {
                UIActionType uam = UIActionType.ADD;

                var NodeValueExpressions = new NodeValueExpressions();

                var organizationUnitChlidList = this.BConceptExpression.GetChildrenOnCreation(Convert.ToDecimal(StringBuilder.CreateString(parentDbId)));

                var strJSON = NodeValueExpressions.MakeJsonObjectListString(organizationUnitChlidList);

                retMessage[0] = GetLocalResourceObject("RetSuccessType").ToString();

                retMessage[1] = "";
                retMessage[2] = "success";
                retMessage[3] = StringBuilder.CreateString(parentId);;
                retMessage[4] = strJSON;

                return(retMessage);
            }
            catch (UIValidationExceptions ex)
            {
                retMessage = this.ExceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
                return(retMessage);
            }
            catch (UIBaseException ex)
            {
                retMessage = this.ExceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
                return(retMessage);
            }
            catch (Exception ex)
            {
                retMessage = this.ExceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
                return(retMessage);
            }
        }
Exemplo n.º 4
0
        private void Fill_trvConceptExpression_Concept()
        {
            #region image and initialization
            string imageUrl_Yellow  = "Images\\TreeView\\folder.gif";
            string imagePath_Yellow = "Images/TreeView/folder.gif";

            var imageUrl_Blue  = "Images\\TreeView\\folder_blue.gif";
            var imagePath_Blue = "Images/TreeView/folder_blue.gif";

            var imageUrl_silver  = "Images\\TreeView\\folder_silver.gif";
            var imagePath_silver = "Images/TreeView/folder_silver.gif";

            string[] retMessage = new string[4];
            this.InitializeCulture();
            #endregion

            try
            {
                var rootExprsnCncpt = BExpression.GetByParentId(null).FirstOrDefault();
                if (rootExprsnCncpt == null)
                {
                    return;
                }

                #region Create root node and details
                //var rootCncptExprsnNode = new TreeViewNode();

                var NodeValueExpressions_Object = new NodeValueExpressions();

                //rootCncptExprsnNode.ID = rootExprsnCncpt.ID.ToString();
                //rootCncptExprsnNode.Text = rootExprsnCncpt.ScriptBeginFa;
                //rootCncptExprsnNode.Value = NodeValueExpressions_Object.MakeJsonObjectListString(rootExprsnCncpt);

                //if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + imageUrl_silver))
                //    rootCncptExprsnNode.ImageUrl = imageUrl_silver;
                #endregion

                //this.trvConceptExpression_Concept.Nodes.Add(rootCncptExprsnNode);

                List <ConceptExpression> organizationUnitChlidList = this.BExpression.GetByParentId(rootExprsnCncpt.ID);

                NodeValueExpressions_Object.MakeJsonObjectListString(organizationUnitChlidList, this.trvExpressions_Expressions, this.LangProv.GetCurrentLanguage(), false);

                //if (organizationUnitChlidList.Count > 0) rootCncptExprsnNode.Expanded = true;
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            //catch (UIValidationExceptions ex)
            //{
            //    retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
            //    this.ErrorHiddenField_Posts.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            //}
            //catch (UIBaseException ex)
            //{
            //    retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
            //    this.ErrorHiddenField_Posts.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            //}
            //catch (Exception ex)
            //{
            //    retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
            //    this.ErrorHiddenField_Posts.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            //}
        }