Exemple #1
0
 private void iOpen_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
     int[] selectedRows = gridView1.GetSelectedRows();
     if (selectedRows.Length > 1) {
         XtraMessageBox.Show(this, "Для редактирования необходимо выбрать только один текст.",
             Grammatica2._0.Properties.Resources.Grammarica20, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         return;
     }
     ViewRecord record = gridView1.GetFocusedRow() as ViewRecord;
     if (record == null) return;
     using (TextEditForm form = new TextEditForm((Guid)record["Oid"])) {
         form.ShowDialog(this);
     }
     xpView1.Reload();
 }
Exemple #2
0
 private void iNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
     using (TextEditForm form = new TextEditForm(Guid.Empty)) {
         form.ShowDialog(this);
     }
     xpView1.Reload();
 }