public void createMember() { #region Create account //try..catch if (log.insertLogin(GETMember.IDMember, GETMember.Password, "5", "Blocked")) { MessageBox.Show("Added account", "Added..", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Add account fail", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } #endregion #region Create member MemoryStream pic = new MemoryStream(); GETMember.Picture.Save(pic, GETMember.Picture.RawFormat); if (GETMember.FName != null && GETMember.LName != null && pic != null && GETMember.Address != null && GETMember.Phone != null && GETMember.IDCard != '\0') { if (mem.insertMembers(GETMember.IDMember, GETMember.LName, GETMember.FName, pic, GETMember.Birthday, GETMember.Address, GETMember.Gender, GETMember.Phone, GETMember.IDCard, "Chờ duyệt")) { MessageBox.Show("Added Member", "Added..", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Added member fail", "Added..", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Please insert information", "Added..", MessageBoxButtons.OK, MessageBoxIcon.Warning); } #endregion }