コード例 #1
0
    protected void OnButtonCopyClicked(object sender, EventArgs e)
    {
        TreeIter iter;
        int itemid;
        ResponseType result;

        switch (notebookMain.CurrentPage) {
        case 2:
            treeviewContract.Selection.GetSelected (out iter);
            itemid = (int)ContractSort.GetValue (iter, (int)ContractCol.id);
            ContractDlg winContract = new ContractDlg (itemid, true);
            winContract.Show ();
            result = (ResponseType)winContract.Run ();
            winContract.Destroy ();
            if (result == ResponseType.Ok)
                UpdateContract ();
            break;
        default:
            break;
        }
    }
コード例 #2
0
    protected virtual void OnButtonViewClicked(object sender, System.EventArgs e)
    {
        TreeIter iter;
        int type, itemid;
        string place;
        ResponseType result;

        switch (notebookMain.CurrentPage) {
        case 0:
            treeviewPlaces.Selection.GetSelected (out iter);
            place = PlaceSort.GetValue (iter, (int)PlaceCol.place_no).ToString ();
            type = Convert.ToInt32 (PlaceSort.GetValue (iter, (int)PlaceCol.type_place_id));
            int id = Convert.ToInt32 (PlaceSort.GetValue (iter, (int)PlaceCol.id));
            PlaceDlg winPlace = new PlaceDlg (id);
            winPlace.Show ();
            result = (ResponseType)winPlace.Run ();
            winPlace.Destroy ();
            if (result == ResponseType.Ok)
                UpdatePlaces ();
            break;
        case 1:
            treeviewLessees.Selection.GetSelected (out iter);
            itemid = Convert.ToInt32 (LesseesSort.GetValue (iter, (int)LesseesCol.id));
            LesseeDlg winLessee = new LesseeDlg ();
            winLessee.Fill (itemid);
            winLessee.Show ();
            result = (ResponseType)winLessee.Run ();
            winLessee.Destroy ();
            if (result == ResponseType.Ok)
                UpdateLessees ();
            break;
        case 2:
            treeviewContract.Selection.GetSelected (out iter);
            itemid = (int)ContractSort.GetValue (iter, (int)ContractCol.id);
            ContractDlg winContract = new ContractDlg (itemid);
            winContract.Show ();
            result = (ResponseType)winContract.Run ();
            winContract.Destroy ();
            if (result == ResponseType.Ok)
                UpdateContract ();
            break;
        default:
            break;
        }
    }
コード例 #3
0
 protected virtual void OnButtonAddClicked(object sender, System.EventArgs e)
 {
     switch (notebookMain.CurrentPage) {
     case 0:
         PlaceDlg winPlace = new PlaceDlg ();
         winPlace.Show ();
         winPlace.Run ();
         winPlace.Destroy ();
         UpdatePlaces ();
         break;
     case 1:
         LesseeDlg winLessee = new LesseeDlg ();
         winLessee.Show ();
         winLessee.Run ();
         winLessee.Destroy ();
         UpdateLessees ();
         break;
     case 2:
         ContractDlg winContract = new ContractDlg ();
         winContract.Show ();
         winContract.Run ();
         winContract.Destroy ();
         UpdateContract ();
         break;
     default:
         break;
     }
 }