コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <EBooks> bookList = BLLBooks.GetBookNames();
                if (bookList != null && bookList.Count > 0)
                {
                    bookList = (from l in bookList
                                where l.IsReturned == false
                                select l).ToList <EBooks>();
                }

                cmbVerilenKitap.DataSource     = bookList;
                cmbVerilenKitap.DataTextField  = "Name";
                cmbVerilenKitap.DataValueField = "ID";
                cmbVerilenKitap.ClearSelection();
                cmbVerilenKitap.DataBind();

                cmbMembers.DataSource     = BLLMembers.GetMemberNames();
                cmbMembers.DataTextField  = "FullName";
                cmbMembers.DataValueField = "ID";
                cmbMembers.ClearSelection();
                cmbMembers.DataBind();

                cmbEmployees.DataSource     = BLLEmployees.GetEmployeeNames();
                cmbEmployees.DataTextField  = "FullName";
                cmbEmployees.DataValueField = "ID";
                cmbEmployees.ClearSelection();
                cmbEmployees.DataBind();
            }
        }
コード例 #2
0
        private void Form2_Load(object sender, EventArgs e)
        {
            List <EBooks> bookList = BLLBooks.GetBookNames();

            if (bookList != null && bookList.Count > 0)
            {
                bookList = (from l in bookList
                            where l.IsReturned == false
                            select l).ToList <EBooks>();
            }
            cmbVerilenKitap.DataSource    = bookList;
            cmbVerilenKitap.DisplayMember = "Name";
            cmbVerilenKitap.ValueMember   = "ID";

            cmbMembers.DataSource    = BLLMembers.GetMemberNames();
            cmbMembers.DisplayMember = "FullName";
            cmbMembers.ValueMember   = "ID";

            cmbEmployees.DataSource    = BLLEmployees.GetEmployeeNames();
            cmbEmployees.DisplayMember = "FullName";
            cmbEmployees.ValueMember   = "ID";
        }