Пример #1
0
        public override void EditCmd()
        {
            DataRow      unionRow        = webUnionDS.Tables["webunion"].Select("id=" + Convert.ToInt32(webUnionDGV.CurrentRow.Cells["webid"].Value))[0];
            WebUnionForm newWebUnionForm = new WebUnionForm(unionRow, FormUseMode.Edit);

            if (newWebUnionForm.ShowDialog() == DialogResult.OK)
            {
                OMWorkBench.DataAgent.UpdateWebUnion(webUnionDS.Tables["webunion"]);
                webUnionDS.AcceptChanges();
            }
        }
Пример #2
0
        public override void NewCmd()
        {
            DataRow      unionRow        = webUnionDS.Tables["webunion"].NewRow();
            WebUnionForm newWebUnionForm = new WebUnionForm(unionRow, FormUseMode.New);

            if (newWebUnionForm.ShowDialog() == DialogResult.OK)
            {
                webUnionDS.Tables["webunion"].LoadDataRow(unionRow.ItemArray, false);
                OMWorkBench.DataAgent.UpdateWebUnion(webUnionDS.Tables["webunion"]);
                webUnionDS.AcceptChanges();
            }
        }