internal static void Update(Language language)
{
using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
{
SqlCommand sqlCommand = new SqlCommand(SN_LANGUAGE_UPDATE, sqlConnection);
sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlParameter sqlParameter = null;
sqlParameter = new SqlParameter(PN_LANGUAGE_ID, System.Data.SqlDbType.Int);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = language.ID;
sqlCommand.Parameters.Add(sqlParameter);
sqlParameter = new SqlParameter(PN_LANGUAGE_NAME, System.Data.SqlDbType.NVarChar);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = language.Name;
sqlCommand.Parameters.Add(sqlParameter);
sqlParameter = new SqlParameter(PN_LANGUAGE_CULTURE, System.Data.SqlDbType.NVarChar);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = language.Culture;
sqlCommand.Parameters.Add(sqlParameter);
sqlParameter = new SqlParameter(PN_LANGUAGE_IMAGE, System.Data.SqlDbType.NVarChar);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = language.Image;
sqlCommand.Parameters.Add(sqlParameter);
try
{
sqlCommand.Connection.Open();
sqlCommand.ExecuteNonQuery();
sqlCommand.Connection.Close();
}
catch (Exception ex)
{
throw ex;
}
}
}