示例#1
0
        /// <summary>Hàm chuyển đổi các Field kết thúc bằng _BIT hoặc _bit thành Checkbox
        /// </summary>
        /// <param name="gridView"></param>
        public static void BitFieldToCheck(GridView gridView)
        {
            XtraGridSupport tool = new XtraGridSupport(gridView);
            string fieldName;
            for (int i = 0; i < gridView.Columns.Count; i++)
            {
                fieldName = gridView.Columns[i].FieldName;
                if (fieldName.EndsWith("_BIT") || fieldName.EndsWith("_bit"))
                {
                    tool.listOfBitField.Add(fieldName);
                }
                else if (fieldName.EndsWith("_wZzW"))
                {
                    tool.listOfBitField.Remove(fieldName.Substring(0, fieldName.Length - 5));
                }
            }

            tool.applyConvertYNToCheckbox();
        }
示例#2
0
        /// <summary>Hàm chuyển các field có phần kết thúc là _BIT hoặc _bit
        /// và Tag CBB?... chuyển thành Image Combobox
        /// </summary>
        public static void BitCBBToCheckImageCombo(GridView gridView)
        {
            XtraGridSupport tool = new XtraGridSupport(gridView);
            string fieldName;
            for (int i = 0; i < gridView.Columns.Count; i++)
            {
                fieldName = gridView.Columns[i].FieldName;
                if (fieldName.EndsWith("_BIT") || fieldName.EndsWith("_bit"))
                {
                    tool.listOfBitField.Add(fieldName);
                }
                else if (gridView.Columns[i].Tag != null && gridView.Columns[i].Tag.ToString().StartsWith("CBB?"))
                {
                    tool.listOfImageComboBoxField.Add(fieldName);
                }
                else if (fieldName.EndsWith("_wZzW"))
                {
                    tool.listOfBitField.Remove(fieldName.Substring(0, fieldName.Length - 5));
                }
            }

            tool.applyImageCombobox();
            tool.applyConvertYNToCheckbox();
        }
示例#3
0
 private static void cbbToImageComboBox(GridView gridView, List<string> listOfImageComboBoxField)
 {
     XtraGridSupport tool = new XtraGridSupport(gridView);
     tool.listOfImageComboBoxField = listOfImageComboBoxField;
     tool.applyImageCombobox();
 }
示例#4
0
 private static void bitToCheck(GridView gridView, List<string> listOfBitField)
 {
     XtraGridSupport tool = new XtraGridSupport(gridView);
     tool.listOfBitField = listOfBitField;
     tool.applyConvertYNToCheckbox();
 }