Given the minute amount of information you have provided, I am left only to speculate. But, my guess is that you never initiated a connection for the command. So do one of two things:
1.
Cmd = new SqlCommand("UPDATE BillNumber SET BillNumb = BillNumb + 1 WHERE Id = 1",ConnectionString);
or
2.
Cmd.Connection = "Your connection string";