Esempio n. 1
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            string dirDest = strPrint + comboBox1.Text;
            string srcDest = strLib + comboBox4.Text + @"\" + comboBox3.Text + @"\" + comboBox2.Text + @"\";

            if (!Directory.Exists(srcDest))
            {
                MessageBox.Show(this, srcDest + "不存在!");
                return;
            }

            string[] files = Directory.GetFiles(srcDest);

            foreach (string strFile in files)
            {
                string sFile = dirDest + @"\" + comboBox2.Text + @"\" + Path.GetFileName(strFile);
                string sDir  = Path.GetDirectoryName(sFile);
                if (!Directory.Exists(sDir))
                {
                    Directory.CreateDirectory(sDir);
                }

                File.Copy(strFile, sFile, true);
            }

            OutLibData.InsertOutLib(comboBox1.Text, comboBox3.Text, comboBox2.Text, comboBox4.Text);
            MessageBox.Show(this, "借出成功!");
        }
Esempio n. 2
0
        private void button2_Click(object sender, System.EventArgs e)
        {
            if (tabControl1.SelectedTab == tabPage2)
            {
                if (textBox1.Text == "")
                {
                    MessageBox.Show(this, "信息输入不完整!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                IList list1 = OutLibData.GetOutLibByPumpName(textBox1.Text);
                dataGrid1.DataSource = list1;
            }

            if (tabControl1.SelectedTab == tabPage1)
            {
                IList list1 = OutLibData.GetOutLibByUserName(comboBox1.Text);
                dataGrid1.DataSource = list1;
            }
        }
Esempio n. 3
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            IList outs = OutLibData.GetAllOutLibs();

            dataGrid1.DataSource = outs;
        }