Beispiel #1
0
 public void Delete()
 {
     if (MessageBox.Show("You had selected " + dgvEditKit.SelectedRows.Count.ToString() + " kits to be deleted. Are you sure?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         GGKUtilLib.setStatus("Deleting " + dgvEditKit.SelectedRows.Count.ToString() + " kit(s) and all it's associated data ...");
         this.Enabled = false;
         GGKUtilLib.disableMenu();
         GGKUtilLib.disableToolbar();
         bwDelete.RunWorkerAsync(dgvEditKit);
     }
 }
Beispiel #2
0
        public void Save()
        {
            bool err = false;

            if (txtKit.Text.Trim() == "")
            {
                errorProvider1.SetError(txtKit, "Must provide a Kit Number. If you don't have one, just enter anything unique to this kit. e.g, KIT01");
                err = true;
            }
            else
            {
                errorProvider1.SetError(txtKit, "");
            }

            if (txtName.Text.Trim() == "")
            {
                errorProvider1.SetError(txtName, "Must provide a name.");
                err = true;
            }
            else
            {
                errorProvider1.SetError(txtName, "");
            }


            if (err)
            {
                return;
            }

            Object[] args = new Object[] { txtKit.Text, txtName.Text, dataGridViewAutosomal.Rows, textBoxYDNA.Text, textBoxMtDNA.Text, new DataGridViewRowCollection[] { dgvy12.Rows, dgvy25.Rows, dgvy37.Rows, dgvy67.Rows, dgvy111.Rows, dgvymisc.Rows }, cbSex.Text, tbFASTA.Text };
            GGKUtilLib.disableSave();
            GGKUtilLib.setStatus("Saving ...");
            this.Enabled = false;
            GGKUtilLib.disableMenu();
            GGKUtilLib.disableToolbar();
            bwSave.RunWorkerAsync(args);
        }