Edit function does not work - C#