WFA_psychometric_chart.Form1_main.AddOrUpdateNewRecord C# (CSharp) Method

AddOrUpdateNewRecord() public method

public AddOrUpdateNewRecord ( string name, System.Windows.Forms.DataGridViewCellEventArgs e ) : void
name string
e System.Windows.Forms.DataGridViewCellEventArgs
return void
        public void AddOrUpdateNewRecord(string name, DataGridViewCellEventArgs e)
        {
            /*
            //--We need to count the index of the current datagridview if the row index 
                is greater then the data in the list of data             
            */
            if (e.RowIndex + 1 > chartDetailList.Count)
            {
                //insert the data...
                string nameValue = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                insertNewDataFromDGV(nameValue);

            }
            else
            {
                //--Update the data
                string chartIDValue = chartDetailList[e.RowIndex].chartID;
                string nameValue = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                UpdateNewDataFromDGV(nameValue, chartIDValue);

            }
        }
Form1_main