Exemplo n.º 1
0
        private void bt_Chg_Click(object sender, EventArgs e)
        {
            DataGridView dg = dataGridView1;

            if (dg.CurrentRow == null)
            {
                return;
            }

            System.Data.DataRowView rv = (System.Data.DataRowView)dg.CurrentRow.DataBoundItem;
            if (rv == null)
            {
                return;
            }
            LogInfo.DataSetBox.BoxInfoRow row = (LogInfo.DataSetBox.BoxInfoRow)rv.Row;
            FormBoxAdd frm = new FormBoxAdd(row.Âß¼­ÏäºÅ, row.·ÖÏäÕýÃæbnºÅ, row.·ÖÏä±³ÃæbnºÅ, row.Ë«ÃæËø);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                row.Âß¼­ÏäºÅ     = frm.BoxNO;
                row.·ÖÏäÕýÃæbnºÅ = frm.FrontBN;
                row.·ÖÏä±³ÃæbnºÅ = frm.BackBN;
                row.Ë«ÃæËø       = frm.HasTwoLock;
            }
        }
Exemplo n.º 2
0
        private void bt_Add_Click(object sender, EventArgs e)
        {
            FormBoxAdd frm = new FormBoxAdd();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                LogInfo.DataSetBox.BoxInfoRow row = dataSetBox1.BoxInfo.NewBoxInfoRow();
                row.Âß¼­ÏäºÅ     = frm.BoxNO;
                row.·ÖÏäÕýÃæbnºÅ = frm.FrontBN;
                row.·ÖÏä±³ÃæbnºÅ = frm.BackBN;
                row.Ë«ÃæËø       = frm.HasTwoLock;
                dataSetBox1.BoxInfo.AddBoxInfoRow(row);
            }
        }