private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if(txtFirstName.Text=="")
            {
                ErrorProvider errFN = new ErrorProvider();
                errFN.SetError(txtFirstName,"Required Field");
                return;
            }

            if (txtLastName.Text == "")
            {
                ErrorProvider errLN = new ErrorProvider();
                errLN.SetError(txtLastName, "Required Field");
                return;
            }

            if (txtNickName.Text == "")
            {
                ErrorProvider errNN = new ErrorProvider();
                errNN.SetError(txtNickName, "Required Field");
                return;
            }

            if (txtNameOnId.Text == "")
            {
                ErrorProvider errNID = new ErrorProvider();
                errNID.SetError(txtNameOnId, "Required Field");
                return;
            }

            if (txtMobile.Text == "")
            {
                ErrorProvider errMobile = new ErrorProvider();
                errMobile.SetError(txtMobile, "Required Field");
                return;
            }

            if (txtEmail.Text == "")
            {
                ErrorProvider errEmail = new ErrorProvider();
                errEmail.SetError(txtEmail, "Required Field");
                return;
            }

            Picture = txtFirstName.Text+txtLastName.Text + "_" + DateTime.Now.ToString("mm.ss") +  ".jpg";

            if(this.Tag=="edit")
            {
                Volunteers vol = (Volunteers) btnSave.Tag;

                vol.setName(txtFirstName.Text, txtLastName.Text, txtNickName.Text, txtNameOnId.Text);
                vol.setAddress(txtStreet.Text, txtCity.Text);
                vol.setContact(txtEmail.Text, txtMobile.Text);
                vol.setVGDetails(txtVGL.Text, txtContactNo.Text, chkLeading.Checked);
                //int s = int.Parse(js.Lookup("fldID","tblEvent","fldEventTitle='" + cboService.Text + "'"));
                //int c = int.Parse(js.Lookup("fldID","tblGroup","fldGroup='" + cboClass.Text + "'"));
                //vol.setServiceDetails(s, cboWeek.Text, c);
                vol.setNFCCode(txtNFCCode.Text);
                vol.setPicPath(Picture);
                //System.IO.File.Delete(AccessRegistryTool.ReadValue("PicPath") + @"\volunteer\" + Picture);

                if (vol.Update())
                {
                    pictureBox1.Image.Save(AppSettingsHelper.GetAppSettingsValue("PicturePath") + @"\volunteer\" + Picture);
                    LoadVolunteers();
                    txtFirstName.Text = "";
                    txtLastName.Text = "";
                    txtNickName.Text = "";
                    txtNameOnId.Text = "";
                    txtMobile.Text = "";
                    txtEmail.Text = "";
                    txtStreet.Text = "";
                    txtCity.Text = "";
                    txtVGL.Text = "";
                    txtContactNo.Text = "";
                    LoadService();
                    LoadWeek();
                    LoadClass();
                    chkLeading.Checked = false;
                    txtNFCCode.Text = "";
                    pictureBox1.Image.Dispose();
                    pictureBox1.Image = Image.FromFile(AppSettingsHelper.GetAppSettingsValue("PicturePath") + @"\download.jpg");
                }
                else
                {
                    js.showExclamation("Failed Updating Volunteer Details");
                }

                this.Tag = null;

            }
            else
            {
                Volunteers vol = new Volunteers();
                vol.setName(txtFirstName.Text, txtLastName.Text, txtNickName.Text, txtNameOnId.Text);
                vol.setAddress(txtStreet.Text, txtCity.Text);
                vol.setContact(txtEmail.Text, txtMobile.Text);
                vol.setVGDetails(txtVGL.Text, txtContactNo.Text, chkLeading.Checked);
                //int s = int.Parse(js.Lookup("fldID", "tblEvent", "fldEventTitle='" + cboService.Text + "'"));
                //int c = int.Parse(js.Lookup("fldID", "tblGroup", "fldGroup='" + cboClass.Text + "'"));
               // vol.setServiceDetails(s, cboWeek.Text, c);
                vol.setPicPath(Picture);

                if(vol.Save())
                {
                    pictureBox1.Image.Save(AppSettingsHelper.GetAppSettingsValue("PicturePath") + Picture);
                    LoadVolunteers();
                    txtFirstName.Text = "";
                    txtLastName.Text = "";
                    txtNickName.Text = "";
                    txtNameOnId.Text = "";
                    txtMobile.Text = "";
                    txtEmail.Text = "";
                    txtStreet.Text = "";
                    txtCity.Text = "";
                    txtVGL.Text = "";
                    txtContactNo.Text = "";
                    LoadService();
                    LoadWeek();
                    LoadClass();
                    chkLeading.Checked = false;
                    txtNFCCode.Text = "";
                    Picture = "";
                    pictureBox1.Image.Dispose();
                    pictureBox1.Image = Image.FromFile(AppSettingsHelper.GetAppSettingsValue("PicturePath") + @"\volunteer\download.jpg");
                }
            }

            tmrLogin.Enabled = false;

            //pictureBox1.Image.Save(AccessRegistryTool.ReadValue("PicPath") + @"\volunteer\" + Picture);
        }