我无法在DialogFragment中使我的Parse.com Query工作

时间:2015-09-04 04:16:23

标签: c# android parsing xamarin android-dialogfragment

我在单击Dialog Fragment中的按钮后尝试从我的Parse数据库查询但是我得到了一个" java.lang.reflect.InvocationTargetException"错误。我似乎能够找到问题的根源,因为它没有返回包含错误的代码行。

    void XLogIn_Click (object sender, EventArgs e)
    {

     var query = ParseObject.GetQuery ("Votes")
            .WhereEqualTo ("Name", txtUser)
            .WhereEqualTo ("Password", txtPass)
            .WhereEqualTo("True", true);
        int count = query.CountAsync ().Result;
        if (count > 0) {
            Toast.MakeText (this, "Log In Complete", ToastLength.Short).Show ();
            FragmentTransaction transaction = FragmentManager.BeginTransaction ();
            dialogueFragment logIn = new dialogueFragment ();
            logIn.Show (transaction, "dialog fragment");
        } 

        else {
            Toast.MakeText (this, "Invalid data", ToastLength.Short).Show ();
        }
        }

0 个答案:

没有答案