public clsMobileBanker(MobileBanker mobileBanker)
        {
            _name = mobileBanker.FirstName + " " + mobileBanker.OtherName + " " + mobileBanker.LastName;

            _members = new List<clsMobileBankerMember>();
            _members.AddRange(ExtractMembers(mobileBanker.MobileBankerCustomers.ToList()));
            _mobileBankerId = mobileBanker.MobileBankerid;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Utils.IsAuthorized("MobileBankers", "Open");

            if (!IsPostBack)
            {
                if (Request.QueryString["mobiId"] != null)
                {
                    CurrentMobileBanker = db.MobileBankers.FirstOrDefault(m => m.MobileBankerid == Convert.ToInt32(Request.QueryString["mobiId"]));
                    Image1.ImageUrl = "MobileBankerImageDisplay.ashx?mid=" + CurrentMobileBanker.MobileBankerid;

                    FirstNameTextBox.Text = CurrentMobileBanker.FirstName.ToString();
                    OtherNameTextBox.Text = CurrentMobileBanker.OtherName.ToString();
                    LastNameTextBox.Text = CurrentMobileBanker.LastName;
                    AddressTextBox.Text = CurrentMobileBanker.Address;
                    TelephoneTextBox.Text = CurrentMobileBanker.Telephone;
                    MobileBankerCodeTextBox.Text = CurrentMobileBanker.MobileBankerCode;

                    GetAllNonGroupMembers(CurrentMobileBanker.MobileBankerid);
                    GetGroupMembers(CurrentMobileBanker.MobileBankerid);

                    lstMembers.DataSource = GroupMembers.OrderBy(g => g.Member);
                    lstMembers.DataTextField = "Member";
                    lstMembers.DataValueField = "MemberId";
                    lstMembers.DataBind();

                    lstNonMembers.DataSource = NonGroupMembers.OrderBy(g => g.Member);
                    lstNonMembers.DataTextField = "Member";
                    lstNonMembers.DataValueField = "MemberId";
                    lstNonMembers.DataBind();

                    //InvestmentHyperLink.NavigateUrl = "GroupInvestments.aspx?gid=" + CurrentMobileBanker.GroupId;
                    //LoanHyperLink.NavigateUrl = "GroupLoansLoans.aspx?gid=" + CurrentMobileBanker.GroupId;

                }
                else
                {
                    //get the current group id when a group id is passed.
                    //if (Request.QueryString["GroupId"] != null)
                    //    CurrentMobileBanker = db.LoanGroups.FirstOrDefault(g => g.GroupId == Convert.ToInt32(Request.QueryString["GroupId"]));
                    CurrentMobileBanker = new MobileBanker();

                    GetAllNonGroupMembers(CurrentMobileBanker.MobileBankerid);
                    GetGroupMembers(CurrentMobileBanker.MobileBankerid);

                    //lstMembers.DataSource = GroupMembers.OrderBy(g => g.Member);
                    //lstMembers.DataTextField = "Member";
                    //lstMembers.DataValueField = "MemberId";
                    //lstMembers.DataBind();

                    lstNonMembers.DataSource = NonGroupMembers.OrderBy(g => g.Member);
                    lstNonMembers.DataTextField = "Member";
                    lstNonMembers.DataValueField = "MemberId";
                    lstNonMembers.DataBind();
                }
            }
        }
 partial void DeleteMobileBanker(MobileBanker instance);
 partial void UpdateMobileBanker(MobileBanker instance);
 partial void InsertMobileBanker(MobileBanker instance);