Ejemplo n.º 1
0
        private void toolStripButtonEDIT_Click(object sender, EventArgs e)
        {
            object[] oT = new object[dataGridViewProduct.ColumnCount];

            if (dataGridViewProduct.SelectedRows.Count < 1)
            {
                MessageBox.Show("please select Customer", "Infomation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            dSet.Tables["indentor1"].Clear();
            System.Data.DataTable dt = dSet.Tables["indentor1"];

            for (int i = dataGridViewProduct.SelectedRows.Count - 1; i >= 0; i--)
            {
                for (int j = 0; j < oT.Length; j++)
                {
                    oT[j] = dataGridViewProduct.SelectedRows[i].Cells[j].Value;
                }
                dt.Rows.Add(oT);
            }

            FormIndentor_CARD formIndentor_CARD = new FormIndentor_CARD();

            formIndentor_CARD.strConn = strConn;
            formIndentor_CARD.dt      = dt;
            formIndentor_CARD.iStyle  = 1;

            formIndentor_CARD.ShowDialog();
            initDataView(formIndentor_CARD.iSelect);
        }
Ejemplo n.º 2
0
        private void ToolStripButtonADD_Click(object sender, EventArgs e)
        {
            dSet.Tables["indentor1"].Clear();
            System.Data.DataTable dt = dSet.Tables["indentor1"];

            FormIndentor_CARD formIndentor_CARD = new FormIndentor_CARD();

            formIndentor_CARD.strConn = strConn;
            formIndentor_CARD.dt      = dt;
            formIndentor_CARD.iStyle  = 0;

            formIndentor_CARD.ShowDialog();
            initDataView(formIndentor_CARD.iSelect);
        }