Beispiel #1
0
        public void OpenSelectedItem()
        {
            var editor    = new ReceivingEdit();
            var receiving = receivingsBindingSource.Current as ReceivingInfo;

            editor.ShowObject(receiving);
            editor.MdiParent = this.MdiParent;
            editor.Show();
        }
Beispiel #2
0
        private void newReceivingBarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var form = new NewReceiving();

            form.ShowObject(null);
            var result = form.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                //Load the receiving edit form here
                var editor    = new ReceivingEdit();
                var receiving = context.ReceivingInfoes.SingleOrDefault(s => s.ReceivingId == form.NewReceivingId);
                editor.ShowObject(receiving);
                editor.MdiParent = this.MdiParent;
                editor.Show();
                RefreshList();
            }
        }