locked
Calling two save methods but one method is getting affected (windows store apps using sqlite database) RRS feed

  • Question

  • public asyc void insert()

    {

        string result1=await income.SaveIncome(income);

       string result2=await transaction.SaveTransaction(transaction);

    }

    The above are the two methods,only one method is getting affected ie

    if iam using "this.datacontext=incomes"  then income data will inserted not transaction

    if iam using "this.datacontext=trasaction" then transaction data will get inserted not income

    So the thing is i want two table data should get inserted at a time when i click a single buttom.so please help me ASAP.


    amair

    Wednesday, May 29, 2013 4:59 AM

Answers

  • Hi Amair, It is not so clear that what do you have an what do you need. What is on your screen (income or transaction or both)? Why does setting data context as something allows you to save that and not the other? I think if you describe your scenario better then you can get a good resolution

    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

    Happy Coding!!!

    Wednesday, May 29, 2013 6:13 AM

All replies

  • Hi Amair, It is not so clear that what do you have an what do you need. What is on your screen (income or transaction or both)? Why does setting data context as something allows you to save that and not the other? I think if you describe your scenario better then you can get a good resolution

    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

    Happy Coding!!!

    Wednesday, May 29, 2013 6:13 AM
  • Actually my question is i want to store the data in to multiple table with a single button click.and the same data to displayed into the listview in windows store apps(c# and xaml)  using sqlite database

    amair

    Wednesday, May 29, 2013 6:20 AM