Esempio n. 1
0
        private void lkpAction1_EditButtonClick(object sender, EventArgs e)
        {
            try
            {
                if (KontoView == null || KontoView.FocusedRowHandle < 0)
                {
                    return;
                }
                int rowno = KontoView.FocusedRowHandle;
                var _frm  = Activator.CreateInstance(this.AsemblyName, this.FormClassName).Unwrap() as KontoMetroForm;

                _frm.OpenForLookup = true;
                _frm.Tag           = this.Tag;
                _frm.EditKey       = Convert.ToInt32(KontoView.GetRowCellValue(
                                                         KontoView.FocusedRowHandle, "Id"));
                _frm.ShowDialog(this);
                this.LoadData();
                this.KontoView.MakeRowVisible(rowno);
                this.KontoView.FocusedRowHandle = rowno;
                this.KontoView.Focus();
            }
            catch (Exception ex)
            {
                Log.Information(ex, "edit lookup");
            }
        }
Esempio n. 2
0
 private void lkpAction1_OkButtonClick(object sender, EventArgs e)
 {
     if (KontoView.FocusedRowHandle < 0)
     {
         return;
     }
     this.SelectedValue =
         Convert.ToInt32(KontoView.GetRowCellValue(KontoView.FocusedRowHandle, "Id"));
     this.SelectedTex  = KontoView.GetRowCellValue(KontoView.FocusedRowHandle, KontoView.VisibleColumns[0]).ToString();
     this.SelectedItem = KontoView.GetRow(KontoView.FocusedRowHandle);
     this.DialogResult = DialogResult.OK;
     this.Close();
     this.Ok();
 }