Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            member m = new member();
            Int32  a = Convert.ToInt32(textBox1.Text);
            var    q = (from x in context.members
                        where x.memberid == (a)
                        select x);

            dataGridView1.DataSource = q;
        }
        /// <summary>
        /// Create a new member object.
        /// </summary>
        /// <param name="memberid">Initial value of the memberid property.</param>
        /// <param name="membername">Initial value of the membername property.</param>
        /// <param name="membericno">Initial value of the membericno property.</param>
        /// <param name="address">Initial value of the address property.</param>
        public static member Createmember(global::System.Int32 memberid, global::System.String membername, global::System.String membericno, global::System.String address)
        {
            member member = new member();

            member.memberid   = memberid;
            member.membername = membername;
            member.membericno = membericno;
            member.address    = address;
            return(member);
        }
Esempio n. 3
0
        private void MemberCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            modelEntities2 context = new modelEntities2();
            int            mid     = Convert.ToInt32(MemberCombo.SelectedItem.ToString());
            var            query   = from x in context.members
                                     where x.memberid == mid
                                     select x;

            member m = query.First <member>();

            MemNameTxtBox.Text = m.membername;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the members EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTomembers(member member)
 {
     base.AddObject("members", member);
 }