var id = "";
var category = project.Variables["Сategory"].Value;
var idDictonary = new Dictionary<string, string>()
{
{"мышки", "1"}, {"клавиатуры", "2"}, {"системники", "3"}
};
idDictonary.TryGetValue(category, out id);
project.Variables["Id"].Value = id;