check Xpo.DB.SelectedData is Null XPO DevExpress

  string username = Input_Username.Text;
        string password = Input_Password.Text;
        Session xpoSession = new Session();
        XpoDataSource1.Session = xpoSession;
        string sql = "SELECT username,password FROM apotek2.dbo.account WHERE username = '" +username
                    + "' and password = '"+password+"'";
        SelectedData resultSet = XpoDataSource1.Session.ExecuteQuery(sql);

        if ( resultSet.ResultSet[0].Rows.Count()> 0 )
        {

            Response.Redirect("~/Default.aspx");
        }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: