Ejemplo n.º 1
0
 private void delExtraInfoButton_Click(object sender, EventArgs e)
 {
     if (this.canEdit == false)
     {
         cmnCde.showMsg("You don't have permission to perform" +
                        " this action!\nContact your System Administrator!", 0);
         return;
     }
     if (this.extInfoDataGridView.CurrentCell != null && this.extInfoDataGridView.SelectedRows.Count <= 0)
     {
         this.extInfoDataGridView.Rows[this.extInfoDataGridView.CurrentCell.RowIndex].Selected = true;
     }
     if (this.extInfoDataGridView.SelectedRows.Count <= 0)
     {
         cmnCde.showMsg("Please select the Row(s) to delete!", 0);
         return;
     }
     if (cmnCde.showMsg("Are you sure you want to delete the\r\nselected Extra Information Record(s)?", 1) == DialogResult.No)
     {
         //cmnCde.showMsg("Operation Cancelled!", 4);
         return;
     }
     for (int i = 0; i < this.extInfoDataGridView.SelectedRows.Count; i++)
     {
         cmnCde.deleteRowOthrInfVal(
             long.Parse(this.extInfoDataGridView.SelectedRows[i].Cells[5].Value.ToString()),
             this.ext_inf_tbl_name);
     }
     this.populateValGridVw();
 }