Пример #1
0
    public void SaveDropOutData()
    {
        if (Session["EditLabKitID"] != null)
        {
            // go through the grid view rows
            for (int i = 0; i < gvDropOut.Rows.Count; i++)
            {
                // find our hidden fields for old values
                string strDropoutRateID  = ((Label)gvDropOut.Rows[i].FindControl("lblDropoutRateID")).Text;
                string strDropOutRateNew = ((TextBox)gvDropOut.Rows[i].FindControl("txtDropOutRate")).Text;
                string strDropOutRateOld = ((Label)gvDropOut.Rows[i].FindControl("lblOldDropOutRate")).Text;

                // if any changed, save the rate
                if (strDropOutRateNew != strDropOutRateOld)
                {
                    string message = bi.UpdateDropOutRates(Session["EditLabKitID"].ToString(), strDropoutRateID, strDropOutRateNew);
                    Log.Info(Context.User.Identity.Name, Request.FilePath, Session, "Edited Drop Out Rate", "LabKit:" + Session["EditLabKitID"].ToString() + ",ID:" + strDropoutRateID + ",OldValue:" + strDropOutRateOld + ",NewValue:" + strDropOutRateNew);
                }
            }
        }
    }