Example #1
0
 public MoreDetail(string BianHao)
 {
     InitializeComponent();
     Db             = new DBProcess();
     ExportDia      = new FolderBrowserDialog();
     HeTongBianHao  = BianHao;
     Cursor.Current = Cursors.WaitCursor;
     wordApp        = new Microsoft.Office.Interop.Word.ApplicationClass();
     Cursor.Current = Cursors.Default;
 }
Example #2
0
        public SearchForm()
        {
            InitializeComponent();

            Ds        = new DataSet();
            Db        = new DBProcess();
            ExportDia = new SaveFileDialog();

            ExportDia.AutoUpgradeEnabled = false;
            ExportDia.Filter             = "Execl表格|.xls";;
            ExportDia.FileName           = "工单";
            ExportDia.Title            = "导出";
            ExportDia.RestoreDirectory = false;

            ExportDia.InitialDirectory = "D:";
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            XmlProcess xml = new XmlProcess();
            DBProcess  DB  = new DBProcess();

            if (TxtAddName.Text == "")
            {
                return;
            }

            if (xml.ItemCount(Type, TxtAddName.Text) == 0)
            {
                DB.AlterTableAdd("add", TxtAddName.Text);
                MessageBox.Show("该字段为首次添加");
            }
            xml.AddItem(Type, TxtAddName.Text);
            TxtAddName.Text = "";
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            DBProcess DB = new DBProcess();

            if (xml.ItemCount(Type, CboxDel.Text) == 1)
            {
                DB.AlterTableAdd("del", CboxDel.Text);
                MessageBox.Show("该字段已在表内删除");
            }

            Control[] colLbl = new Control[1];
            Control[] colCbo = new Control[1];
            if ((colLbl = panel.Controls.Find("Lbl" + CboxDel.Text, false)).Count() > 0 && (colCbo = panel.Controls.Find(CboxDel.Text, false)).Count() > 0)
            {
                colLbl[0].Dispose();
                colCbo[0].Dispose();
                //  MessageBox.Show("del find");
            }


            xml.DelItem(Type, CboxDel.Text);
            CboxDel.Text = "";
        }