public static void update(Dictionary<string, string> data)
{
int id = int.Parse(data["EmpId"]);
string fname = data["updatedFieldName"].Replace(" ", "");
string fval = data["updatedFieldValue"];
Employee e = db[id];
//find and set the location property in loc name.
if(fname == "DOB")
e.GetType().GetProperty(fname).SetValue(e, Convert.ToDateTime(fval), null);
else
e.GetType().GetProperty(fname).SetValue(e, fval, null);
db[id] = e;
}