Example #1
0
        private String SelectColumnNameForExract(XmlNode node)
        {
            String Res = "";

            TFrmSelectExtractColumn SelectForm = new TFrmSelectExtractColumn();
            Boolean FoundInt64Field            = false;

            foreach (XmlAttribute Attr in node.Attributes)
            {
                Int64 NumericField;

                if (Int64.TryParse(Attr.Value, out NumericField))
                {
                    FoundInt64Field = true;
                    SelectForm.AddOption(Attr.Name);
                }
            }

            if (FoundInt64Field && (SelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK))
            {
                Res = SelectForm.SelectedOption;
            }

            return(Res);
        }
Example #2
0
        private String SelectColumnNameForExract(DataTable ATbl, String ADefaultField)
        {
            String Res = "";

            TFrmSelectExtractColumn SelectForm = new TFrmSelectExtractColumn();
            Boolean FoundInt64Field            = false;

            if (ATbl.Rows.Count < 1)
            {
                return(Res);
            }

            foreach (DataColumn Col in ATbl.Columns)
            {
                if (Col.DataType == typeof(Int64))
                {
                    FoundInt64Field = true;
                    SelectForm.AddOption(Col.ColumnName);
                }
            }

            SelectForm.SelectedOption = ADefaultField;

            if (FoundInt64Field && (SelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK))
            {
                Res = SelectForm.SelectedOption;
            }

            return(Res);
        }
        private String SelectColumnNameForExract(DataTable ATbl, String ADefaultField)
        {
            String Res = "";

            TFrmSelectExtractColumn SelectForm = new TFrmSelectExtractColumn();
            Boolean FoundInt64Field = false;

            if (ATbl.Rows.Count < 1)
            {
                return Res;
            }

            foreach (DataColumn Col in ATbl.Columns)
            {
                if (Col.DataType == typeof(Int64))
                {
                    FoundInt64Field = true;
                    SelectForm.AddOption(Col.ColumnName);
                }
            }

            SelectForm.SelectedOption = ADefaultField;

            if (FoundInt64Field && (SelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK))
            {
                Res = SelectForm.SelectedOption;
            }

            return Res;
        }
Example #4
0
        private String SelectColumnNameForExract(XmlNode node)
        {
            String Res = "";

            TFrmSelectExtractColumn SelectForm = new TFrmSelectExtractColumn();
            Boolean FoundInt64Field = false;

            foreach (XmlAttribute Attr in node.Attributes)
            {
                Int64 NumericField;

                if (Int64.TryParse(Attr.Value, out NumericField))
                {
                    FoundInt64Field = true;
                    SelectForm.AddOption(Attr.Name);
                }
            }

            if (FoundInt64Field && (SelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK))
            {
                Res = SelectForm.SelectedOption;
            }

            return Res;
        }