Exemple #1
0
 private void btResetDefault_Click(object sender, EventArgs e)
 {
     if (ComfirmMsg(MSG_COMFIRM_RESET))
     {
         using (var objDb = new clsDBUltity())
         {
             if (!objDb.ResetDefauleDevice(_deviceid, _devicetype))
             {
                 ShowMsg(MessageBoxIcon.Error, MSG_RESET_SETTING_ERR);
                 return;
             }
             var intColumnIndexCurrent = grvDevice.CurrentCell.ColumnIndex;
             var intRowIndexCurrent    = grvDevice.CurrentCell.RowIndex;
             grvDevice.DataSource = objDb.GetDeviceList();
             grvDevice_CellClick(grvDevice, new DataGridViewCellEventArgs(intColumnIndexCurrent, intRowIndexCurrent));
             _changeSetting = true;
         }
     }
 }