Example #1
0
        public static void ChangeCaptionTreeList(string parent_name, string language, TreeList tree_list)
        {
            var columnList = CaptionEngine.GetControlCaptionList(parent_name, tree_list.Name, BaseConstant.GRID_COLUMN, language);

            if (columnList != null && columnList.Count > 0)
            {
                foreach (TreeListColumn column in tree_list.Columns)
                {
                    var caption = (from item in columnList
                                   where item.Name.ToLower().Equals(column.Name.ToLower())
                                   select item.Caption).FirstOrDefault();
                    if (!string.IsNullOrEmpty(caption))
                    {
                        column.Caption = caption;
                    }
                }
            }
        }
Example #2
0
        public static void ChangeCaptionGridView(string parent_name, string language, GridView grid_view)
        {
            grid_view.GroupPanelText = CaptionEngine.GetControlCaption(parent_name, grid_view.Name, BaseConstant.CONTROL_TEXT, language);
            var columnList = CaptionEngine.GetControlCaptionList(parent_name, grid_view.Name, BaseConstant.GRID_COLUMN, language);

            if (columnList != null && columnList.Count > 0)
            {
                foreach (GridColumn column in grid_view.Columns)
                {
                    var caption = (from item in columnList
                                   where item.Name.ToLower().Equals(column.Name.ToLower())
                                   select item.Caption).FirstOrDefault();
                    if (!string.IsNullOrEmpty(caption))
                    {
                        column.Caption = caption;
                    }
                }
            }
        }
Example #3
0
        public static void ChangeCaptionGridLookUpEdit(string parent_name, string language, GridLookUpEdit grid_lookup_edit)
        {
            grid_lookup_edit.Properties.NullText = "[" + CaptionEngine.GetControlCaption(parent_name, grid_lookup_edit.Name, BaseConstant.CONTROL_TEXT, language) + "]";
            var columnList = CaptionEngine.GetControlCaptionList(parent_name, grid_lookup_edit.Name, BaseConstant.GRID_COLUMN, language);

            if (columnList != null && columnList.Count > 0)
            {
                foreach (GridColumn column in grid_lookup_edit.Properties.View.Columns)
                {
                    var caption = (from item in columnList
                                   where item.Name.ToLower().Equals(column.Name.ToLower())
                                   select item.Caption).FirstOrDefault();
                    if (!string.IsNullOrEmpty(caption))
                    {
                        column.Caption = caption;
                    }
                }
            }
            grid_lookup_edit.Popup += new EventHandler(gridLookUpEdit_Popup);
        }