예제 #1
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            newAdd.caption_f = "Добавить";
            newAdd formAdd = new newAdd();

            formAdd.ShowDialog();
        }
예제 #2
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            GridView view = (GridView)grid_total.FocusedView;

            try {
                string totalId = view.GetFocusedRowCellValue("id").ToString();
                newAdd.total_id  = totalId;
                newAdd.caption_f = "Изменить";
                newAdd formAdd = new newAdd();
                formAdd.ShowDialog();
            }
            catch { XtraMessageBox.Show("Ошибка, запись не выделена.", "Ошибка"); }
        }