public void ShowPopup(System.Windows.Forms.Form owner, System.Drawing.Point location)
        {
            if (popup != null)
            {
                popup.Close();
                popup = null;
            }

            popup              = new views.popup.YosanHojoKamokuPopup();
            popup.PopupClosed += delegate() {
                popup                = null;
                gridController       = null;
                yosanHojoKamokuTable = null;
            };

            yosanHojoKamokuTable = new models.db.vtables.UsableYosanHojoKamoku(Context.KaikeiDatabase);

            gridController = new grid.DBPanelGridController <views.grid.YosanHojoKamokuRow>(popup.Grid, true);
            gridController.SetTable(yosanHojoKamokuTable);
            gridController.RowUpdated         += (row) => SetSumAmount();
            gridController.InitInsertedRow    += Grid_InitInsertedRow;
            gridController.RowDeleted         += (row) => SetSumAmount();
            gridController.Row_GotFocusAction += (row) => RowSelectionChanged();
            gridController.SetQuery("");

            popup.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            popup.Location      = location;

            popup.Show(owner);
        }
 public void ClosePopup()
 {
     if (popup != null)
     {
         popup.Close();
         popup = null;
     }
 }
 public YosanHojoKamokuPopupController()
 {
     popup = null;
 }