private void mem_update_Load(object sender, EventArgs e) { txtaddress.Text = mem.address; txtcontactno.Text = mem.contactno; txtemail.Text = mem.email; txtlname.Text = mem.fullname; txtid.Text = mem.memid; txtoccupation.Text = mem.occupation; cbogender.Text = mem.gender; txttinno.Text = mem.tinno; if (mem.acceptance_date < dtpacceptancedate.MinDate) { dtpacceptancedate.Value = dtpacceptancedate.MinDate; } else { dtpacceptancedate.Value = mem.acceptance_date; cbomembershiptype.Text = mem.typeofmembership; } cbomembershiptype.Enabled = false; cbogender.Enabled = false; //GET MEMBER_STANDING Member_Standing m = new Member_Standing(); m.memid = mem.memid; mem_s = m.SELECT_BY_ID(); chkattendance.Checked = (mem_s.ATTENDANCE == true) ? true : false; chkfiftyk.Checked = (mem_s.PAYMENT_FIFTYK_WITHIN_FIVE_YEARS == true) ? true : false; chkpatronage.Checked = (mem_s.PATRONAGE_OF_MMG_SERVICES == true) ? true : false; chktenk.Checked = (mem_s.PAYMENT_TENK_WITHIN_SIX_MONTHS == true) ? true : false; //LOAD PICTURE if (mem.pic != null) { MemoryStream ms = new MemoryStream(mem.pic); pbMemPic.Image = Image.FromStream(ms); pbMemPic.SizeMode = PictureBoxSizeMode.Zoom; } else { pbMemPic.Image = Properties.Resources.noimagefound; pbMemPic.SizeMode = PictureBoxSizeMode.Zoom; } }
private Boolean update_standing() { Member_Standing mem_s = new Member_Standing(); mem_s.memid = mem.memid; mem_s.PATRONAGE_OF_MMG_SERVICES = (chkpatronage.Checked == true) ? true : false; mem_s.PAYMENT_FIFTYK_WITHIN_FIVE_YEARS = (chkfiftyk.Checked == true) ? true : false; mem_s.PAYMENT_TENK_WITHIN_SIX_MONTHS = (chktenk.Checked == true) ? true : false; mem_s.ATTENDANCE = (chkattendance.Checked == true) ? true : false; if (mem_s.Update()) { return(true); } else { return(false); } }