Esempio n. 1
0
 private void btnSelect_Click(object sender, EventArgs e)
 {
     if (this.MultiSelect)
     {
         if (!BasePageLogic.CheckInputSelectAnyOne(this.dgvRole, "colSelected"))
         {
             return;
         }
         this.SelectedIds  = this.GetSelectedIds();
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
     else
     {
         if (!BasePageLogic.CheckInputSelectOne(this.dgvRole, "colSelected"))
         {
             return;
         }
         var dataRow = BasePageLogic.GetSelecteRow(this.dgvRole, "colSelected") ??
                       BasePageLogic.GetDataGridViewEntity(this.dgvRole);
         if (dataRow != null)
         {
             this.GetSelectedId(dataRow);
             this.DialogResult = DialogResult.OK;
             this.Close();
         }
     }
 }