コード例 #1
0
        /// <summary>
        /// 排序号修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void label3_Click(object sender, EventArgs e)
        {
            Point     p      = new Point(Control.MousePosition.X, Control.MousePosition.Y);
            UpdatePxh update = new UpdatePxh();

            i = label1.Text.ToString();
            k = label8.Text;
            update.Location = p;
            update.ShowDialog(this);
        }
コード例 #2
0
        private void dgvWard_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int   x = e.RowIndex;
            int   y = e.ColumnIndex;
            Point p = new Point(Control.MousePosition.X, Control.MousePosition.Y);

            if (x < 0)
            {
                return;
            }

            switch (y)
            {
            case 3: UpdatePxh update = new UpdatePxh(dgvWard.Rows[x]);    //排序
                update.Location = p;
                update.ShowDialog(this);
                break;

            case 2: UpdateJC update2 = new UpdateJC(dgvWard.Rows[x], y);    //简称
                update2.Location = p;
                update2.ShowDialog(this);
                break;

            case 6: UpdateJC update6 = new UpdateJC(dgvWard.Rows[x], y);    //简拼
                update6.Location = p;
                update6.ShowDialog(this);
                break;

            case 4: UpdateFZ update4 = new UpdateFZ(dgvWard.Rows[x]);    //分组
                update4.Location = p;
                update4.ShowDialog(this);
                break;

            case 5: dgvWard.Rows[x].Cells[y].Value = dgvWard.Rows[x].Cells[y].Value.ToString() != "True" ? true : false;
                db.SetPIVAsDB("update DWard set IsOpen='" + dgvWard.Rows[x].Cells[y].Value.ToString() + "' where WardCode='" + dgvWard.Rows[x].Cells["WardCode"].Value.ToString() + "' ");
                break;

            case 7: UpdateLM update5 = new UpdateLM(dgvWard.Rows[x]);
                update5.Location = p;
                update5.Size     = new Size(80, 36);
                update5.ShowDialog(this);
                break;

            default: break;
            }
        }