/// <summary> /// Saves the updated frequency to the database /// </summary> public void SaveData() { // go through each of the rows for (int i = 0; i < gvFreqView.Rows.Count; i++) { // get the ID, current value, and old value string strFreq_Id = ((Label)gvFreqView.Rows[i].FindControl("lblFrequency_ID")).Text; string strFreqNew = ((TextBox)gvFreqView.Rows[i].FindControl("txtFrequency")).Text; string strFreqOld = ((Label)gvFreqView.Rows[i].FindControl("lblOldFrequency")).Text; // if we have a difference between the old value and the current value if (strFreqNew != strFreqOld) { // update the frequency in the DB FST.Common.Business_Interface bi = new FST.Common.Business_Interface(); string message = bi.UpdateFrequency(strFreq_Id, strFreqNew); // log the change Log.Info(Context.User.Identity.Name, Request.FilePath, Session, "Edited Frequency Rate", "ID:" + strFreq_Id + ",OldValue:" + strFreqOld + ",NewValue:" + strFreqNew); } } }