Esempio n. 1
0
 private void btnSave_Click_1(object sender, EventArgs e)
 {
     try
     {
         DialogResult dialog = MessageBox.Show("Are you sure to save the changes in Database ",
                                               "Yes", MessageBoxButtons.YesNo);
         if (dialog == DialogResult.Yes)
         {
             for (int i = 0; i < grdList.Rows.Count; i++)
             {
                 if (grdList.Rows[i].Cells["ColumnValue"].Value.ToString().Length > 0)
                 {
                     ////grdList.Rows[i].Cells["ColumnValue"].Value =
                     ////    grdList.Rows[i].Cells["ColumnValue"].Value.ToString().Replace
                     ////    (txtToSearch.Text, txtToReplace.Text);
                     SchemaItemsDB.updateValueinDB(grdList.Rows[i].Cells["TableName"].Value.ToString(),
                                                   grdList.Rows[i].Cells["ColumnName"].Value.ToString(),
                                                   grdList.Rows[i].Cells["ColumnValue"].Value.ToString());
                 }
             }
             grdList.CurrentCell = grdList.Rows[0].Cells[0];
         }
     }
     catch (Exception ex)
     {
     }
 }