예제 #1
0
 private void btnInsert_Click(object sender, EventArgs e)
 {
     frmFigureEdit frmedit = new frmFigureEdit();
     frmFigureEdit.IdFigureEdit = 0;
     frmedit.ShowDialog();
     FillToGrid();
 }
예제 #2
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            frmFigureEdit frmedit = new frmFigureEdit();

            frmFigureEdit.IdFigureEdit = 0;
            frmedit.ShowDialog();
            FillToGrid();
        }
예제 #3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if ((lblID.Text == "") || (lblID.Text == "0"))
     {
         MessageBox.Show("Bạn hãy chọn phác đồ cần sửa!");
         return;
     }
     frmFigureEdit.IdFigureEdit = int.Parse(lblID.Text);
     frmFigureEdit frmedit = new frmFigureEdit();
     frmedit.ShowDialog();
     FillToGrid();
 }
예제 #4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if ((lblID.Text == "") || (lblID.Text == "0"))
            {
                MessageBox.Show("Bạn hãy chọn phác đồ cần sửa!");
                return;
            }
            frmFigureEdit.IdFigureEdit = int.Parse(lblID.Text);
            frmFigureEdit frmedit = new frmFigureEdit();

            frmedit.ShowDialog();
            FillToGrid();
        }
예제 #5
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdFigure = 0;
            }

            else
            {
                IdFigure = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            lblID.Text = IdFigure.ToString();

            frmFigureEdit.IdFigureEdit = IdFigure;
            frmFigureEdit frmEdit = new frmFigureEdit();

            frmEdit.ShowDialog();
            FillToGrid();
        }
예제 #6
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1) return;
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdFigure = 0;
            }

            else
            {
                IdFigure = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            lblID.Text = IdFigure.ToString();

            frmFigureEdit.IdFigureEdit = IdFigure;
            frmFigureEdit frmEdit = new frmFigureEdit();
            frmEdit.ShowDialog();
            FillToGrid();
        }