Ejemplo n.º 1
0
        private void btnMovePt_Click(object sender, EventArgs e)
        {
            string strPIDs = "";

            foreach (DataGridViewRow dr in dgvListData.Rows)
            {
                if (dr.Cells[0].Value != null && Convert.ToBoolean(dr.Cells[0].Value))
                {
                    strPIDs += ",'" + ((DataGridViewCell)dr.Cells["Idx"]).Value.ToString() + "'";
                }
            }

            strPIDs = strPIDs.TrimStart(',');

            if (strPIDs == "")
            {
                MessageBox.Show("请选择要移动的数据!", "温馨提示:");
                return;
            }

            this.Cursor = Cursors.WaitCursor;

            By.frmDataMoveCopy frm = new By.frmDataMoveCopy(int.Parse(strZtID), strPIDs, strDbType, "MOVE");
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadData(true);
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 2
0
        private void 移动到ToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            DataGridViewCell cell   = (DataGridViewCell)dgvListData.SelectedRows[0].Cells["Idx"];
            string           strPID = cell.Value.ToString();

            By.frmDataMoveCopy frm = new By.frmDataMoveCopy(int.Parse(strZtID), strPID, strDbType, "MOVE");
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadData(true);
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 3
0
        private void btnMovePt_Click(object sender, EventArgs e)
        {
            string strPIDs = "";
            foreach (DataGridViewRow dr in dgvListData.Rows)
            {
                if (dr.Cells[0].Value != null && Convert.ToBoolean(dr.Cells[0].Value))
                {
                    strPIDs += ",'" + ((DataGridViewCell)dr.Cells["Idx"]).Value.ToString() + "'";

                }
            }

            strPIDs = strPIDs.TrimStart(',');

            if (strPIDs == "")
            {
                MessageBox.Show("请选择要移动的数据!", "温馨提示:");
                return;
            }

            this.Cursor = Cursors.WaitCursor;

            By.frmDataMoveCopy frm = new By.frmDataMoveCopy(int.Parse(strZtID), strPIDs, strDbType, "MOVE");
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadData(true);
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 4
0
        private void 移动到ToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            DataGridViewCell cell = (DataGridViewCell)dgvListData.SelectedRows[0].Cells["Idx"];
            string strPID = cell.Value.ToString();

            By.frmDataMoveCopy frm = new By.frmDataMoveCopy(int.Parse(strZtID), strPID, strDbType, "MOVE");
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadData(true);
            }

            this.Cursor = Cursors.Default;
        }