コード例 #1
0
    /// <summary>
    /// 収支テーブルから全件取得
    /// </summary>
    /// <returns></returns>
    public List <InvestmentTransactionData> SelectInvestmentTransaction()
    {
        // 以下は実際に使用する時の使い方の例
        MyDatabase db = MyDatabase.Instance;

        // データベースのテーブルを取得
        InvestmentTransactionTable investmentTransactionTable = db.GetInvestmentTransactionTable();

        return(investmentTransactionTable.SelectAll());
    }
コード例 #2
0
 private void CreateDbTables()
 {
     mDummyMasterTable                 = new DummyMasterTable(ref mDb);
     mDummyCaptureTable                = new DummyCaptureTable(ref mDb);
     m_ShopMasterTable                 = new ShopMasterTable(ref mDb);
     m_InvestmentTransactionTable      = new InvestmentTransactionTable(ref mDb);
     m_AmusumentMachineMasterTable     = new AmusumentMachineMasterTable(ref mDb);
     m_SelectJoinTable                 = new SelectJoinTable(ref mDb);
     m_AmusumentMachineRankMasterTable = new AmusumentMachineRankMasterTable(ref mDb);
 }
コード例 #3
0
    /// <summary>
    /// 収支テーブルの登録/更新
    /// </summary>
    /// <param name="id"></param>
    /// <param name="name"></param>
    /// <returns></returns>
    public bool InsertUpdateInvestmentTransaction(int shopId, int machineId, int machineNumber, int investment, int collection)
    {
        // 以下は実際に使用する時の使い方の例
        MyDatabase db = MyDatabase.Instance;

        // データベースのテーブルを取得
        InvestmentTransactionTable investmentTransaction = db.GetInvestmentTransactionTable();
        // トランザクションのためinsertしか行わない。更新はしない
        InvestmentTransactionData investmentData = new InvestmentTransactionData();

        // InsertまたはUpdate
        // ※同一の主キーのデータがあればUpdate、無ければInsertとなる
        investmentData.shopid          = shopId;
        investmentData.machineid       = machineId;
        investmentData.machinenumber   = machineNumber;
        investmentData.investment      = investment;
        investmentData.collectionmoney = collection;
        investmentTransaction.Update(investmentData);
        return(true);
    }