Esempio n. 1
0
        public string GetValueControlFormatByTypeColumns(EnumTypeColumns enumTypeColumns, Control control)
        {
            switch (enumTypeColumns)
            {
            case EnumTypeColumns.Number:
                return(String.Format("#,###.##", control.Text));

            case EnumTypeColumns.Check:
                return(String.Format("#,###.##", control.Text));

            case EnumTypeColumns.Combobox:
                return(String.Format("#,###.##", control.Text));

            case EnumTypeColumns.Date:
                return(String.Format("#,###.##", control.Text));

            case EnumTypeColumns.Gridlookup:
                return(String.Format("#,###.##", control.Text));

            case EnumTypeColumns.Text:
                return(String.Format("#,###.##", control.Text));

            case EnumTypeColumns.Time:
                return(String.Format("#,###.##", control.Text));

            default:
                return("");
            }
        }
Esempio n. 2
0
            public string GetValueByTypeFieldColumns(EnumTypeColumns TypeFieldColumns, IDeveloverControl develoverControl)
            {
                string text = "";
                Guid   guid;

                switch (TypeFieldColumns)
                {
                case EnumTypeColumns.Number:
                    text = ((Control)develoverControl).Text;
                    break;

                case EnumTypeColumns.Check:
                    text = ((CheckEdit)develoverControl).Checked ? "1" : "0";
                    break;

                case EnumTypeColumns.Combobox:
                    text = ((Control)develoverControl).Text;
                    break;

                case EnumTypeColumns.Date:
                    text = DateTime.Parse(((Control)develoverControl).Text).ToString("MM/dd/yyyy");
                    break;

                case EnumTypeColumns.Gridlookup:
                    text = ((Control)develoverControl).Text;
                    break;

                case EnumTypeColumns.Text:
                    text = ((Control)develoverControl).Text;
                    break;

                case EnumTypeColumns.Time:
                    text = ((Control)develoverControl).Text;
                    break;
                }
                if (develoverControl.IsGUID)
                {
                    new Functions().CheckGuid(text, out guid);
                    text = guid.ToString();
                }

                return(text);
            }
Esempio n. 3
0
        public static EnumTypeColumns GetTypeColumn(string StrTypeData)
        {
            EnumTypeColumns enumTypeColumns = new EnumTypeColumns();

            switch (StrTypeData)
            {
            case "Number":
                enumTypeColumns = EnumTypeColumns.Number;
                break;

            case "Check":
                enumTypeColumns = EnumTypeColumns.Check;
                break;

            case "Combobox":
                enumTypeColumns = EnumTypeColumns.Combobox;
                break;

            case "Date":
                enumTypeColumns = EnumTypeColumns.Date;
                break;

            case "Gridlookup":
                enumTypeColumns = EnumTypeColumns.Gridlookup;
                break;

            case "Text":
                enumTypeColumns = EnumTypeColumns.Text;
                break;

            case "Time":
                enumTypeColumns = EnumTypeColumns.Time;
                break;
            }
            return(enumTypeColumns);
        }