private void gridView1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            var rowObject = CommonViewsActions.GetSelectedRowObject(layoutView1);

            if (rowObject is ReadyInvoicesForAction)
            {
                InvoiceObject =
                    MerkDBBusinessLogicEngine.GetInvoiceFullTree(Convert.ToInt32((rowObject as ReadyInvoicesForAction).InvoiceID));
                btnPayments.Enabled = true;
            }
        }
        private void gridControl1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            var rowObject = CommonViewsActions.GetSelectedRowObject(gridView1);

            if (rowObject is GetInvoiceForAddmission_Result)
            {
                InvoiceObject invoiceObject =
                    MerkDBBusinessLogicEngine.GetInvoiceFullTree(((GetInvoiceForAddmission_Result)rowObject).InvoiceID);
                if (invoiceObject == null)
                {
                    return;
                }

                MainPatientInvoiceActions patienActions = new MainPatientInvoiceActions();
                patienActions.Initialize(invoiceObject);
                PopupBaseForm.ShowAsPopup(patienActions, this);
            }
        }