123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using DevExpress.XtraEditors;
- using Uninpho.DBOperation.Model;
- using System.IO;
- using Uninpho.DBOperation.Operation;
- using System.Text.RegularExpressions;
- using System.Reflection;
- namespace Uninpho.Tools.components.DWForm
- {
- public partial class ImportGLdatamanageForm : DevExpress.XtraEditors.XtraForm
- {
- public ImportGLdatamanageForm()
- {
- InitializeComponent();
- }
-
- private void simpleButton2_Click(object sender, EventArgs e)
- {
-
- OpenFileDialog openFileDialog = new OpenFileDialog
- {
-
- Title = "选择文件",
-
- InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
-
- Filter = "文本 (*.txt)|*.txt"
- };
-
- if (openFileDialog.ShowDialog() == DialogResult.OK)
- {
-
- txtindir.Text = openFileDialog.FileName;
- }
- }
-
- private void newCreateBtnSon_Click(object sender, EventArgs e)
- {
-
- }
-
- private void NewcancelBtn_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
-
- List<T_dwfile_account> dwglData = new List<T_dwfile_account>();
-
- private void xianlumingText_SelectedIndexChanged(object sender, EventArgs e)
- {
- }
-
- private void ImportGLdatamanageForm_Load(object sender, EventArgs e)
- {
- dwglData = DBOperation.Operation.DataAnalysisToPG.QueryDWGLALL();
-
- var listtgXLMALL = dwglData.GroupBy(c => c.Xianlu).Select(c => c.First()).ToList();
- foreach (var item in listtgXLMALL)
- {
- xianlumingText.Properties.Items.Add(item.Xianlu);
- }
- }
-
- private void xianlumingText_EditValueChanged(object sender, EventArgs e)
- {
- zhanmingText.Properties.Items.Clear();
- var isInputTrueXLM = dwglData.FindAll(delegate (T_dwfile_account dwgl)
- {
- return dwgl.Xianlu == xianlumingText.Text;
- });
-
- if (isInputTrueXLM.Count != 0)
- {
- var listtg = isInputTrueXLM.GroupBy(c => c.Chezhan).Select(c => c.First()).ToList();
- foreach (var item in listtg)
- {
- zhanmingText.Properties.Items.Add(item.Chezhan);
- }
- zhanmingText.Enabled = true;
- }
- else
- {
- zhanmingText.Enabled = false;
- }
- zhanmingText.Text = "";
- }
-
- }
- }
|