コード例 #1
0
        private void Testbutton_Click(object sender, EventArgs e)
        {
            string saveName;
            string saveDate = "";
            string saveTime = "";

            saveDate = System.DateTime.Now.ToString("yyyy-MM-dd");
            saveTime = System.DateTime.Now.ToString("hh:mm");

            //TestlistBox1.Items.Add(System.DateTime.Now.ToString("yyyy-MM-dd"));
            //String saveName =
            //saveListView.Items.Add("1");
            extForms.InputBoxCsharp inputBox1 = new extForms.InputBoxCsharp();
            inputBox1.ShowDialog();

            //saveName = inputBox1.txtSaveName + "_" + saveDate + "_" + saveTime;
            saveName = inputBox1.txtSaveName;


            ListViewItem lvi = new ListViewItem();

            lvi.Text = saveName;        // Name
            lvi.SubItems.Add("");       // Rev
            lvi.SubItems.Add(saveDate); // Update Date
            lvi.SubItems.Add(saveTime); // Update Time
            saveListView.Items.Add(lvi);

            DataTable dtRev = new DataTable();

            dtRev.Columns.Add("LoadNum");
            dtRev.Columns.Add("Rev");
            dtRev.Columns.Add("UpdateDate");
            dtRev.Columns.Add("UpdateTime");
            foreach (ListViewItem item in saveListView.Items)
            {
                dtRev.Rows.Add(item.SubItems[0].Text, item.SubItems[1].Text, item.SubItems[2].Text, item.SubItems[3].Text);
            }

            dtRev.Upload2("RevLoad_Table");
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Sho20/In2S3D_v4
        private void Testbutton_Click(object sender, EventArgs e)
        {
            string saveName;
            string saveDate = "";
            string saveTime = "";
            saveDate = System.DateTime.Now.ToString("yyyy-MM-dd");
            saveTime = System.DateTime.Now.ToString("hh:mm");

            //TestlistBox1.Items.Add(System.DateTime.Now.ToString("yyyy-MM-dd"));
            //String saveName = 
            //saveListView.Items.Add("1");
            extForms.InputBoxCsharp inputBox1 = new extForms.InputBoxCsharp();
            inputBox1.ShowDialog();

            //saveName = inputBox1.txtSaveName + "_" + saveDate + "_" + saveTime;
            saveName = inputBox1.txtSaveName;


            ListViewItem lvi = new ListViewItem();
            lvi.Text = saveName; // Name
            lvi.SubItems.Add(""); // Rev
            lvi.SubItems.Add(saveDate); // Update Date
            lvi.SubItems.Add(saveTime); // Update Time
            saveListView.Items.Add(lvi);

            DataTable dtRev = new DataTable();
            dtRev.Columns.Add("LoadNum");
            dtRev.Columns.Add("Rev");
            dtRev.Columns.Add("UpdateDate");
            dtRev.Columns.Add("UpdateTime");
            foreach (ListViewItem item in saveListView.Items)
            {

                dtRev.Rows.Add(item.SubItems[0].Text, item.SubItems[1].Text, item.SubItems[2].Text, item.SubItems[3].Text);


            }

            dtRev.Upload2("RevLoad_Table");



        }