Exemplo n.º 1
0
        public Member()
        {
            InitializeComponent();
            memberID         = SelectMember.memberID;
            lblMemberID.Text = memberID.ToString();
            MemberClass member = new MemberClass();

            member.MemberID               = memberID;
            member                        = SelectQueries.GetMemberInfo(member);
            lblDateJoined.Text            = member.JoinDate.ToShortDateString();
            txtFirstName_Mem.Text         = member.FName;
            txtLastName_Mem.Text          = member.LName;
            txtPhone_Mem.Text             = member.Number;
            txtEmail_Mem.Text             = member.Email;
            txtAddress_Mem.Text           = member.Address;
            lblBooklimit.Text             = member.IssueLimit.ToString();
            pictureBoxImage.ImageLocation = member.ProfileImage;

            DataTable dt = new DataTable();

            dt = SelectQueries.BooksLeftToReturn(memberID);
            booksLeftGriedView.DataSource = dt;
            cmbIssueID.ValueMember        = "Issue_ID";
            cmbIssueID.DisplayMember      = "Issue_ID";
            cmbIssueID.DataSource         = dt;

            dt = SelectQueries.IssueHistory(memberID);
            issueHistoryGridView.DataSource = dt;

            dt = SelectQueries.ReturnHistory(memberID);
            returnHistoryGridView.DataSource = dt;


            dt = SelectQueries.UnpaidOverdues(memberID);
            UnpaidGridView.DataSource = dt;

            dt = SelectQueries.PaidOverdues(memberID);
            PaidGridView.DataSource = dt;
        }