Esempio n. 1
0
        //protected void BindStatus()
        //{

        //    //Create blank list
        //    List<accountstatu> list = new List<accountstatu>();

        //    //Fill list
        //    list = App_Code.AccountStatusService.GetObjects();

        //    //Bind DDL
        //    ddlStatus.DataSource = list;
        //    ddlStatus.DataValueField = "account_status";
        //    ddlStatus.DataTextField = "account_status";
        //    ddlStatus.DataBind();
        //    //Country.SelectedValue = "Default";


        //}

        protected void BindPayments()
        {
            //Get the logged in User if any
            MembershipUser LoggedInMembershipUser;

            LoggedInMembershipUser = Membership.GetUser();

            //Check if there is a logged in User
            if (LoggedInMembershipUser != null)
            {
                // ToInt32 can throw FormatException or OverflowException.
                int UserId = -1;

                try
                {
                    //Get the RALT data from membership accountID
                    UserId = Convert.ToInt32(LoggedInMembershipUser.ProviderUserKey.ToString());
                    user           UserData = UserService.GetUserByMemberId(UserId);
                    List <payment> Payments;

                    Payments = App_Code.PaymentService.GetObjectsByUserId(UserData.user_id);

                    GridPayments.DataSource = Payments;
                    GridPayments.DataBind();
                }
                catch { }
            }
        }
Esempio n. 2
0
        protected void BindPayments()
        {
            UserData = (user)Session["UserData"];

            List <payment> Payments;

            Payments = App_Code.PaymentService.GetObjectsByUserId(UserData.user_id);

            GridPayments.DataSource = Payments;
            GridPayments.DataBind();
        }